/** * Copyright (c) 2018 Mohammad Izadi <moh.izadi at gmail.com> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avassert.h" #include "hdr_dynamic_metadata.h" #include "mem.h" #include "libavcodec/defs.h" #include "libavcodec/get_bits.h" #include "libavcodec/put_bits.h" static const int64_t luminance_den = …; static const int32_t peak_luminance_den = …; static const int64_t rgb_den = …; static const int32_t fraction_pixel_den = …; static const int32_t knee_point_den = …; static const int32_t bezier_anchor_den = …; static const int32_t saturation_weight_den = …; AVDynamicHDRPlus *av_dynamic_hdr_plus_alloc(size_t *size) { … } AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame) { … } int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size) { … } int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t *size) { … }