| 222 | } |
| 223 | |
| 224 | static int handle_side_data(AVCodecContext *avctx, const x265_api *api, |
| 225 | x265_param *params) |
| 226 | { |
| 227 | const AVFrameSideData *cll_sd = |
| 228 | av_frame_side_data_get(avctx->decoded_side_data, |
| 229 | avctx->nb_decoded_side_data, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); |
| 230 | const AVFrameSideData *mdcv_sd = |
| 231 | av_frame_side_data_get(avctx->decoded_side_data, |
| 232 | avctx->nb_decoded_side_data, |
| 233 | AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); |
| 234 | |
| 235 | if (cll_sd) { |
| 236 | const AVContentLightMetadata *cll = |
| 237 | (AVContentLightMetadata *)cll_sd->data; |
| 238 | |
| 239 | params->maxCLL = cll->MaxCLL; |
| 240 | params->maxFALL = cll->MaxFALL; |
| 241 | } |
| 242 | |
| 243 | if (mdcv_sd) { |
| 244 | int ret = handle_mdcv( |
| 245 | avctx, api, params, |
| 246 | (AVMasteringDisplayMetadata *)mdcv_sd->data); |
| 247 | if (ret < 0) |
| 248 | return ret; |
| 249 | } |
| 250 | |
| 251 | return 0; |
| 252 | } |
| 253 | |
| 254 | static int get_x265_log_level(AVCodecContext *avctx) |
| 255 | { |
no test coverage detected