Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c2fcd0a7
Commit
c2fcd0a7
authored
Feb 03, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Feb 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace remaining occurrences of deprecated CH_* with AV_CH_*
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
ad3cffb6
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
34 additions
and
21 deletions
+34
-21
ac3_parser.c
libavcodec/ac3_parser.c
+2
-1
apedec.c
libavcodec/apedec.c
+2
-1
audioconvert.h
libavcodec/audioconvert.h
+1
-0
cook.c
libavcodec/cook.c
+2
-1
dca.c
libavcodec/dca.c
+2
-2
imc.c
libavcodec/imc.c
+2
-1
mpc7.c
libavcodec/mpc7.c
+2
-1
mpc8.c
libavcodec/mpc8.c
+2
-1
smacker.c
libavcodec/smacker.c
+2
-1
vorbis_data.c
libavcodec/vorbis_data.c
+9
-8
wavpack.c
libavcodec/wavpack.c
+2
-1
aea.c
libavformat/aea.c
+2
-1
flic.c
libavformat/flic.c
+2
-1
wv.c
libavformat/wv.c
+2
-1
No files found.
libavcodec/ac3_parser.c
View file @
c2fcd0a7
...
...
@@ -24,6 +24,7 @@
#include "ac3_parser.h"
#include "aac_ac3_parser.h"
#include "get_bits.h"
#include "libavcore/audioconvert.h"
#define AC3_HEADER_SIZE 7
...
...
@@ -123,7 +124,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
;
}
...
...
libavcodec/apedec.c
View file @
c2fcd0a7
...
...
@@ -25,6 +25,7 @@
#include "dsputil.h"
#include "get_bits.h"
#include "bytestream.h"
#include "libavcore/audioconvert.h"
/**
* @file
...
...
@@ -199,7 +200,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
;
}
...
...
libavcodec/audioconvert.h
View file @
c2fcd0a7
...
...
@@ -31,6 +31,7 @@
#include "libavutil/cpu.h"
#include "avcodec.h"
#include "libavcore/audioconvert.h"
#if FF_API_OLD_SAMPLE_FMT
/**
...
...
libavcodec/cook.c
View file @
c2fcd0a7
...
...
@@ -53,6 +53,7 @@
#include "dsputil.h"
#include "bytestream.h"
#include "fft.h"
#include "libavcore/audioconvert.h"
#include "cookdata.h"
...
...
@@ -1274,7 +1275,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
);
...
...
libavcodec/dca.c
View file @
c2fcd0a7
...
...
@@ -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
...
...
libavcodec/imc.c
View file @
c2fcd0a7
...
...
@@ -40,6 +40,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
#include "libavcore/audioconvert.h"
#include "imcdata.h"
...
...
@@ -157,7 +158,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
;
}
...
...
libavcodec/mpc7.c
View file @
c2fcd0a7
...
...
@@ -30,6 +30,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "mpegaudio.h"
#include "libavcore/audioconvert.h"
#include "mpc.h"
#include "mpc7data.h"
...
...
@@ -86,7 +87,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
"
);
...
...
libavcodec/mpc8.c
View file @
c2fcd0a7
...
...
@@ -30,6 +30,7 @@
#include "get_bits.h"
#include "dsputil.h"
#include "mpegaudio.h"
#include "libavcore/audioconvert.h"
#include "mpc.h"
#include "mpcdata.h"
...
...
@@ -135,7 +136,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
"
);
...
...
libavcodec/smacker.c
View file @
c2fcd0a7
...
...
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include "avcodec.h"
#include "libavcore/audioconvert.h"
#define ALT_BITSTREAM_READER_LE
#include "get_bits.h"
...
...
@@ -554,7 +555,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
;
}
...
...
libavcodec/vorbis_data.c
View file @
c2fcd0a7
...
...
@@ -20,6 +20,7 @@
#include "dsputil.h"
#include "vorbis.h"
#include "libavcore/audioconvert.h"
const
uint8_t
ff_vorbis_channel_layout_offsets
[
8
][
8
]
=
{
{
0
},
...
...
@@ -44,14 +45,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
};
...
...
libavcodec/wavpack.c
View file @
c2fcd0a7
...
...
@@ -22,6 +22,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "unary.h"
#include "libavcore/audioconvert.h"
/**
* @file
...
...
@@ -706,7 +707,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
...
...
libavformat/aea.c
View file @
c2fcd0a7
...
...
@@ -23,6 +23,7 @@
#include "avformat.h"
#include "pcm.h"
#include "libavutil/intreadwrite.h"
#include "libavcore/audioconvert.h"
#define AT1_SU_SIZE 212
...
...
@@ -76,7 +77,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
;
...
...
libavformat/flic.c
View file @
c2fcd0a7
...
...
@@ -33,6 +33,7 @@
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "libavcore/audioconvert.h"
#define FLIC_FILE_MAGIC_1 0xAF11
#define FLIC_FILE_MAGIC_2 0xAF12
...
...
@@ -160,7 +161,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
...
...
libavformat/wv.c
View file @
c2fcd0a7
...
...
@@ -23,6 +23,7 @@
#include "avformat.h"
#include "apetag.h"
#include "id3v1.h"
#include "libavcore/audioconvert.h"
// specs say that maximum block size is 1Mb
#define WV_BLOCK_LIMIT 1047576
...
...
@@ -111,7 +112,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
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment