On Mon, Nov 23, 2015 at 9:36 AM, Christian König <deathsim...@vodafone.de> wrote: > From: Christian König <christian.koe...@amd.com> > > The workarounds are to hacky to enable them by default
to hacky -> too hacky > and otherwise MPEG4 doesn't work reliable. reliable -> reliably > > Signed-off-by: Christian König <christian.koe...@amd.com> > --- > src/gallium/state_trackers/va/config.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/va/config.c > b/src/gallium/state_trackers/va/config.c > index a545a18..9ca0aa8 100644 > --- a/src/gallium/state_trackers/va/config.c > +++ b/src/gallium/state_trackers/va/config.c > @@ -28,10 +28,14 @@ > > #include "pipe/p_screen.h" > > +#include "util/u_video.h" > + > #include "vl/vl_winsys.h" > > #include "va_private.h" > > +DEBUG_GET_ONCE_BOOL_OPTION(mpeg4, "VAAPI_MPEG4_ENABLED", false) > + > VAStatus > vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int > *num_profiles) > { > @@ -45,12 +49,16 @@ vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile > *profile_list, int *num_ > *num_profiles = 0; > > pscreen = VL_VA_PSCREEN(ctx); > - for (p = PIPE_VIDEO_PROFILE_MPEG2_SIMPLE; p <= > PIPE_VIDEO_PROFILE_HEVC_MAIN_444; ++p) > + for (p = PIPE_VIDEO_PROFILE_MPEG2_SIMPLE; p <= > PIPE_VIDEO_PROFILE_HEVC_MAIN_444; ++p) { > + if (u_reduce_video_profile(p) == PIPE_VIDEO_FORMAT_MPEG4 && > !debug_get_option_mpeg4()) > + continue; > + > if (pscreen->get_video_param(pscreen, p, > PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTED)) { > vap = PipeToProfile(p); > if (vap != VAProfileNone) > profile_list[(*num_profiles)++] = vap; > } > + } > > /* Support postprocessing through vl_compositor */ > profile_list[(*num_profiles)++] = VAProfileNone; Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev