radeonsi/video: Remove mpeg12 shader decoder support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This would only be used for IDCT and MC entrypoints, but va/vdpau
frontends doesn't use those.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33893>
This commit is contained in:
David Rosca 2025-03-05 09:11:57 +01:00 committed by Marge Bot
parent 0bc9d59c2e
commit ab3c863cfb
4 changed files with 2 additions and 43 deletions

View file

@ -13,8 +13,8 @@
#include "radeonsi/si_pipe.h"
#include "util/u_memory.h"
#include "util/u_video.h"
#include "util/vl_zscan_data.h"
#include "vl/vl_defines.h"
#include "vl/vl_mpeg12_decoder.h"
#include <sys/types.h>
#include <assert.h>
@ -1220,10 +1220,6 @@ struct pipe_video_codec *si_common_uvd_create_decoder(struct pipe_context *conte
switch (u_reduce_video_profile(templ->profile)) {
case PIPE_VIDEO_FORMAT_MPEG12:
if (templ->entrypoint > PIPE_VIDEO_ENTRYPOINT_BITSTREAM)
return vl_create_mpeg12_decoder(context, templ);
FALLTHROUGH;
case PIPE_VIDEO_FORMAT_MPEG4:
width = align(width, VL_MACROBLOCK_WIDTH);
height = align(height, VL_MACROBLOCK_HEIGHT);

View file

@ -12,7 +12,7 @@
#include "radeonsi/si_pipe.h"
#include "util/u_memory.h"
#include "util/u_video.h"
#include "vl/vl_mpeg12_decoder.h"
#include "util/vl_zscan_data.h"
#include "vl/vl_probs_table.h"
#include "pspdecryptionparam.h"
@ -2737,8 +2737,6 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
switch (u_reduce_video_profile(templ->profile)) {
case PIPE_VIDEO_FORMAT_MPEG12:
if (templ->entrypoint > PIPE_VIDEO_ENTRYPOINT_BITSTREAM)
return vl_create_mpeg12_decoder(context, templ);
stream_type = RDECODE_CODEC_MPEG2_VLD;
break;
case PIPE_VIDEO_FORMAT_MPEG4:

View file

@ -14,7 +14,6 @@
#include "util/u_cpu_detect.h"
#include "util/u_screen.h"
#include "util/u_video.h"
#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include <sys/utsname.h>
@ -84,33 +83,6 @@ static const char *si_get_name(struct pipe_screen *pscreen)
return sscreen->renderer_string;
}
static int si_get_video_param_no_video_hw(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param)
{
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
return vl_profile_supported(screen, profile, entrypoint);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
case PIPE_VIDEO_CAP_MAX_WIDTH:
case PIPE_VIDEO_CAP_MAX_HEIGHT:
return vl_video_buffer_max_size(screen);
case PIPE_VIDEO_CAP_PREFERRED_FORMAT:
return PIPE_FORMAT_NV12;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
return false;
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
return false;
case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
return true;
case PIPE_VIDEO_CAP_MAX_LEVEL:
return vl_level_supported(screen, profile);
default:
return 0;
}
}
static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint, enum pipe_video_cap param)
{
@ -876,9 +848,6 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
sscreen->b.get_video_param = si_get_video_param;
sscreen->b.is_video_format_supported = si_vid_is_format_supported;
sscreen->b.is_video_target_buffer_supported = si_vid_is_target_buffer_supported;
} else {
sscreen->b.get_video_param = si_get_video_param_no_video_hw;
sscreen->b.is_video_format_supported = vl_video_buffer_is_format_supported;
}
si_init_renderer_string(sscreen);

View file

@ -22,7 +22,6 @@
#include "util/u_tests.h"
#include "util/u_upload_mgr.h"
#include "util/xmlconfig.h"
#include "vl/vl_decoder.h"
#include "si_utrace.h"
#include "aco_interface.h"
@ -744,9 +743,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
sctx->b.create_video_buffer = si_video_buffer_create;
if (screen->resource_create_with_modifiers)
sctx->b.create_video_buffer_with_modifiers = si_video_buffer_create_with_modifiers;
} else {
sctx->b.create_video_codec = vl_create_decoder;
sctx->b.create_video_buffer = vl_video_buffer_create;
}
/* GFX7 cannot unbind a constant buffer (S_BUFFER_LOAD doesn't skip loads