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
36df8805
Commit
36df8805
authored
Feb 02, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
divx503 decoding fix
Originally committed as revision 1538 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fa777321
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
avcodec.h
libavcodec/avcodec.h
+8
-0
h263dec.c
libavcodec/h263dec.c
+4
-9
mpegvideo.c
libavcodec/mpegvideo.c
+5
-0
No files found.
libavcodec/avcodec.h
View file @
36df8805
#ifndef AVCODEC_H
#define AVCODEC_H
/**
* @file avcodec.h
* @brief
* external api header
*/
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
@@ -523,6 +530,7 @@ typedef struct AVCodecContext {
#define FF_BUG_AC_VLC 32
#define FF_BUG_QPEL_CHROMA 64
#define FF_BUG_STD_QPEL 128
#define FF_BUG_QPEL_CHROMA2 256
//#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100%
/**
...
...
libavcodec/h263dec.c
View file @
36df8805
...
...
@@ -20,12 +20,6 @@
#include "dsputil.h"
#include "mpegvideo.h"
#if 1
#define PRINT_QP(a, b) {}
#else
#define PRINT_QP(a, b) printf(a, b)
#endif
//#define DEBUG
//#define PRINT_FRAME_TIME
#ifdef PRINT_FRAME_TIME
...
...
@@ -205,7 +199,6 @@ static int decode_slice(MpegEncContext *s){
//printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24));
ret
=
s
->
decode_mb
(
s
,
s
->
block
);
PRINT_QP
(
"%2d"
,
s
->
qscale
);
MPV_decode_mb
(
s
,
s
->
block
);
if
(
ret
<
0
){
...
...
@@ -239,8 +232,6 @@ static int decode_slice(MpegEncContext *s){
ff_draw_horiz_band
(
s
);
PRINT_QP
(
"%s"
,
"
\n
"
);
s
->
mb_x
=
0
;
}
...
...
@@ -495,6 +486,10 @@ retry:
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
}
if
(
s
->
divx_version
>
502
){
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA2
;
}
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVID"
)
&&
s
->
xvid_build
==
0
)
s
->
workaround_bugs
|=
FF_BUG_QPEL_CHROMA
;
...
...
libavcodec/mpegvideo.c
View file @
36df8805
...
...
@@ -1680,6 +1680,10 @@ static inline void qpel_motion(MpegEncContext *s,
if
(
field_based
){
mx
=
motion_x
/
2
;
my
=
motion_y
>>
1
;
}
else
if
(
s
->
workaround_bugs
&
FF_BUG_QPEL_CHROMA2
){
static
const
int
rtab
[
8
]
=
{
0
,
0
,
1
,
1
,
0
,
0
,
0
,
1
};
mx
=
(
motion_x
>>
1
)
+
rtab
[
motion_x
&
7
];
my
=
(
motion_y
>>
1
)
+
rtab
[
motion_y
&
7
];
}
else
if
(
s
->
workaround_bugs
&
FF_BUG_QPEL_CHROMA
){
mx
=
(
motion_x
>>
1
)
|
(
motion_x
&
1
);
my
=
(
motion_y
>>
1
)
|
(
motion_y
&
1
);
...
...
@@ -1689,6 +1693,7 @@ static inline void qpel_motion(MpegEncContext *s,
}
mx
=
(
mx
>>
1
)
|
(
mx
&
1
);
my
=
(
my
>>
1
)
|
(
my
&
1
);
dxy
=
(
mx
&
1
)
|
((
my
&
1
)
<<
1
);
mx
>>=
1
;
my
>>=
1
;
...
...
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