Commit 57f364e1 authored by Jean-Paul Saman's avatar Jean-Paul Saman

codec/avcodec/vaapi_x11.c: Remove debugging from subitle rendering code.

parent f04dfb86
...@@ -484,13 +484,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic, ...@@ -484,13 +484,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic,
{ {
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
assert(pic->format.i_width > 0 && pic->format.i_height > 0);
assert(pic->format.i_visible_width > 0 && pic->format.i_visible_height > 0);
assert(fmt->fourcc == VA_FOURCC_RGBA);
assert(image->image_id == VA_INVALID_ID);
assert(fmt->byte_order == VA_LSB_FIRST);
VAStatus status; VAStatus status;
status = vaCreateImage(sys->conn->p_display, fmt, status = vaCreateImage(sys->conn->p_display, fmt,
pic->format.i_width, pic->format.i_height, image); pic->format.i_width, pic->format.i_height, image);
...@@ -513,10 +506,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic, ...@@ -513,10 +506,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic,
goto out_va_free; goto out_va_free;
} }
assert(image->data_size <=
pic->format.i_width * pic->format.i_height
* (pic->format.i_bits_per_pixel/8));
void *p_base; void *p_base;
status = vaMapBuffer(sys->conn->p_display, image->buf, &p_base); status = vaMapBuffer(sys->conn->p_display, image->buf, &p_base);
if (status != VA_STATUS_SUCCESS) if (status != VA_STATUS_SUCCESS)
...@@ -547,14 +536,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic, ...@@ -547,14 +536,6 @@ static int CopyPictureToVAImage(vout_display_t *vd, picture_t *pic,
* visible_pitch = image->pitch[i_plane] - image->offset[i_plane] */ * visible_pitch = image->pitch[i_plane] - image->offset[i_plane] */
size_t i_size = __MIN(image->pitches[i_plane], size_t i_size = __MIN(image->pitches[i_plane],
(unsigned int)pic->p[i_plane].i_pitch); (unsigned int)pic->p[i_plane].i_pitch);
#if 0
msg_Info(vd, "line %d pitch %d/%d offset %d/%d datasize %d/%d consumed %d",
i_line,
image->pitches[i_plane], pic->p[i_plane].i_visible_pitch,
image->offsets[i_plane], pic->format.i_x_offset,
image->data_size, (image->data_size % (image->format.depth/8)),
(p_out - (uint8_t*)p_base));
#endif
vlc_memcpy(&p_out[i_line * image->pitches[i_plane]], &p_in[i_line * pic->p[i_plane].i_pitch], i_size); vlc_memcpy(&p_out[i_line * image->pitches[i_plane]], &p_in[i_line * pic->p[i_plane].i_pitch], i_size);
} }
} }
...@@ -594,8 +575,6 @@ static int RenderDirectSubpicture(vout_display_t *vd, picture_t *picture, subpic ...@@ -594,8 +575,6 @@ static int RenderDirectSubpicture(vout_display_t *vd, picture_t *picture, subpic
if (region->fmt.i_chroma != VLC_CODEC_RGBA) if (region->fmt.i_chroma != VLC_CODEC_RGBA)
continue; continue;
assert(i_sub <= i_region);
/* Copy pixels from region into VAImage */ /* Copy pixels from region into VAImage */
VAImage *image = &vasubpic[i_sub].image; VAImage *image = &vasubpic[i_sub].image;
image->image_id = VA_INVALID_ID; image->image_id = VA_INVALID_ID;
...@@ -645,7 +624,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict ...@@ -645,7 +624,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
if (!picture->p_sys && !picture->p_sys->surface) if (!picture->p_sys && !picture->p_sys->surface)
return; return;
picture_Hold(picture);
vlc_mutex_lock(&picture->p_sys->surface->lock); vlc_mutex_lock(&picture->p_sys->surface->lock);
/* count RGBA subpicture regions */ /* count RGBA subpicture regions */
...@@ -668,7 +646,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict ...@@ -668,7 +646,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
out_unlock: out_unlock:
vlc_mutex_unlock(&picture->p_sys->surface->lock); vlc_mutex_unlock(&picture->p_sys->surface->lock);
picture_Release(picture);
} }
static void PictureReleaseLocked(picture_t *pic) static void PictureReleaseLocked(picture_t *pic)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment