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
b1aacd56
Commit
b1aacd56
authored
Nov 26, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext
parent
03889074
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
mpeg4video.h
libavcodec/mpeg4video.h
+2
-0
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+9
-9
mpegvideo.h
libavcodec/mpegvideo.h
+0
-1
No files found.
libavcodec/mpeg4video.h
View file @
b1aacd56
...
...
@@ -70,6 +70,8 @@ typedef struct Mpeg4DecContext {
int
rvlc
;
///< could this stream contain resync markers
int
resync_marker
;
///< time distance of first I -> B, used for interlaced b frames
int
t_frame
;
/* bug workarounds */
int
divx_version
;
...
...
libavcodec/mpeg4videodec.c
View file @
b1aacd56
...
...
@@ -1736,7 +1736,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
else
s
->
avctx
->
time_base
.
num
=
1
;
s
->
t_frame
=
0
;
ctx
->
t_frame
=
0
;
if
(
ctx
->
shape
!=
BIN_ONLY_SHAPE
)
{
if
(
ctx
->
shape
==
RECT_SHAPE
)
{
...
...
@@ -2123,14 +2123,14 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
}
ff_mpeg4_init_direct_mv
(
s
);
if
(
s
->
t_frame
==
0
)
s
->
t_frame
=
s
->
pb_time
;
if
(
s
->
t_frame
==
0
)
s
->
t_frame
=
1
;
// 1/0 protection
s
->
pp_field_time
=
(
ROUNDED_DIV
(
s
->
last_non_b_time
,
s
->
t_frame
)
-
ROUNDED_DIV
(
s
->
last_non_b_time
-
s
->
pp_time
,
s
->
t_frame
))
*
2
;
s
->
pb_field_time
=
(
ROUNDED_DIV
(
s
->
time
,
s
->
t_frame
)
-
ROUNDED_DIV
(
s
->
last_non_b_time
-
s
->
pp_time
,
s
->
t_frame
))
*
2
;
if
(
ctx
->
t_frame
==
0
)
ctx
->
t_frame
=
s
->
pb_time
;
if
(
ctx
->
t_frame
==
0
)
ctx
->
t_frame
=
1
;
// 1/0 protection
s
->
pp_field_time
=
(
ROUNDED_DIV
(
s
->
last_non_b_time
,
ctx
->
t_frame
)
-
ROUNDED_DIV
(
s
->
last_non_b_time
-
s
->
pp_time
,
ctx
->
t_frame
))
*
2
;
s
->
pb_field_time
=
(
ROUNDED_DIV
(
s
->
time
,
ctx
->
t_frame
)
-
ROUNDED_DIV
(
s
->
last_non_b_time
-
s
->
pp_time
,
ctx
->
t_frame
))
*
2
;
if
(
!
s
->
progressive_sequence
)
{
if
(
s
->
pp_field_time
<=
s
->
pb_field_time
||
s
->
pb_field_time
<=
1
)
return
FRAME_SKIPPED
;
...
...
libavcodec/mpegvideo.h
View file @
b1aacd56
...
...
@@ -607,7 +607,6 @@ typedef struct MpegEncContext {
PutBitContext
tex_pb
;
///< used for data partitioned VOPs
PutBitContext
pb2
;
///< used for data partitioned VOPs
int
mpeg_quant
;
int
t_frame
;
///< time distance of first I -> B, used for interlaced b frames
int
padding_bug_score
;
///< used to detect the VERY common padding bug in MPEG4
/* divx specific, used to workaround (many) bugs in divx5 */
...
...
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