MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / handle_side_data

Function handle_side_data

libavcodec/libx264.c:1036–1061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1034#endif // CONFIG_LIBX264_HDR10
1035
1036static void handle_side_data(AVCodecContext *avctx, x264_param_t *params)
1037{
1038#if CONFIG_LIBX264_HDR10
1039 const AVFrameSideData *cll_sd =
1040 av_frame_side_data_get(avctx->decoded_side_data,
1041 avctx->nb_decoded_side_data, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL);
1042 const AVFrameSideData *mdcv_sd =
1043 av_frame_side_data_get(avctx->decoded_side_data,
1044 avctx->nb_decoded_side_data,
1045 AV_FRAME_DATA_MASTERING_DISPLAY_METADATA);
1046
1047 if (cll_sd) {
1048 const AVContentLightMetadata *cll =
1049 (AVContentLightMetadata *)cll_sd->data;
1050
1051 params->content_light_level.i_max_cll = cll->MaxCLL;
1052 params->content_light_level.i_max_fall = cll->MaxFALL;
1053
1054 params->content_light_level.b_cll = 1;
1055 }
1056
1057 if (mdcv_sd) {
1058 handle_mdcv(params, (AVMasteringDisplayMetadata *)mdcv_sd->data);
1059 }
1060#endif // CONFIG_LIBX264_HDR10
1061}
1062
1063static av_cold int X264_init(AVCodecContext *avctx)
1064{

Callers 1

X264_initFunction · 0.70

Calls 2

av_frame_side_data_getFunction · 0.85
handle_mdcvFunction · 0.70

Tested by

no test coverage detected