[Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender

Nayan Deshmukh nayan26deshmukh at gmail.com
Mon Dec 5 13:46:55 UTC 2016


On Mon, Dec 5, 2016 at 6:28 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> This seems like the compiler being silly since it fails to match if
> (vmixer->bicubic.filter || ...) with the else of if
> (!vmixer->noise_reduction.filter && ...)
>
> As usual, some wild idea(s) come to mind. Please don't read too much into them.
>  - move current_picture_structure validation further up
>  - factor out the "allocate temporary resource(s)" (when we have a filter)
>  - ^^ on the rendering side
>
> So you'll end up with something like
>
>    ...
>    if (vmixer->bicubic.filter || vmixer->sharpness.filter ||
> vmixer->noise_reduction.filter)
>       "allocate temporary resource(s)"
>    // else in original code is redundant
>
>    if (!vmixer->bicubic.filter)
>       "adjust dst area/clip" // current code, keep as-is
>
>    for (i = 0; i < layer_count; ++i)
>    ...
>
>
>    if (vmixer->bicubic.filter || vmixer->sharpness.filter ||
> vmixer->noise_reduction.filter)
>      "do filter rendering"
>    else
>       vlVdpSave4DelayedRendering()
>
Hi Emil,

Thanks for the suggestions but I am working on a patch series which will
remove the vlVdpSave4DelayedRendering() and hence the above if and
else will be removed. So setting pipe to NULL will take care of the compiler
warnings for the future patches too.

Regards,
Nayan
>
> -Emil


More information about the mesa-dev mailing list