That is just not supported by the hardware.
v2: fix compare
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
rscreen->screen.get_driver_query_info = r600_get_driver_query_info;
if (rscreen->info.has_uvd) {
- rscreen->screen.get_video_param = ruvd_get_video_param;
+ rscreen->screen.get_video_param = r600_uvd_get_video_param;
rscreen->screen.is_video_format_supported = ruvd_is_format_supported;
} else {
rscreen->screen.get_video_param = r600_get_video_param;
struct pipe_video_buffer *r600_video_buffer_create(struct pipe_context *pipe,
const struct pipe_video_buffer *tmpl);
+int r600_uvd_get_video_param(struct pipe_screen *screen,
+ enum pipe_video_profile profile,
+ enum pipe_video_cap param);
/*
* Helpers for building command buffers
width, height, max_references, expect_chunked_decode,
ctx->ws, r600_uvd_set_dtb);
}
+
+int r600_uvd_get_video_param(struct pipe_screen *screen,
+ enum pipe_video_profile profile,
+ enum pipe_video_cap param)
+{
+ struct r600_screen *rscreen = (struct r600_screen *)screen;
+
+ /* No support for MPEG4 on UVD 2.x */
+ if (param == PIPE_VIDEO_CAP_SUPPORTED && rscreen->family < CHIP_CEDAR &&
+ u_reduce_video_profile(profile) == PIPE_VIDEO_CODEC_MPEG4)
+ return false;
+
+ return ruvd_get_video_param(screen, profile, param);
+}
switch (u_reduce_video_profile(profile)) {
case PIPE_VIDEO_CODEC_MPEG12:
case PIPE_VIDEO_CODEC_MPEG4:
- /* TODO not all hw families support MPEG4 */
case PIPE_VIDEO_CODEC_MPEG4_AVC:
case PIPE_VIDEO_CODEC_VC1:
return true;