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
03afb62e
Commit
03afb62e
authored
Oct 03, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxenc: export CPB props side data
parent
11c9bd63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
libvpxenc.c
libavcodec/libvpxenc.c
+13
-0
No files found.
libavcodec/libvpxenc.c
View file @
03afb62e
...
...
@@ -212,6 +212,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
{
VP8Context
*
ctx
=
avctx
->
priv_data
;
struct
vpx_codec_enc_cfg
enccfg
=
{
0
};
AVCPBProperties
*
cpb_props
;
int
res
;
av_log
(
avctx
,
AV_LOG_INFO
,
"%s
\n
"
,
vpx_codec_version_str
());
...
...
@@ -362,6 +363,18 @@ static av_cold int vpx_init(AVCodecContext *avctx,
vpx_img_wrap
(
&
ctx
->
rawimg
,
ff_vpx_pixfmt_to_imgfmt
(
avctx
->
pix_fmt
),
avctx
->
width
,
avctx
->
height
,
1
,
(
unsigned
char
*
)
1
);
cpb_props
=
ff_add_cpb_side_data
(
avctx
);
if
(
!
cpb_props
)
return
AVERROR
(
ENOMEM
);
if
(
enccfg
.
rc_end_usage
==
VPX_CBR
||
enccfg
.
g_pass
!=
VPX_RC_ONE_PASS
)
{
cpb_props
->
max_bitrate
=
avctx
->
rc_max_rate
;
cpb_props
->
min_bitrate
=
avctx
->
rc_min_rate
;
cpb_props
->
avg_bitrate
=
avctx
->
bit_rate
;
}
cpb_props
->
buffer_size
=
avctx
->
rc_buffer_size
;
return
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