aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca.c
diff options
context:
space:
mode:
authorAndreas Öman <andreas@lonelycoder.com>2008-11-02 21:04:28 +0000
committerAndreas Öman <andreas@lonelycoder.com>2008-11-02 21:04:28 +0000
commit9d9b9d32e61930681d632b38157af9d5efe39355 (patch)
treee7fff53174403a3943b7dcc907bd5db2457829c9 /libavcodec/dca.c
parent7cebed70a807a9e595ed4e9bb7e0bcc049911550 (diff)
downloadffmpeg-9d9b9d32e61930681d632b38157af9d5efe39355.tar.gz
Change multichannel API define prefix from "CHANNEL_" to "CH_".
Originally committed as revision 15768 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dca.c')
-rw-r--r--libavcodec/dca.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 0c6e865f7d..4161b5b5bb 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -66,41 +66,41 @@ enum DCAMode {
* L = left, R = right, C = center, S = surround, F = front, R = rear, T = total, OV = overhead.
* S -> back, when both rear and back are configured move one of them to the side channel
* OV -> center back
- * All 2 channel configurations -> CHANNEL_LAYOUT_STEREO
+ * All 2 channel configurations -> CH_LAYOUT_STEREO
*/
static const int64_t dca_core_channel_layout[] = {
- CHANNEL_FRONT_CENTER, ///< 1, A
- CHANNEL_LAYOUT_STEREO, ///< 2, A + B (dual mono)
- CHANNEL_LAYOUT_STEREO, ///< 2, L + R (stereo)
- CHANNEL_LAYOUT_STEREO, ///< 2, (L+R) + (L-R) (sum-difference)
- CHANNEL_LAYOUT_STEREO, ///< 2, LT +RT (left and right total)
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER, ///< 3, C+L+R
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_CENTER, ///< 3, L+R+S
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER|CHANNEL_BACK_CENTER, ///< 4, C + L + R+ S
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT, ///< 4, L + R+ SL+SR
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT, ///< 5, C + L + R+ SL+SR
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER, ///< 6, CL + CR + L + R + SL + SR
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_FRONT_CENTER|CHANNEL_BACK_CENTER, ///< 6, C + L + R+ LR + RR + OV
- CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_BACK_CENTER|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT, ///< 6, CF+ CR+LF+ RF+LR + RR
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT, ///< 7, CL + C + CR + L + R + SL + SR
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_SIDE_LEFT|CHANNEL_SIDE_RIGHT|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT, ///< 8, CL + CR + L + R + SL1 + SL2+ SR1 + SR2
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_CENTER|CHANNEL_BACK_RIGHT, ///< 8, CL + C+ CR + L + R + SL + S+ SR
+ CH_FRONT_CENTER, ///< 1, A
+ CH_LAYOUT_STEREO, ///< 2, A + B (dual mono)
+ CH_LAYOUT_STEREO, ///< 2, L + R (stereo)
+ CH_LAYOUT_STEREO, ///< 2, (L+R) + (L-R) (sum-difference)
+ CH_LAYOUT_STEREO, ///< 2, LT +RT (left and right total)
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER, ///< 3, C+L+R
+ CH_LAYOUT_STEREO|CH_BACK_CENTER, ///< 3, L+R+S
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER|CH_BACK_CENTER, ///< 4, C + L + R+ S
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT, ///< 4, L + R+ SL+SR
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER|CH_BACK_LEFT|CH_BACK_RIGHT, ///< 5, C + L + R+ SL+SR
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER, ///< 6, CL + CR + L + R + SL + SR
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_FRONT_CENTER|CH_BACK_CENTER, ///< 6, C + L + R+ LR + RR + OV
+ CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_FRONT_LEFT_OF_CENTER|CH_BACK_CENTER|CH_BACK_LEFT|CH_BACK_RIGHT, ///< 6, CF+ CR+LF+ RF+LR + RR
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT, ///< 7, CL + C + CR + L + R + SL + SR
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_SIDE_LEFT|CH_SIDE_RIGHT|CH_BACK_LEFT|CH_BACK_RIGHT, ///< 8, CL + CR + L + R + SL1 + SL2+ SR1 + SR2
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_CENTER|CH_BACK_RIGHT, ///< 8, CL + C+ CR + L + R + SL + S+ SR
/* The following entries adds the LFE layouts, this way we can reuse the table for the AVCodec channel_layouts member*/
- CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER|CHANNEL_BACK_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_FRONT_CENTER|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_FRONT_CENTER|CHANNEL_BACK_CENTER|CHANNEL_LOW_FREQUENCY,
- CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_BACK_CENTER|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_SIDE_LEFT|CHANNEL_SIDE_RIGHT|CHANNEL_BACK_LEFT|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
- CHANNEL_FRONT_LEFT_OF_CENTER|CHANNEL_FRONT_CENTER|CHANNEL_FRONT_RIGHT_OF_CENTER|CHANNEL_LAYOUT_STEREO|CHANNEL_BACK_LEFT|CHANNEL_BACK_CENTER|CHANNEL_BACK_RIGHT|CHANNEL_LOW_FREQUENCY,
+ CH_FRONT_CENTER|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_BACK_CENTER|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER|CH_BACK_CENTER|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_FRONT_CENTER|CH_BACK_LEFT|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LOW_FREQUENCY,
+ CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_FRONT_CENTER|CH_BACK_CENTER|CH_LOW_FREQUENCY,
+ CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_FRONT_LEFT_OF_CENTER|CH_BACK_CENTER|CH_BACK_LEFT|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_SIDE_LEFT|CH_SIDE_RIGHT|CH_BACK_LEFT|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
+ CH_FRONT_LEFT_OF_CENTER|CH_FRONT_CENTER|CH_FRONT_RIGHT_OF_CENTER|CH_LAYOUT_STEREO|CH_BACK_LEFT|CH_BACK_CENTER|CH_BACK_RIGHT|CH_LOW_FREQUENCY,
0,
};
@@ -1211,12 +1211,12 @@ static int dca_decode_frame(AVCodecContext * avctx,
if(avctx->request_channels == 2 && s->prim_channels > 2) {
channels = 2;
s->output = DCA_STEREO;
- avctx->channel_layout = CHANNEL_LAYOUT_STEREO;
+ avctx->channel_layout = CH_LAYOUT_STEREO;
}
if (s->amode<16)
avctx->channel_layout = dca_core_channel_layout[s->amode];
- if (s->lfe) avctx->channel_layout |= CHANNEL_LOW_FREQUENCY;
+ if (s->lfe) avctx->channel_layout |= CH_LOW_FREQUENCY;
/* There is nothing that prevents a dts frame to change channel configuration
but FFmpeg doesn't support that so only set the channels if it is previously