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
ccbf370f
Commit
ccbf370f
authored
Jul 29, 2014
by
Nidhi Makhijani
Committed by
Diego Biurrun
Jul 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: move vol_control_parameters to the only place it is used
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
fa38573c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
mpeg4video.h
libavcodec/mpeg4video.h
+2
-0
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+5
-5
mpegvideo.h
libavcodec/mpegvideo.h
+0
-1
No files found.
libavcodec/mpeg4video.h
View file @
ccbf370f
...
...
@@ -94,6 +94,8 @@ typedef struct Mpeg4DecContext {
int
lavc_build
;
///< flag for having shown the warning about divxs invalid b frames
int
showed_packed_warning
;
int
vol_control_parameters
;
/**< does the stream contain the low_delay flag,
* used to work around buggy encoders. */
int
cplx_estimation_trash_i
;
int
cplx_estimation_trash_p
;
...
...
libavcodec/mpeg4videodec.c
View file @
ccbf370f
...
...
@@ -1685,7 +1685,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s
->
avctx
->
sample_aspect_ratio
=
ff_h263_pixel_aspect
[
s
->
aspect_ratio_info
];
}
if
((
s
->
vol_control_parameters
=
get_bits1
(
gb
)))
{
/* vol control parameter */
if
((
ctx
->
vol_control_parameters
=
get_bits1
(
gb
)))
{
/* vol control parameter */
int
chroma_format
=
get_bits
(
gb
,
2
);
if
(
chroma_format
!=
CHROMA_420
)
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"illegal chroma format
\n
"
);
...
...
@@ -2058,7 +2058,7 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
if
(
ctx
->
xvid_build
==
-
1
&&
ctx
->
divx_version
==
-
1
&&
ctx
->
lavc_build
==
-
1
)
if
(
s
->
codec_tag
==
AV_RL32
(
"DIVX"
)
&&
s
->
vo_type
==
0
&&
s
->
vol_control_parameters
==
0
)
ctx
->
vol_control_parameters
==
0
)
ctx
->
divx_version
=
400
;
// divx 4
if
(
ctx
->
xvid_build
>=
0
&&
ctx
->
divx_version
>=
0
)
{
...
...
@@ -2085,7 +2085,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s
->
pict_type
=
get_bits
(
gb
,
2
)
+
AV_PICTURE_TYPE_I
;
/* pict type: I = 0 , P = 1 */
if
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
&&
s
->
low_delay
&&
s
->
vol_control_parameters
==
0
&&
!
(
s
->
flags
&
CODEC_FLAG_LOW_DELAY
))
{
ctx
->
vol_control_parameters
==
0
&&
!
(
s
->
flags
&
CODEC_FLAG_LOW_DELAY
))
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"low_delay flag incorrectly, clearing it
\n
"
);
s
->
low_delay
=
0
;
}
...
...
@@ -2276,7 +2276,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s
->
data_partitioning
,
ctx
->
resync_marker
,
ctx
->
num_sprite_warping_points
,
s
->
sprite_warping_accuracy
,
1
-
s
->
no_rounding
,
s
->
vo_type
,
s
->
vol_control_parameters
?
" VOLC"
:
" "
,
ctx
->
intra_dc_threshold
,
ctx
->
vol_control_parameters
?
" VOLC"
:
" "
,
ctx
->
intra_dc_threshold
,
ctx
->
cplx_estimation_trash_i
,
ctx
->
cplx_estimation_trash_p
,
ctx
->
cplx_estimation_trash_b
);
}
...
...
@@ -2297,7 +2297,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
/* detect buggy encoders which don't set the low_delay flag
* (divx4/xvid/opendivx). Note we cannot detect divx5 without b-frames
* easily (although it's buggy too) */
if
(
s
->
vo_type
==
0
&&
s
->
vol_control_parameters
==
0
&&
if
(
s
->
vo_type
==
0
&&
ctx
->
vol_control_parameters
==
0
&&
ctx
->
divx_version
==
-
1
&&
s
->
picture_number
==
0
)
{
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
\n
"
);
...
...
libavcodec/mpegvideo.h
View file @
ccbf370f
...
...
@@ -518,7 +518,6 @@ typedef struct MpegEncContext {
int
partitioned_frame
;
///< is current frame partitioned
int
low_delay
;
///< no reordering needed / has no b-frames
int
vo_type
;
int
vol_control_parameters
;
///< does the stream contain the low_delay flag, used to workaround buggy encoders
PutBitContext
tex_pb
;
///< used for data partitioned VOPs
PutBitContext
pb2
;
///< used for data partitioned VOPs
int
mpeg_quant
;
...
...
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