[Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
Emil Velikov
emil.l.velikov at gmail.com
Mon Dec 5 12:58:46 UTC 2016
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()
-Emil
More information about the mesa-dev
mailing list