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
82590024
Commit
82590024
authored
Oct 03, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsvenc: export CPB props side data
parent
1520c6ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
qsvenc.c
libavcodec/qsvenc.c
+10
-0
No files found.
libavcodec/qsvenc.c
View file @
82590024
...
@@ -523,6 +523,8 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
...
@@ -523,6 +523,8 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
static
int
qsv_retrieve_enc_params
(
AVCodecContext
*
avctx
,
QSVEncContext
*
q
)
static
int
qsv_retrieve_enc_params
(
AVCodecContext
*
avctx
,
QSVEncContext
*
q
)
{
{
AVCPBProperties
*
cpb_props
;
uint8_t
sps_buf
[
128
];
uint8_t
sps_buf
[
128
];
uint8_t
pps_buf
[
128
];
uint8_t
pps_buf
[
128
];
...
@@ -589,6 +591,14 @@ static int qsv_retrieve_enc_params(AVCodecContext *avctx, QSVEncContext *q)
...
@@ -589,6 +591,14 @@ static int qsv_retrieve_enc_params(AVCodecContext *avctx, QSVEncContext *q)
avctx
->
extradata_size
=
extradata
.
SPSBufSize
+
need_pps
*
extradata
.
PPSBufSize
;
avctx
->
extradata_size
=
extradata
.
SPSBufSize
+
need_pps
*
extradata
.
PPSBufSize
;
memset
(
avctx
->
extradata
+
avctx
->
extradata_size
,
0
,
AV_INPUT_BUFFER_PADDING_SIZE
);
memset
(
avctx
->
extradata
+
avctx
->
extradata_size
,
0
,
AV_INPUT_BUFFER_PADDING_SIZE
);
cpb_props
=
ff_add_cpb_side_data
(
avctx
);
if
(
!
cpb_props
)
return
AVERROR
(
ENOMEM
);
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
;
dump_video_param
(
avctx
,
q
,
ext_buffers
+
1
);
dump_video_param
(
avctx
,
q
,
ext_buffers
+
1
);
return
0
;
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