Re: [Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
On Mon, Dec 5, 2016 at 6:28 PM, Emil Velikovwrote: > 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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
Christian, Thanks for the review. Can you push the patch for me? Regards, Nayan On Mon, Dec 5, 2016 at 1:17 PM, Christian Königwrote: > Am 05.12.2016 um 06:25 schrieb Nayan Deshmukh: >> >> Signed-off-by: Nayan Deshmukh > > > Reviewed-by: Christian König . > > >> --- >> src/gallium/state_trackers/vdpau/mixer.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/gallium/state_trackers/vdpau/mixer.c >> b/src/gallium/state_trackers/vdpau/mixer.c >> index c205427..aca43c1 100644 >> --- a/src/gallium/state_trackers/vdpau/mixer.c >> +++ b/src/gallium/state_trackers/vdpau/mixer.c >> @@ -242,7 +242,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, >> struct pipe_video_buffer *video_buffer; >> struct pipe_sampler_view *sampler_view, sv_templ; >> struct pipe_surface *surface, surf_templ; >> - struct pipe_context *pipe; >> + struct pipe_context *pipe = NULL; >> struct pipe_resource res_tmpl, *res; >>vlVdpVideoMixer *vmixer; > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
Am 05.12.2016 um 06:25 schrieb Nayan Deshmukh: Signed-off-by: Nayan DeshmukhReviewed-by: Christian König . --- src/gallium/state_trackers/vdpau/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index c205427..aca43c1 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -242,7 +242,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, struct pipe_video_buffer *video_buffer; struct pipe_sampler_view *sampler_view, sv_templ; struct pipe_surface *surface, surf_templ; - struct pipe_context *pipe; + struct pipe_context *pipe = NULL; struct pipe_resource res_tmpl, *res; vlVdpVideoMixer *vmixer; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] st/vdpau: fix compiler warning in vlVdpVideoMixerRender
Signed-off-by: Nayan Deshmukh--- src/gallium/state_trackers/vdpau/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index c205427..aca43c1 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -242,7 +242,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, struct pipe_video_buffer *video_buffer; struct pipe_sampler_view *sampler_view, sv_templ; struct pipe_surface *surface, surf_templ; - struct pipe_context *pipe; + struct pipe_context *pipe = NULL; struct pipe_resource res_tmpl, *res; vlVdpVideoMixer *vmixer; -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev