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
7da71a5c
Commit
7da71a5c
authored
Oct 22, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xvid qpel bug autodetect
Originally committed as revision 1064 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
03e93d35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
h263.c
libavcodec/h263.c
+13
-3
h263dec.c
libavcodec/h263dec.c
+7
-0
mpegvideo.h
libavcodec/mpegvideo.h
+2
-0
No files found.
libavcodec/h263.c
View file @
7da71a5c
...
...
@@ -4328,6 +4328,8 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
skip_bits
(
gb
,
8
);
}
buf
[
255
]
=
0
;
/* divx detection */
e
=
sscanf
(
buf
,
"DivX%dBuild%d"
,
&
ver
,
&
build
);
if
(
e
!=
2
)
e
=
sscanf
(
buf
,
"DivX%db%d"
,
&
ver
,
&
build
);
...
...
@@ -4336,11 +4338,10 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
s
->
divx_build
=
build
;
if
(
s
->
picture_number
==
0
){
printf
(
"This file was encoded with DivX%d Build%d
\n
"
,
ver
,
build
);
if
(
ver
==
500
&&
build
==
413
){
printf
(
"WARNING: this version of DivX is not MPEG4 compatible, trying to workaround these bugs...
\n
"
);
}
}
}
/* ffmpeg detection */
e
=
sscanf
(
buf
,
"FFmpeg%d.%d.%db%d"
,
&
ver
,
&
ver2
,
&
ver3
,
&
build
);
if
(
e
!=
4
)
e
=
sscanf
(
buf
,
"FFmpeg v%d.%d.%d / libavcodec build: %d"
,
&
ver
,
&
ver2
,
&
ver3
,
&
build
);
...
...
@@ -4356,6 +4357,15 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
if
(
s
->
picture_number
==
0
)
printf
(
"This file was encoded with libavcodec build %d
\n
"
,
build
);
}
/* xvid detection */
e
=
sscanf
(
buf
,
"XviD%d"
,
&
build
);
if
(
e
==
1
){
s
->
xvid_build
=
build
;
if
(
s
->
picture_number
==
0
)
printf
(
"This file was encoded with XviD build %d
\n
"
,
build
);
}
//printf("User Data: %s\n", buf);
return
0
;
}
...
...
libavcodec/h263dec.c
View file @
7da71a5c
...
...
@@ -376,6 +376,13 @@ uint64_t time= rdtsc();
if
(
s
->
divx_version
){
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
}
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
if
(
s
->
xvid_build
&&
s
->
xvid_build
<=
1
)
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
//printf("padding_bug_score: %d\n", s->padding_bug_score);
#if 0
if(s->divx_version==500)
...
...
libavcodec/mpegvideo.h
View file @
7da71a5c
...
...
@@ -413,6 +413,8 @@ typedef struct MpegEncContext {
UINT8
*
bitstream_buffer
;
//Divx 5.01 puts several frames in a single one, this is used to reorder them
int
bitstream_buffer_size
;
int
xvid_build
;
/* lavc specific stuff, used to workaround bugs in libavcodec */
int
ffmpeg_version
;
int
lavc_build
;
...
...
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