[FFmpeg-devel] [PATCH] Replace remaining occurrences of deprecated CH_* with AV_CH_*

Anton Khirnov anton
Thu Feb 3 13:56:59 CET 2011


---
 libavcodec/ac3_parser.c  |    2 +-
 libavcodec/apedec.c      |    2 +-
 libavcodec/cook.c        |    2 +-
 libavcodec/dca.c         |    4 ++--
 libavcodec/imc.c         |    2 +-
 libavcodec/mpc7.c        |    2 +-
 libavcodec/mpc8.c        |    2 +-
 libavcodec/smacker.c     |    2 +-
 libavcodec/vorbis_data.c |   16 ++++++++--------
 libavcodec/wavpack.c     |    2 +-
 libavformat/aea.c        |    2 +-
 libavformat/flic.c       |    2 +-
 libavformat/wv.c         |    2 +-
 13 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 4737d6f..cbe2278 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -123,7 +123,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
     }
     hdr->channel_layout = ff_ac3_channel_layout_tab[hdr->channel_mode];
     if (hdr->lfe_on)
-        hdr->channel_layout |= CH_LOW_FREQUENCY;
+        hdr->channel_layout |= AV_CH_LOW_FREQUENCY;
 
     return 0;
 }
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index b6d6f9d..0fa12c9 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -199,7 +199,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
 
     dsputil_init(&s->dsp, avctx);
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+    avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
     return 0;
 }
 
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 6b70560..e128bdf 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1274,7 +1274,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
     if (channel_mask)
         avctx->channel_layout = channel_mask;
     else
-        avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+        avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
 
 #ifdef COOKDEBUG
     dump_cook_context(q);
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 63ea329..67195b1 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -106,7 +106,7 @@ enum DCAExtensionMask {
  * L = left, R = right, C = center, S = surround, F = front, R = rear, T = total, OV = overhead.
  * S  -> side, when both rear and back are configured move one of them to the side channel
  * OV -> center back
- * All 2 channel configurations -> CH_LAYOUT_STEREO
+ * All 2 channel configurations -> AV_CH_LAYOUT_STEREO
  */
 
 static const int64_t dca_core_channel_layout[] = {
@@ -117,7 +117,7 @@ static const int64_t dca_core_channel_layout[] = {
     AV_CH_LAYOUT_STEREO,                                                     ///< 2, LT +RT (left and right total)
     AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER,                                  ///< 3, C+L+R
     AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER,                                   ///< 3, L+R+S
-    AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|CH_BACK_CENTER,                   ///< 4, C + L + R+ S
+    AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_BACK_CENTER,                ///< 4, C + L + R+ S
     AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT,                    ///< 4, L + R +SL+ SR
     AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 5, C + L + R+ SL+SR
     AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER,                    ///< 6, CL + CR + L + R + SL + SR
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 4d7fbd1..2e831fb 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -157,7 +157,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx)
     ff_fft_init(&q->fft, 7, 1);
     dsputil_init(&q->dsp, avctx);
     avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+    avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
     return 0;
 }
 
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index a77648f..bba4a2a 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -86,7 +86,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
     c->frames_to_skip = 0;
 
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+    avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
 
     if(vlc_initialized) return 0;
     av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 327a0c0..6a76f58 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -135,7 +135,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
     c->frames = 1 << (get_bits(&gb, 3) * 2);
 
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+    avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
 
     if(vlc_initialized) return 0;
     av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index fa8b4e3..3f4a900 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -554,7 +554,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
 
 static av_cold int smka_decode_init(AVCodecContext *avctx)
 {
-    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+    avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
     avctx->sample_fmt = avctx->bits_per_coded_sample == 8 ? AV_SAMPLE_FMT_U8 : AV_SAMPLE_FMT_S16;
     return 0;
 }
diff --git a/libavcodec/vorbis_data.c b/libavcodec/vorbis_data.c
index 24c9921..1ef76fa 100644
--- a/libavcodec/vorbis_data.c
+++ b/libavcodec/vorbis_data.c
@@ -44,14 +44,14 @@ const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = {
 };
 
 const int64_t ff_vorbis_channel_layouts[9] = {
-    CH_LAYOUT_MONO,
-    CH_LAYOUT_STEREO,
-    CH_LAYOUT_SURROUND,
-    CH_LAYOUT_QUAD,
-    CH_LAYOUT_5POINT0_BACK,
-    CH_LAYOUT_5POINT1_BACK,
-    CH_LAYOUT_5POINT1|CH_BACK_CENTER,
-    CH_LAYOUT_7POINT1,
+    AV_CH_LAYOUT_MONO,
+    AV_CH_LAYOUT_STEREO,
+    AV_CH_LAYOUT_SURROUND,
+    AV_CH_LAYOUT_QUAD,
+    AV_CH_LAYOUT_5POINT0_BACK,
+    AV_CH_LAYOUT_5POINT1_BACK,
+    AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER,
+    AV_CH_LAYOUT_7POINT1,
     0
 };
 
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index e969814..832586b 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -706,7 +706,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx)
     else
         avctx->sample_fmt = AV_SAMPLE_FMT_S32;
     if(avctx->channels <= 2 && !avctx->channel_layout)
-        avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
+        avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
 
     s->multichannel = avctx->channels > 2;
     /* lavf demuxer does not provide extradata, Matroska stores 0x403
diff --git a/libavformat/aea.c b/libavformat/aea.c
index 6816506..2c7a928 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -76,7 +76,7 @@ static int aea_read_header(AVFormatContext *s,
         return -1;
     }
 
-    st->codec->channel_layout = (st->codec->channels == 1) ? CH_LAYOUT_MONO : CH_LAYOUT_STEREO;
+    st->codec->channel_layout = (st->codec->channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
 
     st->codec->block_align = AT1_SU_SIZE * st->codec->channels;
     return 0;
diff --git a/libavformat/flic.c b/libavformat/flic.c
index bf93c5c..927ee50 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -160,7 +160,7 @@ static int flic_read_header(AVFormatContext *s,
         ast->codec->sample_fmt = AV_SAMPLE_FMT_U8;
         ast->codec->bit_rate = st->codec->sample_rate * 8;
         ast->codec->bits_per_coded_sample = 8;
-        ast->codec->channel_layout = CH_LAYOUT_MONO;
+        ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
         ast->codec->extradata_size = 0;
 
         /* Since the header information is incorrect we have to figure out the
diff --git a/libavformat/wv.c b/libavformat/wv.c
index 667ae2e..807a17e 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -111,7 +111,7 @@ static int wv_read_block_header(AVFormatContext *ctx, ByteIOContext *pb, int app
     //parse flags
     bpp = ((wc->flags & 3) + 1) << 3;
     chan = 1 + !(wc->flags & WV_MONO);
-    chmask = wc->flags & WV_MONO ? CH_LAYOUT_MONO : CH_LAYOUT_STEREO;
+    chmask = wc->flags & WV_MONO ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
     rate = wv_rates[(wc->flags >> 23) & 0xF];
     wc->multichannel = !!((wc->flags & WV_SINGLE_BLOCK) != WV_SINGLE_BLOCK);
     if(wc->multichannel){
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list