[Mesa-dev] [PATCH] st/va: add dst rect to avoid scale on deint

Andy Furniss adf.lists at gmail.com
Fri Sep 29 10:51:45 UTC 2017


Andy Furniss wrote:
> Leo Liu wrote:
>> For 1080p video transcode, the height will be scaled to 1088 when deint
>> to progressive buffer. Set dst rect to make sure no scale.
>>
>> Fixes: 3ad8687 "st/va: use new vl_compositor_yuv_deint_full() to deint"
> 
> Probably my test cases are lacking, but I can't see and difference with 
> this. Do you have an example?

I found a 1080i gstreamer case where this patch helps by avoiding some 
first frames bounce with it's "auto" (invoked by scale) bob deint.

Couldn't find anything with ffmpeg or 1080p gst transcode.

It does help gstreamer raw 1080 input, which also had some first frame 
issues, that I was soon going to report - most previous testing being 
with ffmpeg as gstreamer seemed to be all over the place to start with.

> 
>>
>> Signed-off-by: Leo Liu <leo.liu at amd.com>
>> ---
>>   src/gallium/state_trackers/va/picture.c | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/gallium/state_trackers/va/picture.c 
>> b/src/gallium/state_trackers/va/picture.c
>> index 5e794652a6..7427b98688 100644
>> --- a/src/gallium/state_trackers/va/picture.c
>> +++ b/src/gallium/state_trackers/va/picture.c
>> @@ -669,15 +669,15 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID 
>> context_id)
>>         if (context->decoder->entrypoint == 
>> PIPE_VIDEO_ENTRYPOINT_ENCODE) {
>>            if (old_buf->interlaced) {
>> -            struct u_rect src_rect;
>> +            struct u_rect src_rect, dst_rect;
>> -            src_rect.x0 = 0;
>> -            src_rect.y0 = 0;
>> -            src_rect.x1 = surf->templat.width;
>> -            src_rect.y1 = surf->templat.height;
>> +            dst_rect.x0 = src_rect.x0 = 0;
>> +            dst_rect.y0 = src_rect.y0 = 0;
>> +            dst_rect.x1 = src_rect.x1 = surf->templat.width;
>> +            dst_rect.y1 = src_rect.y1 = surf->templat.height;
>>               vl_compositor_yuv_deint_full(&drv->cstate, 
>> &drv->compositor,
>>                                            old_buf, surf->buffer,
>> -                                         &src_rect, NULL, 
>> VL_COMPOSITOR_WEAVE);
>> +                                         &src_rect, &dst_rect, 
>> VL_COMPOSITOR_WEAVE);
>>            } else
>>               /* Can't convert from progressive to interlaced yet */
>>               return VA_STATUS_ERROR_INVALID_SURFACE;
>>
> 



More information about the mesa-dev mailing list