[03/20] radeon/video: add mjpeg support

Submitted by Leo Liu on Aug. 15, 2017, 8:08 p.m.

Details

Message ID 20170815200838.27706-4-leo.liu@amd.com
State New
Headers show
Series "radeon/uvd: get the target buffer pitch correct for different format" ( rev: 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Leo Liu Aug. 15, 2017, 8:08 p.m.
Signed-off-by: Leo Liu <leo.liu@amd.com>
---
 src/gallium/auxiliary/util/u_video.h      | 3 +++
 src/gallium/drivers/radeon/radeon_video.c | 2 ++
 2 files changed, 5 insertions(+)

Patch hide | download patch | download mbox

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;
 		}