diff options
author | Leo Liu <leo.liu@amd.com> | 2016-08-11 15:20:53 -0400 |
---|---|---|
committer | Leo Liu <leo.liu@amd.com> | 2016-09-06 10:01:24 -0400 |
commit | 0c374a7770ce3aee1048ffc1dbc82170017133ac (patch) | |
tree | 2aa9ede9754049d7165996aba2e462a36f314477 /src/gallium/state_trackers/omx | |
parent | e7a73b75a0dbd599187b8980b2e1e1cb5dfdaf6d (diff) | |
download | external_mesa3d-0c374a7770ce3aee1048ffc1dbc82170017133ac.zip external_mesa3d-0c374a7770ce3aee1048ffc1dbc82170017133ac.tar.gz external_mesa3d-0c374a7770ce3aee1048ffc1dbc82170017133ac.tar.bz2 |
st/omx/dec: set dst rect to match src size
When creating interlaced video buffer, hegith set to "template.height =
align(tmpl->height/ array_size, VL_MACROBLOCK_HEIGHT);", and we use
"template.height *= array_size;" for the buffer height, so it actually
aligned with 32. With progressive video buffer it still aligned with 16,
thus causing different height between interlaced buffer and progressive
buffer for 4K (height=2160), and 720p (height=720).
When transcode the video, this will cause the 16 lines corruption
at the bottom of the encode video.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/state_trackers/omx')
-rw-r--r-- | src/gallium/state_trackers/omx/vid_dec.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c index 7842966..f782263 100644 --- a/src/gallium/state_trackers/omx/vid_dec.c +++ b/src/gallium/state_trackers/omx/vid_dec.c @@ -569,16 +569,25 @@ static void vid_dec_deint(vid_dec_PrivateType *priv, struct pipe_video_buffer *s struct vl_compositor *compositor = &priv->compositor; struct vl_compositor_state *s = &priv->cstate; struct pipe_surface **dst_surface; + struct u_rect dst_rect; dst_surface = dst_buf->get_surfaces(dst_buf); vl_compositor_clear_layers(s); + dst_rect.x0 = 0; + dst_rect.x1 = src_buf->width; + dst_rect.y0 = 0; + dst_rect.y1 = src_buf->height; + vl_compositor_set_yuv_layer(s, compositor, 0, src_buf, NULL, NULL, true); - vl_compositor_set_layer_dst_area(s, 0, NULL); + vl_compositor_set_layer_dst_area(s, 0, &dst_rect); vl_compositor_render(s, compositor, dst_surface[0], NULL, false); + dst_rect.x1 /= 2; + dst_rect.y1 /= 2; + vl_compositor_set_yuv_layer(s, compositor, 0, src_buf, NULL, NULL, false); - vl_compositor_set_layer_dst_area(s, 0, NULL); + vl_compositor_set_layer_dst_area(s, 0, &dst_rect); vl_compositor_render(s, compositor, dst_surface[1], NULL, false); } |