2014-02-15 17:12:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Tim Walker <tdskywalker@gmail.com>
|
|
|
|
*
|
2014-02-16 01:05:29 +00:00
|
|
|
* This file is part of FFmpeg.
|
2014-02-15 17:12:22 +00:00
|
|
|
*
|
2014-02-16 01:05:29 +00:00
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2014-02-15 17:12:22 +00:00
|
|
|
* 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.
|
|
|
|
*
|
2014-02-16 01:05:29 +00:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2014-02-15 17:12:22 +00:00
|
|
|
* 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
|
2014-02-16 01:05:29 +00:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2014-02-15 17:12:22 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AVUTIL_DOWNMIX_INFO_H
|
|
|
|
#define AVUTIL_DOWNMIX_INFO_H
|
|
|
|
|
|
|
|
#include "frame.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* audio downmix medatata
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup lavu_audio
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup downmix_info Audio downmix metadata
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Possible downmix types.
|
|
|
|
*/
|
|
|
|
enum AVDownmixType {
|
|
|
|
AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */
|
|
|
|
AV_DOWNMIX_TYPE_LORO, /**< Lo/Ro 2-channel downmix (Stereo). */
|
|
|
|
AV_DOWNMIX_TYPE_LTRT, /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */
|
|
|
|
AV_DOWNMIX_TYPE_DPLII, /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */
|
|
|
|
AV_DOWNMIX_TYPE_NB /**< Number of downmix types. Not part of ABI. */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This structure describes optional metadata relevant to a downmix procedure.
|
|
|
|
*
|
|
|
|
* All fields are set by the decoder to the value indicated in the audio
|
|
|
|
* bitstream (if present), or to a "sane" default otherwise.
|
|
|
|
*/
|
|
|
|
typedef struct AVDownmixInfo {
|
|
|
|
/**
|
|
|
|
* Type of downmix preferred by the mastering engineer.
|
|
|
|
*/
|
|
|
|
enum AVDownmixType preferred_downmix_type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Absolute scale factor representing the nominal level of the center
|
|
|
|
* channel during a regular downmix.
|
|
|
|
*/
|
|
|
|
double center_mix_level;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Absolute scale factor representing the nominal level of the center
|
|
|
|
* channel during an Lt/Rt compatible downmix.
|
|
|
|
*/
|
|
|
|
double center_mix_level_ltrt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Absolute scale factor representing the nominal level of the surround
|
|
|
|
* channels during a regular downmix.
|
|
|
|
*/
|
|
|
|
double surround_mix_level;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Absolute scale factor representing the nominal level of the surround
|
|
|
|
* channels during an Lt/Rt compatible downmix.
|
|
|
|
*/
|
|
|
|
double surround_mix_level_ltrt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Absolute scale factor representing the level at which the LFE data is
|
|
|
|
* mixed into L/R channels during downmixing.
|
|
|
|
*/
|
|
|
|
double lfe_mix_level;
|
|
|
|
} AVDownmixInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
|
|
|
|
*
|
|
|
|
* The side data is created and added to the frame if it's absent.
|
|
|
|
*
|
|
|
|
* @param frame the frame for which the side data is to be obtained.
|
|
|
|
*
|
|
|
|
* @return the AVDownmixInfo structure to be edited by the caller.
|
|
|
|
*/
|
|
|
|
AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#endif /* AVUTIL_DOWNMIX_INFO_H */
|