Adding a function for converting h264 pipe video profile to profile idc
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Christian König <christian.koenig at amd.com>
return 52;
}
+static inline uint32_t
+u_get_h264_profile_idc(enum pipe_video_profile profile)
+{
+ switch (profile) {
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
+ return 66;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
+ return 77;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED:
+ return 88;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
+ return 100;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10:
+ return 110;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422:
+ return 122;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444:
+ return 244;
+ default:
+ return 66; //use baseline profile instead
+ }
+}
+
#ifdef __cplusplus
}
#endif