Path: blob/master/dep/ffmpeg/include/libavutil/downmix_info.h
4216 views
/*1* Copyright (c) 2014 Tim Walker <[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_DOWNMIX_INFO_H21#define AVUTIL_DOWNMIX_INFO_H2223#include "frame.h"2425/**26* @file27* audio downmix medatata28*/2930/**31* @addtogroup lavu_audio32* @{33*/3435/**36* @defgroup downmix_info Audio downmix metadata37* @{38*/3940/**41* Possible downmix types.42*/43enum AVDownmixType {44AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */45AV_DOWNMIX_TYPE_LORO, /**< Lo/Ro 2-channel downmix (Stereo). */46AV_DOWNMIX_TYPE_LTRT, /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */47AV_DOWNMIX_TYPE_DPLII, /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */48AV_DOWNMIX_TYPE_NB /**< Number of downmix types. Not part of ABI. */49};5051/**52* This structure describes optional metadata relevant to a downmix procedure.53*54* All fields are set by the decoder to the value indicated in the audio55* bitstream (if present), or to a "sane" default otherwise.56*/57typedef struct AVDownmixInfo {58/**59* Type of downmix preferred by the mastering engineer.60*/61enum AVDownmixType preferred_downmix_type;6263/**64* Absolute scale factor representing the nominal level of the center65* channel during a regular downmix.66*/67double center_mix_level;6869/**70* Absolute scale factor representing the nominal level of the center71* channel during an Lt/Rt compatible downmix.72*/73double center_mix_level_ltrt;7475/**76* Absolute scale factor representing the nominal level of the surround77* channels during a regular downmix.78*/79double surround_mix_level;8081/**82* Absolute scale factor representing the nominal level of the surround83* channels during an Lt/Rt compatible downmix.84*/85double surround_mix_level_ltrt;8687/**88* Absolute scale factor representing the level at which the LFE data is89* mixed into L/R channels during downmixing.90*/91double lfe_mix_level;92} AVDownmixInfo;9394/**95* Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.96*97* If the side data is absent, it is created and added to the frame.98*99* @param frame the frame for which the side data is to be obtained or created100*101* @return the AVDownmixInfo structure to be edited by the caller, or NULL if102* the structure cannot be allocated.103*/104AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame);105106/**107* @}108*/109110/**111* @}112*/113114#endif /* AVUTIL_DOWNMIX_INFO_H */115116117