summaryrefslogtreecommitdiff
path: root/libavcodec/mlpdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
commit7a72695c05f12f21a62dc99fa64d1726fc11b236 (patch)
treee8f1a2813c4cd1fd8bd0ac5f764c7fd676ab85af /libavcodec/mlpdec.c
parent49440853d0c1e740daee0e2df1e65d5e67b1ad6b (diff)
parent36ef5369ee9b336febc2c270f8718cec4476cb85 (diff)
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r--libavcodec/mlpdec.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 24a6d8deb4..423872cede 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -297,7 +297,7 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
if (mh.num_substreams == 0)
return AVERROR_INVALIDDATA;
- if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && mh.num_substreams > 2) {
av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n");
return AVERROR_INVALIDDATA;
}
@@ -363,7 +363,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
uint8_t checksum;
uint8_t lossless_check;
int start_count = get_bits_count(gbp);
- const int max_matrix_channel = m->avctx->codec_id == CODEC_ID_MLP
+ const int max_matrix_channel = m->avctx->codec_id == AV_CODEC_ID_MLP
? MAX_MATRIX_CHANNEL_MLP
: MAX_MATRIX_CHANNEL_TRUEHD;
int max_channel, min_channel, matrix_channel;
@@ -378,7 +378,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->noise_type = get_bits1(gbp);
- if (m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && s->noise_type) {
av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n");
return AVERROR_INVALIDDATA;
}
@@ -462,7 +462,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->ch_assign[ch_assign] = ch;
}
- if (m->avctx->codec_id == CODEC_ID_MLP && m->needs_reordering) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && m->needs_reordering) {
if (m->avctx->channel_layout == (AV_CH_LAYOUT_QUAD|AV_CH_LOW_FREQUENCY) ||
m->avctx->channel_layout == AV_CH_LAYOUT_5POINT0_BACK) {
int i = s->ch_assign[4];
@@ -474,12 +474,12 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
FFSWAP(int, s->ch_assign[3], s->ch_assign[5]);
}
}
- if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
+ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD &&
(m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1 ||
m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1_WIDE)) {
FFSWAP(int, s->ch_assign[4], s->ch_assign[6]);
FFSWAP(int, s->ch_assign[5], s->ch_assign[7]);
- } else if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
+ } else if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD &&
(m->avctx->channel_layout == AV_CH_LAYOUT_6POINT1 ||
m->avctx->channel_layout == (AV_CH_LAYOUT_6POINT1 | AV_CH_TOP_CENTER) ||
m->avctx->channel_layout == (AV_CH_LAYOUT_6POINT1 | AV_CH_TOP_FRONT_CENTER))) {
@@ -604,7 +604,7 @@ static int read_matrix_params(MLPDecodeContext *m, unsigned int substr, GetBitCo
{
SubStream *s = &m->substream[substr];
unsigned int mat, ch;
- const int max_primitive_matrices = m->avctx->codec_id == CODEC_ID_MLP
+ const int max_primitive_matrices = m->avctx->codec_id == AV_CODEC_ID_MLP
? MAX_MATRICES_MLP
: MAX_MATRICES_TRUEHD;
@@ -1059,7 +1059,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
substr_header_size += 2;
if (extraword_present) {
- if (m->avctx->codec_id == CODEC_ID_MLP) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP) {
av_log(m->avctx, AV_LOG_ERROR, "There must be no extraword for MLP.\n");
goto error;
}
@@ -1148,9 +1148,9 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
return AVERROR_INVALIDDATA;
shorten_by = get_bits(&gb, 16);
- if (m->avctx->codec_id == CODEC_ID_TRUEHD && shorten_by & 0x2000)
+ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD && shorten_by & 0x2000)
s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos);
- else if (m->avctx->codec_id == CODEC_ID_MLP && shorten_by != 0xD234)
+ else if (m->avctx->codec_id == AV_CODEC_ID_MLP && shorten_by != 0xD234)
return AVERROR_INVALIDDATA;
if (substr == m->max_decoded_substream)
@@ -1203,7 +1203,7 @@ error:
AVCodec ff_mlp_decoder = {
.name = "mlp",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MLP,
+ .id = AV_CODEC_ID_MLP,
.priv_data_size = sizeof(MLPDecodeContext),
.init = mlp_decode_init,
.decode = read_access_unit,
@@ -1215,7 +1215,7 @@ AVCodec ff_mlp_decoder = {
AVCodec ff_truehd_decoder = {
.name = "truehd",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_TRUEHD,
+ .id = AV_CODEC_ID_TRUEHD,
.priv_data_size = sizeof(MLPDecodeContext),
.init = mlp_decode_init,
.decode = read_access_unit,