From patchwork Tue Aug 15 20:08:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/20] radeon/video: add mjpeg support From: Leo Liu X-Patchwork-Id: 171925 Message-Id: <20170815200838.27706-4-leo.liu@amd.com> To: mesa-dev@lists.freedesktop.org Date: Tue, 15 Aug 2017 16:08:21 -0400 Signed-off-by: Leo Liu --- src/gallium/auxiliary/util/u_video.h | 3 +++ src/gallium/drivers/radeon/radeon_video.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h index 251e144c79..0f2e969904 100644 --- a/src/gallium/auxiliary/util/u_video.h +++ b/src/gallium/auxiliary/util/u_video.h @@ -76,6 +76,9 @@ u_reduce_video_profile(enum pipe_video_profile profile) case PIPE_VIDEO_PROFILE_HEVC_MAIN_444: return PIPE_VIDEO_FORMAT_HEVC; + case PIPE_VIDEO_PROFILE_MJPEG_BASELINE: + return PIPE_VIDEO_FORMAT_MJPEG; + default: return PIPE_VIDEO_FORMAT_UNKNOWN; } diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index f7a1c4743d..0cff2a0df9 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -280,6 +280,8 @@ int rvid_get_video_param(struct pipe_screen *screen, profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10); else if (rscreen->family >= CHIP_CARRIZO) return profile == PIPE_VIDEO_PROFILE_HEVC_MAIN; + case PIPE_VIDEO_FORMAT_MJPEG: + return true; default: return false; }