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
202ef8b8
Commit
202ef8b8
authored
Sep 27, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ff_get_fourcc() & XVIX support
Originally committed as revision 975 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0c2dd16e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
2 deletions
+24
-2
avcodec.h
libavcodec/avcodec.h
+1
-1
common.h
libavcodec/common.h
+10
-0
h263.c
libavcodec/h263.c
+1
-1
h263dec.c
libavcodec/h263dec.c
+4
-0
mpegvideo.c
libavcodec/mpegvideo.c
+8
-0
No files found.
libavcodec/avcodec.h
View file @
202ef8b8
...
...
@@ -680,7 +680,7 @@ typedef struct AVCodecContext {
* 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
* decoding: set by user
, will be converted to upper case by lavc during init
*/
int
fourcc
;
...
...
libavcodec/common.h
View file @
202ef8b8
...
...
@@ -922,6 +922,16 @@ static inline int ff_sqrt(int a)
}
return
ret
;
}
/**
* converts fourcc string to int
*/
static
inline
int
ff_get_fourcc
(
char
*
s
){
assert
(
strlen
(
s
)
==
4
);
return
(
s
[
0
])
+
(
s
[
1
]
<<
8
)
+
(
s
[
2
]
<<
16
)
+
(
s
[
3
]
<<
24
);
}
#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
#define COPY3_IF_LT(x,y,a,b,c,d)\
asm volatile (\
...
...
libavcodec/h263.c
View file @
202ef8b8
...
...
@@ -4231,7 +4231,7 @@ int mpeg4_decode_picture_header(MpegEncContext * s)
s
->
last_time_base
=
s
->
time_base
;
s
->
time_base
+=
time_incr
;
s
->
time
=
s
->
time_base
*
s
->
time_increment_resolution
+
time_increment
;
if
(
s
->
workaround_bugs
==
3
||
s
->
avctx
->
fourcc
==
'U'
+
(
'M'
<<
8
)
+
(
'P'
<<
16
)
+
(
'4'
<<
24
)){
if
(
s
->
workaround_bugs
==
3
||
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"UMP4"
)){
if
(
s
->
time
<
s
->
last_non_b_time
){
// fprintf(stderr, "header is not mpeg4 compatible, broken encoder, trying to workaround\n");
s
->
time_base
++
;
...
...
libavcodec/h263dec.c
View file @
202ef8b8
...
...
@@ -144,7 +144,11 @@ uint64_t time= rdtsc();
s
->
hurry_up
=
avctx
->
hurry_up
;
s
->
error_resilience
=
avctx
->
error_resilience
;
s
->
workaround_bugs
=
avctx
->
workaround_bugs
;
if
(
s
->
avctx
->
fourcc
==
ff_get_fourcc
(
"XVIX"
)
&&
s
->
workaround_bugs
==
0
)
s
->
workaround_bugs
=
2
;
s
->
flags
=
avctx
->
flags
;
*
data_size
=
0
;
...
...
libavcodec/mpegvideo.c
View file @
202ef8b8
...
...
@@ -18,6 +18,8 @@
*
* 4MV & hq & b-frame encoding stuff by Michael Niedermayer <michaelni@gmx.at>
*/
#include <ctype.h>
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
...
...
@@ -162,6 +164,12 @@ int MPV_common_init(MpegEncContext *s)
/* set default edge pos, will be overriden in decode_header if needed */
s
->
h_edge_pos
=
s
->
mb_width
*
16
;
s
->
v_edge_pos
=
s
->
mb_height
*
16
;
/* 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
->
mb_num
=
s
->
mb_width
*
s
->
mb_height
;
if
(
!
(
s
->
flags
&
CODEC_FLAG_DR1
)){
...
...
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