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
b73afeac
Commit
b73afeac
authored
Mar 26, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huge vbv buffer size + CBR fix
Originally committed as revision 2929 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ca20f118
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
mpegvideo.c
libavcodec/mpegvideo.c
+10
-2
No files found.
libavcodec/mpegvideo.c
View file @
b73afeac
...
...
@@ -887,6 +887,13 @@ int MPV_encode_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_INFO
,
"Warning min_rate > 0 but min_rate != max_rate isnt recommanded!
\n
"
);
}
if
(
s
->
avctx
->
rc_max_rate
&&
s
->
avctx
->
rc_min_rate
==
s
->
avctx
->
rc_max_rate
&&
(
s
->
codec_id
==
CODEC_ID_MPEG1VIDEO
||
s
->
codec_id
==
CODEC_ID_MPEG2VIDEO
)
&&
90000LL
*
(
avctx
->
rc_buffer_size
-
1
)
>
s
->
avctx
->
rc_max_rate
*
0xFFFFLL
){
av_log
(
avctx
,
AV_LOG_INFO
,
"Warning vbv_delay will be set to 0xFFFF (=VBR) as the specified vbv buffer is too large for the given bitrate!
\n
"
);
}
if
((
s
->
flags
&
CODEC_FLAG_4MV
)
&&
s
->
codec_id
!=
CODEC_ID_MPEG4
&&
s
->
codec_id
!=
CODEC_ID_H263
&&
s
->
codec_id
!=
CODEC_ID_H263P
&&
s
->
codec_id
!=
CODEC_ID_FLV1
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"4MV not supported by codec
\n
"
);
...
...
@@ -2115,7 +2122,8 @@ int MPV_encode_picture(AVCodecContext *avctx,
}
/* update mpeg1/2 vbv_delay for CBR */
if
(
s
->
avctx
->
rc_max_rate
&&
s
->
avctx
->
rc_min_rate
==
s
->
avctx
->
rc_max_rate
&&
s
->
out_format
==
FMT_MPEG1
){
if
(
s
->
avctx
->
rc_max_rate
&&
s
->
avctx
->
rc_min_rate
==
s
->
avctx
->
rc_max_rate
&&
s
->
out_format
==
FMT_MPEG1
&&
90000LL
*
(
avctx
->
rc_buffer_size
-
1
)
<=
s
->
avctx
->
rc_max_rate
*
0xFFFFLL
){
int
vbv_delay
;
assert
(
s
->
repeat_first_field
==
0
);
...
...
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