History

Replace remaining occurrences of deprecated CH_* with AV_CH_*

Anton Khirnov committed 15 years ago

Commit c2fcd0a1 parent ad3cffb14 files · +34 −21Browse files

Unified · Split

14 files
  1. libavcodec/ac3_parser.c +2 −1
  2. libavcodec/apedec.c +2 −1
  3. libavcodec/audioconvert.h +1 −0
  4. libavcodec/cook.c +2 −1
  5. libavcodec/dca.c +2 −2
  6. libavcodec/imc.c +2 −1
  7. libavcodec/mpc7.c +2 −1
  8. libavcodec/mpc8.c +2 −1
  9. libavcodec/smacker.c +2 −1
  10. libavcodec/vorbis_data.c +9 −8
  11. libavcodec/wavpack.c +2 −1
  12. libavformat/aea.c +2 −1
  13. libavformat/flic.c +2 −1
  14. libavformat/wv.c +2 −1
libavcodec/ac3_parser.c+2−1
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include "ac3_parser.h"
2525 #include "aac_ac3_parser.h"
2626 #include "get_bits.h"
27+#include "libavcore/audioconvert.h"
2728
2829
2930 #define AC3_HEADER_SIZE 7
@@ -123,7 +124,7 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) · 93 unmodified lines
123124 }
124125 hdr->channel_layout = ff_ac3_channel_layout_tab[hdr->channel_mode];
125126 if (hdr->lfe_on)
126− hdr->channel_layout |= CH_LOW_FREQUENCY;
127+ hdr->channel_layout |= AV_CH_LOW_FREQUENCY;
127128
128129 return 0;
129130 }
libavcodec/apedec.c+2−1
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include "dsputil.h"
2626 #include "get_bits.h"
2727 #include "bytestream.h"
28+#include "libavcore/audioconvert.h"
2829
2930 /**
3031 * @file
@@ -199,7 +200,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx) · 168 unmodified lines
199200
200201 dsputil_init(&s->dsp, avctx);
201202 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
202− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
203+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
203204 return 0;
204205 }
205206
libavcodec/audioconvert.h+1−0
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131
3232 #include "libavutil/cpu.h"
3333 #include "avcodec.h"
34+#include "libavcore/audioconvert.h"
3435
3536 #if FF_API_OLD_SAMPLE_FMT
3637 /**
libavcodec/cook.c+2−1
@@ -53,6 +53,7 @@ · 52 unmodified lines
5353 #include "dsputil.h"
5454 #include "bytestream.h"
5555 #include "fft.h"
56+#include "libavcore/audioconvert.h"
5657
5758 #include "cookdata.h"
5859
@@ -1274,7 +1275,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1215 unmodified lines
12741275 if (channel_mask)
12751276 avctx->channel_layout = channel_mask;
12761277 else
1277− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
1278+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
12781279
12791280 #ifdef COOKDEBUG
12801281 dump_cook_context(q);
libavcodec/dca.c+2−2
@@ -106,7 +106,7 @@ enum DCAExtensionMask { · 105 unmodified lines
106106 * L = left, R = right, C = center, S = surround, F = front, R = rear, T = total, OV = overhead.
107107 * S -> side, when both rear and back are configured move one of them to the side channel
108108 * OV -> center back
109− * All 2 channel configurations -> CH_LAYOUT_STEREO
109+ * All 2 channel configurations -> AV_CH_LAYOUT_STEREO
110110 */
111111
112112 static const int64_t dca_core_channel_layout[] = {
@@ -117,7 +117,7 @@ static const int64_t dca_core_channel_layout[] = { · 4 unmodified lines
117117 AV_CH_LAYOUT_STEREO, ///< 2, LT +RT (left and right total)
118118 AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER, ///< 3, C+L+R
119119 AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER, ///< 3, L+R+S
120− AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|CH_BACK_CENTER, ///< 4, C + L + R+ S
120+ AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_BACK_CENTER, ///< 4, C + L + R+ S
121121 AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 4, L + R +SL+ SR
122122 AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, ///< 5, C + L + R+ SL+SR
123123 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
libavcodec/imc.c+2−1
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 #include "get_bits.h"
4141 #include "dsputil.h"
4242 #include "fft.h"
43+#include "libavcore/audioconvert.h"
4344
4445 #include "imcdata.h"
4546
@@ -157,7 +158,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) · 111 unmodified lines
157158 ff_fft_init(&q->fft, 7, 1);
158159 dsputil_init(&q->dsp, avctx);
159160 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
160− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
161+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
161162 return 0;
162163 }
163164
libavcodec/mpc7.c+2−1
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include "get_bits.h"
3131 #include "dsputil.h"
3232 #include "mpegaudio.h"
33+#include "libavcore/audioconvert.h"
3334
3435 #include "mpc.h"
3536 #include "mpc7data.h"
@@ -86,7 +87,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx) · 50 unmodified lines
8687 c->frames_to_skip = 0;
8788
8889 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
89− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
90+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
9091
9192 if(vlc_initialized) return 0;
9293 av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
libavcodec/mpc8.c+2−1
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include "get_bits.h"
3131 #include "dsputil.h"
3232 #include "mpegaudio.h"
33+#include "libavcore/audioconvert.h"
3334
3435 #include "mpc.h"
3536 #include "mpcdata.h"
@@ -135,7 +136,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) · 99 unmodified lines
135136 c->frames = 1 << (get_bits(&gb, 3) * 2);
136137
137138 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
138− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
139+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
139140
140141 if(vlc_initialized) return 0;
141142 av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
libavcodec/smacker.c+2−1
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <stdlib.h>
3333
3434 #include "avcodec.h"
35+#include "libavcore/audioconvert.h"
3536
3637 #define ALT_BITSTREAM_READER_LE
3738 #include "get_bits.h"
@@ -554,7 +555,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 516 unmodified lines
554555
555556 static av_cold int smka_decode_init(AVCodecContext *avctx)
556557 {
557− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
558+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
558559 avctx->sample_fmt = avctx->bits_per_coded_sample == 8 ? AV_SAMPLE_FMT_U8 : AV_SAMPLE_FMT_S16;
559560 return 0;
560561 }
libavcodec/vorbis_data.c+9−8
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020
2121 #include "dsputil.h"
2222 #include "vorbis.h"
23+#include "libavcore/audioconvert.h"
2324
2425 const uint8_t ff_vorbis_channel_layout_offsets[8][8] = {
2526 { 0 },
@@ -44,14 +45,14 @@ const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = { · 18 unmodified lines
4445 };
4546
4647 const int64_t ff_vorbis_channel_layouts[9] = {
47− CH_LAYOUT_MONO,
48− CH_LAYOUT_STEREO,
49− CH_LAYOUT_SURROUND,
50− CH_LAYOUT_QUAD,
51− CH_LAYOUT_5POINT0_BACK,
52− CH_LAYOUT_5POINT1_BACK,
53− CH_LAYOUT_5POINT1|CH_BACK_CENTER,
54− CH_LAYOUT_7POINT1,
48+ AV_CH_LAYOUT_MONO,
49+ AV_CH_LAYOUT_STEREO,
50+ AV_CH_LAYOUT_SURROUND,
51+ AV_CH_LAYOUT_QUAD,
52+ AV_CH_LAYOUT_5POINT0_BACK,
53+ AV_CH_LAYOUT_5POINT1_BACK,
54+ AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER,
55+ AV_CH_LAYOUT_7POINT1,
5556 0
5657 };
5758
libavcodec/wavpack.c+2−1
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include "avcodec.h"
2323 #include "get_bits.h"
2424 #include "unary.h"
25+#include "libavcore/audioconvert.h"
2526
2627 /**
2728 * @file
@@ -706,7 +707,7 @@ static av_cold int wavpack_decode_init(AVCodecContext *avctx) · 678 unmodified lines
706707 else
707708 avctx->sample_fmt = AV_SAMPLE_FMT_S32;
708709 if(avctx->channels <= 2 && !avctx->channel_layout)
709− avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
710+ avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
710711
711712 s->multichannel = avctx->channels > 2;
712713 /* lavf demuxer does not provide extradata, Matroska stores 0x403
libavformat/aea.c+2−1
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "avformat.h"
2424 #include "pcm.h"
2525 #include "libavutil/intreadwrite.h"
26+#include "libavcore/audioconvert.h"
2627
2728 #define AT1_SU_SIZE 212
2829
@@ -76,7 +77,7 @@ static int aea_read_header(AVFormatContext *s, · 47 unmodified lines
7677 return -1;
7778 }
7879
79− st->codec->channel_layout = (st->codec->channels == 1) ? CH_LAYOUT_MONO : CH_LAYOUT_STEREO;
80+ st->codec->channel_layout = (st->codec->channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
8081
8182 st->codec->block_align = AT1_SU_SIZE * st->codec->channels;
8283 return 0;
libavformat/flic.c+2−1
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333
3434 #include "libavutil/intreadwrite.h"
3535 #include "avformat.h"
36+#include "libavcore/audioconvert.h"
3637
3738 #define FLIC_FILE_MAGIC_1 0xAF11
3839 #define FLIC_FILE_MAGIC_2 0xAF12
@@ -160,7 +161,7 @@ static int flic_read_header(AVFormatContext *s, · 121 unmodified lines
160161 ast->codec->sample_fmt = AV_SAMPLE_FMT_U8;
161162 ast->codec->bit_rate = st->codec->sample_rate * 8;
162163 ast->codec->bits_per_coded_sample = 8;
163− ast->codec->channel_layout = CH_LAYOUT_MONO;
164+ ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
164165 ast->codec->extradata_size = 0;
165166
166167 /* Since the header information is incorrect we have to figure out the
libavformat/wv.c+2−1
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include "avformat.h"
2424 #include "apetag.h"
2525 #include "id3v1.h"
26+#include "libavcore/audioconvert.h"
2627
2728 // specs say that maximum block size is 1Mb
2829 #define WV_BLOCK_LIMIT 1047576
@@ -111,7 +112,7 @@ static int wv_read_block_header(AVFormatContext *ctx, ByteIOContext *pb, int app · 82 unmodified lines
111112 //parse flags
112113 bpp = ((wc->flags & 3) + 1) << 3;
113114 chan = 1 + !(wc->flags & WV_MONO);
114− chmask = wc->flags & WV_MONO ? CH_LAYOUT_MONO : CH_LAYOUT_STEREO;
115+ chmask = wc->flags & WV_MONO ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
115116 rate = wv_rates[(wc->flags >> 23) & 0xF];
116117 wc->multichannel = !!((wc->flags & WV_SINGLE_BLOCK) != WV_SINGLE_BLOCK);
117118 if(wc->multichannel){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t