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
f83c4518
Commit
f83c4518
authored
Sep 01, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'b-bias' private option
Deprecate AVCodecContext.bframebias.
parent
bb73cda2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
avcodec.h
libavcodec/avcodec.h
+3
-1
libx264.c
libavcodec/libx264.c
+6
-1
options.c
libavcodec/options.c
+2
-0
No files found.
libavcodec/avcodec.h
View file @
f83c4518
...
...
@@ -2433,12 +2433,14 @@ typedef struct AVCodecContext {
*/
int
chromaoffset
;
#if FF_API_X264_GLOBAL_OPTS
/**
* Influences how often B-frames are used.
* - encoding: Set by user.
* - decoding: unused
*/
int
bframebias
;
attribute_deprecated
int
bframebias
;
#endif
/**
* trellis RD quantization
...
...
libavcodec/libx264.c
View file @
f83c4518
...
...
@@ -53,6 +53,7 @@ typedef struct X264Context {
int
weightb
;
int
ssim
;
int
intra_refresh
;
int
b_bias
;
int
b_pyramid
;
int
mixed_refs
;
int
dct8x8
;
...
...
@@ -191,7 +192,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
b_cabac
=
avctx
->
coder_type
==
FF_CODER_TYPE_AC
;
x4
->
params
.
i_bframe_adaptive
=
avctx
->
b_frame_strategy
;
x4
->
params
.
i_bframe_bias
=
avctx
->
bframebias
;
x4
->
params
.
i_keyint_min
=
avctx
->
keyint_min
;
if
(
x4
->
params
.
i_keyint_min
>
x4
->
params
.
i_keyint_max
)
...
...
@@ -308,6 +308,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
i_lookahead
=
avctx
->
rc_lookahead
;
if
(
avctx
->
weighted_p_pred
>=
0
)
x4
->
params
.
analyse
.
i_weighted_pred
=
avctx
->
weighted_p_pred
;
if
(
avctx
->
bframebias
)
x4
->
params
.
i_bframe_bias
=
avctx
->
bframebias
;
x4
->
params
.
analyse
.
b_ssim
=
avctx
->
flags2
&
CODEC_FLAG2_SSIM
;
x4
->
params
.
b_intra_refresh
=
avctx
->
flags2
&
CODEC_FLAG2_INTRA_REFRESH
;
x4
->
params
.
i_bframe_pyramid
=
avctx
->
flags2
&
CODEC_FLAG2_BPYRAMID
?
X264_B_PYRAMID_NORMAL
:
X264_B_PYRAMID_NONE
;
...
...
@@ -360,6 +362,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
b_ssim
=
x4
->
ssim
;
if
(
x4
->
intra_refresh
>=
0
)
x4
->
params
.
b_intra_refresh
=
x4
->
intra_refresh
;
if
(
x4
->
b_bias
!=
INT_MIN
)
x4
->
params
.
i_bframe_bias
=
x4
->
b_bias
;
if
(
x4
->
b_pyramid
>=
0
)
x4
->
params
.
i_bframe_pyramid
=
x4
->
b_pyramid
;
if
(
x4
->
mixed_refs
>=
0
)
...
...
@@ -460,6 +464,7 @@ static const AVOption options[] = {
{
"smart"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_WEIGHTP_SMART
},
INT_MIN
,
INT_MAX
,
VE
,
"weightp"
},
{
"ssim"
,
"Calculate and print SSIM stats."
,
OFFSET
(
ssim
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"intra-refresh"
,
"Use Periodic Intra Refresh instead of IDR frames."
,
OFFSET
(
intra_refresh
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"b-bias"
,
"Influences how often B-frames are used"
,
OFFSET
(
b_bias
),
FF_OPT_TYPE_INT
,
{
INT_MIN
},
INT_MIN
,
INT_MAX
,
VE
},
{
"b-pyramid"
,
"Keep some B-frames as references."
,
OFFSET
(
b_pyramid
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
,
"b_pyramid"
},
{
"none"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_B_PYRAMID_NONE
},
INT_MIN
,
INT_MAX
,
VE
,
"b_pyramid"
},
{
"strict"
,
"Strictly hierarchical pyramid"
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_B_PYRAMID_STRICT
},
INT_MIN
,
INT_MAX
,
VE
,
"b_pyramid"
},
...
...
libavcodec/options.c
View file @
f83c4518
...
...
@@ -398,7 +398,9 @@ static const AVOption options[]={
{
"keyint_min"
,
"minimum interval between IDR-frames (x264)"
,
OFFSET
(
keyint_min
),
FF_OPT_TYPE_INT
,
{.
dbl
=
25
},
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"refs"
,
"reference frames to consider for motion compensation (Snow)"
,
OFFSET
(
refs
),
FF_OPT_TYPE_INT
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"chromaoffset"
,
"chroma qp offset from luma"
,
OFFSET
(
chromaoffset
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
},
#if FF_API_X264_GLOBAL_OPTS
{
"bframebias"
,
"influences how often B-frames are used"
,
OFFSET
(
bframebias
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
},
#endif
{
"trellis"
,
"rate-distortion optimal quantization"
,
OFFSET
(
trellis
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
A
|
E
},
{
"directpred"
,
"direct mv prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)"
,
OFFSET
(
directpred
),
FF_OPT_TYPE_INT
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
V
|
E
},
#if FF_API_X264_GLOBAL_OPTS
...
...
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