[Mesa-dev] [PATCH 03/20] radeon/video: add mjpeg support

Leo Liu leo.liu at amd.com
Tue Aug 15 20:08:21 UTC 2017


Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 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;
 		}
-- 
2.11.0



More information about the mesa-dev mailing list