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
7004ffb3
Commit
7004ffb3
authored
Mar 08, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merging fourcc with codec_tag
Originally committed as revision 1645 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
9bf9a5fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
26 deletions
+24
-26
avcodec.h
libavcodec/avcodec.h
+12
-13
h263dec.c
libavcodec/h263dec.c
+6
-6
mpegvideo.c
libavcodec/mpegvideo.c
+4
-4
asf.c
libavformat/asf.c
+1
-1
wav.c
libavformat/wav.c
+1
-2
No files found.
libavcodec/avcodec.h
View file @
7004ffb3
...
...
@@ -15,8 +15,8 @@ extern "C" {
#define LIBAVCODEC_VERSION_INT 0x000406
#define LIBAVCODEC_VERSION "0.4.6"
#define LIBAVCODEC_BUILD 466
0
#define LIBAVCODEC_BUILD_STR "466
0
"
#define LIBAVCODEC_BUILD 466
1
#define LIBAVCODEC_BUILD_STR "466
1
"
enum
CodecID
{
CODEC_ID_NONE
,
...
...
@@ -535,10 +535,10 @@ typedef struct AVCodecContext {
/**
* number of bits used for the previously encoded frame.
* - encoding: set by lavc
* - decoding:
- for audio - bits_per_sample
* - decoding:
unused
*/
int
frame_bits
;
/**
* private data of the user, can be used to carry app specific stuff.
* - encoding: set by user
...
...
@@ -549,7 +549,14 @@ typedef struct AVCodecContext {
char
codec_name
[
32
];
enum
CodecType
codec_type
;
/* see CODEC_TYPE_xxx */
enum
CodecID
codec_id
;
/* see CODEC_ID_xxx */
unsigned
int
codec_tag
;
///< codec tag, only used if unknown codec
/**
* fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
* this is used to workaround some encoder bugs
* - encoding: unused
* - decoding: set by user, will be converted to upper case by lavc during init
*/
unsigned
int
codec_tag
;
/**
* workaround bugs in encoders which sometimes cannot be detected automatically.
...
...
@@ -782,14 +789,6 @@ typedef struct AVCodecContext {
*/
float
dark_masking
;
/**
* fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
* this is used to workaround some encoder bugs
* - encoding: unused
* - decoding: set by user, will be converted to upper case by lavc during init
*/
int
fourcc
;
/**
* idct algorithm, see FF_IDCT_* below.
* - encoding: set by user
...
...
libavcodec/h263dec.c
View file @
7004ffb3
...
...
@@ -488,16 +488,16 @@ retry:
else
s
->
workaround_bugs
&=
~
FF_BUG_NO_PADDING
;
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVIX"
))
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"XVIX"
))
s
->
workaround_bugs
|=
FF_BUG_XVID_ILACE
;
#if 0
if(s->avctx->
fourcc
== ff_get_fourcc("MP4S"))
if(s->avctx->
codec_tag
== ff_get_fourcc("MP4S"))
s->workaround_bugs|= FF_BUG_AC_VLC;
if(s->avctx->
fourcc
== ff_get_fourcc("M4S2"))
if(s->avctx->
codec_tag
== ff_get_fourcc("M4S2"))
s->workaround_bugs|= FF_BUG_AC_VLC;
#endif
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"UMP4"
)){
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"UMP4"
)){
s
->
workaround_bugs
|=
FF_BUG_UMP4
;
s
->
workaround_bugs
|=
FF_BUG_AC_VLC
;
}
...
...
@@ -510,10 +510,10 @@ retry:
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA2
;
}
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
s
->
padding_bug_score
=
256
*
256
*
256
*
64
;
if
(
s
->
xvid_build
&&
s
->
xvid_build
<=
3
)
...
...
libavcodec/mpegvideo.c
View file @
7004ffb3
...
...
@@ -339,10 +339,10 @@ int MPV_common_init(MpegEncContext *s)
yc_size
=
y_size
+
2
*
c_size
;
/* convert fourcc to upper case */
s
->
avctx
->
fourcc
=
toupper
(
s
->
avctx
->
fourcc
&
0xFF
)
+
(
toupper
((
s
->
avctx
->
fourcc
>>
8
)
&
0xFF
)
<<
8
)
+
(
toupper
((
s
->
avctx
->
fourcc
>>
16
)
&
0xFF
)
<<
16
)
+
(
toupper
((
s
->
avctx
->
fourcc
>>
24
)
&
0xFF
)
<<
24
);
s
->
avctx
->
codec_tag
=
toupper
(
s
->
avctx
->
codec_tag
&
0xFF
)
+
(
toupper
((
s
->
avctx
->
codec_tag
>>
8
)
&
0xFF
)
<<
8
)
+
(
toupper
((
s
->
avctx
->
codec_tag
>>
16
)
&
0xFF
)
<<
16
)
+
(
toupper
((
s
->
avctx
->
codec_tag
>>
24
)
&
0xFF
)
<<
24
);
CHECKED_ALLOCZ
(
s
->
allocated_edge_emu_buffer
,
(
s
->
width
+
64
)
*
2
*
17
*
2
);
//(width + edge + align)*interlaced*MBsize*tolerance
s
->
edge_emu_buffer
=
s
->
allocated_edge_emu_buffer
+
(
s
->
width
+
64
)
*
2
*
17
;
...
...
libavformat/asf.c
View file @
7004ffb3
...
...
@@ -897,7 +897,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
st
->
codec
.
extradata
=
av_mallocz
(
st
->
codec
.
extradata_size
);
get_buffer
(
pb
,
st
->
codec
.
extradata
,
st
->
codec
.
extradata_size
);
}
st
->
codec
.
codec_tag
=
st
->
codec
.
fourcc
=
tag1
;
st
->
codec
.
codec_tag
=
tag1
;
st
->
codec
.
codec_id
=
codec_get_id
(
codec_bmp_tags
,
tag1
);
}
pos2
=
url_ftell
(
pb
);
...
...
libavformat/wav.c
View file @
7004ffb3
...
...
@@ -111,12 +111,11 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
id
=
get_le16
(
pb
);
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
codec
->
codec_tag
=
id
;
codec
->
fourcc
=
id
;
codec
->
channels
=
get_le16
(
pb
);
codec
->
sample_rate
=
get_le32
(
pb
);
codec
->
bit_rate
=
get_le32
(
pb
)
*
8
;
codec
->
block_align
=
get_le16
(
pb
);
codec
->
frame_bits
=
get_le16
(
pb
);
/* bits per sample */
codec
->
bits_per_sample
=
get_le16
(
pb
);
/* bits per sample */
codec
->
codec_id
=
wav_codec_get_id
(
id
,
codec
->
frame_bits
);
if
(
has_extra_data
)
{
codec
->
extradata_size
=
get_le16
(
pb
);
...
...
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