st/va: disable MPEG4 by default v2
The workarounds are too hacky to enable them by default and otherwise MPEG4 doesn't work reliably. v2: add docs/envvars.html, CC stable and fix typos Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v1) Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1) Cc: "11.1.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
@@ -238,6 +238,12 @@ for details.
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>VA-API state tracker environment variables</h3>
|
||||||
|
<ul>
|
||||||
|
<li>VAAPI_MPEG4_ENABLED - enable MPEG4 for VA-API, disabled by default.
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Other Gallium drivers have their own environment variables. These may change
|
Other Gallium drivers have their own environment variables. These may change
|
||||||
frequently so the source code should be consulted for details.
|
frequently so the source code should be consulted for details.
|
||||||
|
@@ -28,10 +28,14 @@
|
|||||||
|
|
||||||
#include "pipe/p_screen.h"
|
#include "pipe/p_screen.h"
|
||||||
|
|
||||||
|
#include "util/u_video.h"
|
||||||
|
|
||||||
#include "vl/vl_winsys.h"
|
#include "vl/vl_winsys.h"
|
||||||
|
|
||||||
#include "va_private.h"
|
#include "va_private.h"
|
||||||
|
|
||||||
|
DEBUG_GET_ONCE_BOOL_OPTION(mpeg4, "VAAPI_MPEG4_ENABLED", false)
|
||||||
|
|
||||||
VAStatus
|
VAStatus
|
||||||
vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_profiles)
|
vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_profiles)
|
||||||
{
|
{
|
||||||
@@ -45,12 +49,16 @@ vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_
|
|||||||
*num_profiles = 0;
|
*num_profiles = 0;
|
||||||
|
|
||||||
pscreen = VL_VA_PSCREEN(ctx);
|
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)) {
|
if (pscreen->get_video_param(pscreen, p, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTED)) {
|
||||||
vap = PipeToProfile(p);
|
vap = PipeToProfile(p);
|
||||||
if (vap != VAProfileNone)
|
if (vap != VAProfileNone)
|
||||||
profile_list[(*num_profiles)++] = vap;
|
profile_list[(*num_profiles)++] = vap;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Support postprocessing through vl_compositor */
|
/* Support postprocessing through vl_compositor */
|
||||||
profile_list[(*num_profiles)++] = VAProfileNone;
|
profile_list[(*num_profiles)++] = VAProfileNone;
|
||||||
|
Reference in New Issue
Block a user