Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4531e2c4
Commit
4531e2c4
authored
Feb 01, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mpegvideo_enc: Fix number suffixes in rc_buffer_size calculation
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
592ba6ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+4
-4
No files found.
libavcodec/mpegvideo_enc.c
View file @
4531e2c4
...
@@ -395,18 +395,18 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
...
@@ -395,18 +395,18 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
switch
(
avctx
->
codec_id
)
{
switch
(
avctx
->
codec_id
)
{
case
AV_CODEC_ID_MPEG1VIDEO
:
case
AV_CODEC_ID_MPEG1VIDEO
:
case
AV_CODEC_ID_MPEG2VIDEO
:
case
AV_CODEC_ID_MPEG2VIDEO
:
avctx
->
rc_buffer_size
=
FFMAX
(
avctx
->
rc_max_rate
,
15000000
)
*
112L
/
15000000
*
16384
;
avctx
->
rc_buffer_size
=
FFMAX
(
avctx
->
rc_max_rate
,
15000000
)
*
112L
L
/
15000000
*
16384
;
break
;
break
;
case
AV_CODEC_ID_MPEG4
:
case
AV_CODEC_ID_MPEG4
:
case
AV_CODEC_ID_MSMPEG4V1
:
case
AV_CODEC_ID_MSMPEG4V1
:
case
AV_CODEC_ID_MSMPEG4V2
:
case
AV_CODEC_ID_MSMPEG4V2
:
case
AV_CODEC_ID_MSMPEG4V3
:
case
AV_CODEC_ID_MSMPEG4V3
:
if
(
avctx
->
rc_max_rate
>=
15000000
)
{
if
(
avctx
->
rc_max_rate
>=
15000000
)
{
avctx
->
rc_buffer_size
=
320
+
(
avctx
->
rc_max_rate
-
15000000L
)
*
(
760
-
320
)
/
(
38400000
-
15000000
);
avctx
->
rc_buffer_size
=
320
+
(
avctx
->
rc_max_rate
-
15000000L
L
)
*
(
760
-
320
)
/
(
38400000
-
15000000
);
}
else
if
(
avctx
->
rc_max_rate
>=
2000000
)
{
}
else
if
(
avctx
->
rc_max_rate
>=
2000000
)
{
avctx
->
rc_buffer_size
=
80
+
(
avctx
->
rc_max_rate
-
2000000L
)
*
(
320
-
80
)
/
(
15000000
-
2000000
);
avctx
->
rc_buffer_size
=
80
+
(
avctx
->
rc_max_rate
-
2000000L
L
)
*
(
320
-
80
)
/
(
15000000
-
2000000
);
}
else
if
(
avctx
->
rc_max_rate
>=
384000
)
{
}
else
if
(
avctx
->
rc_max_rate
>=
384000
)
{
avctx
->
rc_buffer_size
=
40
+
(
avctx
->
rc_max_rate
-
384000L
)
*
(
80
-
40
)
/
(
2000000
-
384000
);
avctx
->
rc_buffer_size
=
40
+
(
avctx
->
rc_max_rate
-
384000L
L
)
*
(
80
-
40
)
/
(
2000000
-
384000
);
}
else
}
else
avctx
->
rc_buffer_size
=
40
;
avctx
->
rc_buffer_size
=
40
;
avctx
->
rc_buffer_size
*=
16384
;
avctx
->
rc_buffer_size
*=
16384
;
...
...
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