Path: blob/master/dep/ffmpeg/include/libavutil/ambient_viewing_environment.h
4216 views
/*1* Copyright (c) 2023 Jan Ekström <[email protected]>2*3* This file is part of FFmpeg.4*5* FFmpeg is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* FFmpeg is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with FFmpeg; if not, write to the Free Software17* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18*/1920#ifndef AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H21#define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H2223#include <stddef.h>24#include "frame.h"25#include "rational.h"2627/**28* Ambient viewing environment metadata as defined by H.274. The values are29* saved in AVRationals so that they keep their exactness, while allowing for30* easy access to a double value with f.ex. av_q2d.31*32* @note sizeof(AVAmbientViewingEnvironment) is not part of the public ABI, and33* it must be allocated using av_ambient_viewing_environment_alloc.34*/35typedef struct AVAmbientViewingEnvironment {36/**37* Environmental illuminance of the ambient viewing environment in lux.38*/39AVRational ambient_illuminance;4041/**42* Normalized x chromaticity coordinate of the environmental ambient light43* in the nominal viewing environment according to the CIE 1931 definition44* of x and y as specified in ISO/CIE 11664-1.45*/46AVRational ambient_light_x;4748/**49* Normalized y chromaticity coordinate of the environmental ambient light50* in the nominal viewing environment according to the CIE 1931 definition51* of x and y as specified in ISO/CIE 11664-1.52*/53AVRational ambient_light_y;54} AVAmbientViewingEnvironment;5556/**57* Allocate an AVAmbientViewingEnvironment structure.58*59* @return the newly allocated struct or NULL on failure60*/61AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t *size);6263/**64* Allocate and add an AVAmbientViewingEnvironment structure to an existing65* AVFrame as side data.66*67* @return the newly allocated struct, or NULL on failure68*/69AVAmbientViewingEnvironment *av_ambient_viewing_environment_create_side_data(AVFrame *frame);7071#endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */727374