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
0a7afedc
Commit
0a7afedc
authored
Oct 01, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libx264: add avcintra-class
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
23f0e2ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
encoders.texi
doc/encoders.texi
+4
-0
libx264.c
libavcodec/libx264.c
+7
-0
No files found.
doc/encoders.texi
View file @
0a7afedc
...
...
@@ -1745,6 +1745,10 @@ Enable calculation and printing SSIM stats after the encoding.
Enable the use of Periodic Intra Refresh instead of IDR frames when set
to 1.
@item avcintra-class (@emph{class})
Configure the encoder to generate AVC-Intra.
Valid values are 50,100 and 200
@item bluray-compat (@emph{bluray-compat})
Configure the encoder to be compatible with the bluray standard.
It is a shorthand for setting "bluray-compat=1 force-cfr=1".
...
...
libavcodec/libx264.c
View file @
0a7afedc
...
...
@@ -80,6 +80,7 @@ typedef struct X264Context {
int
slice_max_size
;
char
*
stats
;
int
nal_hrd
;
int
avcintra_class
;
char
*
x264_params
;
}
X264Context
;
...
...
@@ -183,6 +184,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
frame
->
pict_type
==
AV_PICTURE_TYPE_P
?
X264_TYPE_P
:
frame
->
pict_type
==
AV_PICTURE_TYPE_B
?
X264_TYPE_B
:
X264_TYPE_AUTO
;
if
(
x4
->
avcintra_class
<
0
)
{
if
(
x4
->
params
.
b_interlaced
&&
x4
->
params
.
b_tff
!=
frame
->
top_field_first
)
{
x4
->
params
.
b_tff
=
frame
->
top_field_first
;
x264_encoder_reconfig
(
x4
->
enc
,
&
x4
->
params
);
...
...
@@ -226,6 +229,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
x4
->
params
.
rc
.
f_rf_constant_max
=
x4
->
crf_max
;
x264_encoder_reconfig
(
x4
->
enc
,
&
x4
->
params
);
}
}
side_data
=
av_frame_get_side_data
(
frame
,
AV_FRAME_DATA_STEREO3D
);
if
(
side_data
)
{
...
...
@@ -528,6 +532,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
b_bluray_compat
=
x4
->
bluray_compat
;
x4
->
params
.
b_vfr_input
=
0
;
}
if
(
x4
->
avcintra_class
>=
0
)
x4
->
params
.
i_avcintra_class
=
x4
->
avcintra_class
;
if
(
x4
->
b_bias
!=
INT_MIN
)
x4
->
params
.
i_bframe_bias
=
x4
->
b_bias
;
if
(
x4
->
b_pyramid
>=
0
)
...
...
@@ -805,6 +811,7 @@ static const AVOption options[] = {
{
"none"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
X264_NAL_HRD_NONE
},
INT_MIN
,
INT_MAX
,
VE
,
"nal-hrd"
},
{
"vbr"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
X264_NAL_HRD_VBR
},
INT_MIN
,
INT_MAX
,
VE
,
"nal-hrd"
},
{
"cbr"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
X264_NAL_HRD_CBR
},
INT_MIN
,
INT_MAX
,
VE
,
"nal-hrd"
},
{
"avcintra-class"
,
"AVC-Intra class 50/100/200"
,
OFFSET
(
avcintra_class
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
200
,
VE
},
{
"x264-params"
,
"Override the x264 configuration using a :-separated list of key=value parameters"
,
OFFSET
(
x264_params
),
AV_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
NULL
},
};
...
...
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