/*1* Copyright (c) 2015 Kevin Wheatley <[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_COLOR_UTILS_H21#define AVUTIL_COLOR_UTILS_H222324#include "libavutil/pixfmt.h"2526/**27* Determine a suitable 'gamma' value to match the supplied28* AVColorTransferCharacteristic.29*30* See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html)31*32* @return Will return an approximation to the simple gamma function matching33* the supplied Transfer Characteristic, Will return 0.0 for any34* we cannot reasonably match against.35*/36double avpriv_get_gamma_from_trc(enum AVColorTransferCharacteristic trc);373839typedef double (*avpriv_trc_function)(double);4041/**42* Determine the function needed to apply the given43* AVColorTransferCharacteristic to linear input.44*45* The function returned should expect a nominal domain and range of [0.0-1.0]46* values outside of this range maybe valid depending on the chosen47* characteristic function.48*49* @return Will return pointer to the function matching the50* supplied Transfer Characteristic. If unspecified will51* return NULL:52*/53avpriv_trc_function avpriv_get_trc_function_from_trc(enum AVColorTransferCharacteristic trc);5455#endif565758