[Mesa-dev] [PATCH v3] st/vdpau: change the order in which filters are applied(v3)

Christian König christian.koenig at amd.com
Thu Aug 25 10:04:32 UTC 2016


Sorry for not coming back to this earlier, but you know as busy as usual :)

> I thought that a possible reason could be that the Cb and Cr should be
> first interpolated to the original
Mhm, could be. But in theory that shouldn't make a difference.

Please open up a bug report and attach a picture of the artifacts. I 
will try to take a look when I have time.

In the meantime I suggest that we revert the patch for now and work on 
stopping writing/reading from the same surface first, cause that is the 
bug which is currently a bit problematic for me right now.

Regards,
Christian.

Am 25.08.2016 um 11:58 schrieb Nayan Deshmukh:
> ping
>
> On Mon, Aug 22, 2016 at 7:49 PM, Nayan Deshmukh
> <nayan26deshmukh at gmail.com> wrote:
>> Hi Christian,
>>
>> I checked the height/width of the surface. I get a luma channel with
>> the original size. The Cb and Cr
>> channel with height/2 and width/2. I had tested videos with 4:2:0
>> chroma format. But I still get the
>> artifacts.
>>
>> I thought that a possible reason could be that the Cb and Cr should be
>> first interpolated to the original
>> and then only we can apply the filter. So, I tried to use a temporary
>> buffer with original size and
>> writing on it. But I was still getting the artifacts. But since the
>> interpolation that would occur in matrix
>> filter would use the nearest neighbor so I tried to do it using linear
>> interpolation and the artifacts were
>> reduced but still, there were minor artifacts.
>>
>> Regards,
>> Nayan.
>>
>> On Fri, Aug 19, 2016 at 5:57 PM, Christian König
>> <christian.koenig at amd.com> wrote:
>>> Hi Nayan,
>>>
>>> double check the width/height of the surface and also how many you got with
>>> a debugger.
>>>
>>> Actually thinking more about it it could be that top/bottom fields are
>>> separated and so you got width&height/2 and width/2&height/4 compared to the
>>> video mixer.
>>>
>>> Maybe try your idea instead of caching the initialized filters with the
>>> different sizes.
>>>
>>> Regards,
>>> Christian.
>>>
>>>
>>> Am 18.08.2016 um 18:58 schrieb Nayan Deshmukh:
>>>> Hi Christian,
>>>>
>>>> I tried using 3 instances of the filter with original height & width,
>>>> height/2 & width and height/2 and width/2.
>>>> I am applying the 3 filters by checking the width and height of
>>>> surfaces respectively.
>>>>
>>>> The chroma artifacts are still present, different from the initial
>>>> ones. Any suggestion for the fixup?
>>>> I tried debugging, but I think I am missing something.
>>>>
>>>> Regards,
>>>> Nayan.
>>>>
>>>> On Wed, Aug 17, 2016 at 2:59 PM, Andy Furniss <adf.lists at gmail.com> wrote:
>>>>> Christian König wrote:
>>>>>> Top and Bottom field are separated in this representation.
>>>>>>
>>>>>> So you got a maximum of 3 planes multiplied by two fields.
>>>>>
>>>>> Ahh, thanks.
>>>>>
>>>>>
>>>>>> Regards,
>>>>>> Christian.
>>>>>>
>>>>>> Am 17.08.2016 um 11:11 schrieb Andy Furniss:
>>>>>>> Nayan Deshmukh wrote:
>>>>>>>
>>>>>>>> Sorry for the misleading language. What I meant was that the filter
>>>>>>>> should only
>>>>>>>> be applied to first resource i.e. use only first sampler_view and
>>>>>>>> surface. As you
>>>>>>>> replaced i by 0 the filter gets applied multiple times. I tried doing
>>>>>>>> that and I am
>>>>>>>> experiencing same problems i.e. artifacts with positive sharpen.
>>>>>>>>
>>>>>>>> So can you please it try it again by replacing VL_MAX_SURFACES with 1
>>>>>>>> in the
>>>>>>>> for loop. It should probably fix the problems.
>>>>>>>
>>>>>>> Possibly a stupid question, because I don't know how this stuff works,
>>>>>>> but why does it loop 6 times per frame rather than 3?
>>>>>>>
>>>>>>> I mean as seen if I put a printf as below.
>>>>>>>
>>>>>>>>>>>>> +   for(i = 0; i < VL_MAX_SURFACES; ++i) {
>>>>>>>>>>>>> +      if(sampler_views[i] != NULL && surfaces[i] != NULL) {
>>>>>>>                    fprintf(stderr,"ADF: i = %d\n", i);
>>>>>>>>>>>>> +         if (vmixer->noise_reduction.filter)
>>>>>>>>>>>>> + vl_median_filter_render(vmixer->noise_reduction.filter,
>>>>>>>>>>>>> +                                    sampler_views[i],
>>>>>>>>>>>>> surfaces[i]);
>>>>>>>>>>>>> +
>>>>>>>>>>>>> +         if (vmixer->sharpness.filter)
>>>>>>>>>>>>> + vl_matrix_filter_render(vmixer->sharpness.filter,
>>>>>>>>>>>>> +                                    sampler_views[i],
>>>>>>>>>>>>> surfaces[i]);
>>>>>>>



More information about the mesa-dev mailing list