Add MPEG 4 codec
This patch introduces the support of MPEG4 video decoding. It basically just copies data from VA's frame/slice headers data structures to v4l's MPEG4 frame header extended controls data structures.
This commit is contained in:
@@ -56,6 +56,12 @@ VAStatus sunxi_cedrus_QueryConfigProfiles(VADriverContextP ctx,
|
||||
profile_list[i++] = VAProfileMPEG2Simple;
|
||||
profile_list[i++] = VAProfileMPEG2Main;
|
||||
break;
|
||||
case V4L2_PIX_FMT_MPEG4_FRAME:
|
||||
profile_list[i++] = VAProfileMPEG4Simple;
|
||||
profile_list[i++] = VAProfileMPEG4AdvancedSimple;
|
||||
profile_list[i++] = VAProfileMPEG4Main;
|
||||
break;
|
||||
}
|
||||
vid_fmtdesc.index++;
|
||||
}
|
||||
|
||||
@@ -77,6 +83,13 @@ VAStatus sunxi_cedrus_QueryConfigEntrypoints(VADriverContextP ctx,
|
||||
entrypoint_list[1] = VAEntrypointMoComp;
|
||||
break;
|
||||
|
||||
case VAProfileMPEG4Simple:
|
||||
case VAProfileMPEG4AdvancedSimple:
|
||||
case VAProfileMPEG4Main:
|
||||
*num_entrypoints = 1;
|
||||
entrypoint_list[0] = VAEntrypointVLD;
|
||||
break;
|
||||
|
||||
default:
|
||||
*num_entrypoints = 0;
|
||||
break;
|
||||
@@ -156,6 +169,15 @@ VAStatus sunxi_cedrus_CreateConfig(VADriverContextP ctx, VAProfile profile,
|
||||
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
|
||||
break;
|
||||
|
||||
case VAProfileMPEG4Simple:
|
||||
case VAProfileMPEG4AdvancedSimple:
|
||||
case VAProfileMPEG4Main:
|
||||
if (VAEntrypointVLD == entrypoint)
|
||||
vaStatus = VA_STATUS_SUCCESS;
|
||||
else
|
||||
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
|
||||
break;
|
||||
|
||||
default:
|
||||
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user