[FFmpeg-devel] [PATCHv6 4/4] libavcodec: v4l2: add support for v4l2 mem2mem codecs
Jorge Ramirez
jorge.ramirez-ortiz at linaro.org
Mon Aug 28 20:00:40 EEST 2017
On 08/25/2017 05:35 PM, wm4 wrote:
>> +static inline int v4l2_h264_profile_from_ff(int p)
>> +{
>> + switch(p) {
>> + case FF_PROFILE_H264_CONSTRAINED_BASELINE:
>> + return MPEG_VIDEO(H264_PROFILE_CONSTRAINED_BASELINE);
>> + case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_444_PREDICTIVE);
>> + case FF_PROFILE_H264_HIGH_422_INTRA:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_422_INTRA);
>> + case FF_PROFILE_H264_HIGH_444_INTRA:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_444_INTRA);
>> + case FF_PROFILE_H264_HIGH_10_INTRA:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_10_INTRA);
>> + case FF_PROFILE_H264_HIGH_422:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_422);
>> + case FF_PROFILE_H264_BASELINE:
>> + return MPEG_VIDEO(H264_PROFILE_BASELINE);
>> + case FF_PROFILE_H264_EXTENDED:
>> + return MPEG_VIDEO(H264_PROFILE_EXTENDED);
>> + case FF_PROFILE_H264_HIGH_10:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH_10);
>> + case FF_PROFILE_H264_MAIN:
>> + return MPEG_VIDEO(H264_PROFILE_MAIN);
>> + case FF_PROFILE_H264_HIGH:
>> + return MPEG_VIDEO(H264_PROFILE_HIGH);
>> + }
>> +
>> + return -1;
>> +}
>> +
>> +static inline int v4l2_mpeg4_profile_from_ff(int p)
>> +{
>> + switch(p) {
>> + case FF_PROFILE_MPEG4_ADVANCED_CODING:
>> + return MPEG_VIDEO(MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY);
>> + case FF_PROFILE_MPEG4_ADVANCED_SIMPLE:
>> + return MPEG_VIDEO(MPEG4_PROFILE_ADVANCED_SIMPLE);
>> + case FF_PROFILE_MPEG4_SIMPLE_SCALABLE:
>> +
>> + return MPEG_VIDEO(MPEG4_PROFILE_SIMPLE_SCALABLE);
>> + case FF_PROFILE_MPEG4_SIMPLE:
>> + return MPEG_VIDEO(MPEG4_PROFILE_SIMPLE);
>> + case FF_PROFILE_MPEG4_CORE:
>> + return MPEG_VIDEO(MPEG4_PROFILE_CORE);
>> + }
>> +
>> + return -1;
>> +}
> Would a table be better maybe?
>
ok, switch replace with tables.
More information about the ffmpeg-devel
mailing list