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
85254fcb
Commit
85254fcb
authored
Aug 22, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'aq_mode' private option.
Deprecate corresponding global option.
parent
9d508e49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
avcodec.h
libavcodec/avcodec.h
+3
-1
libx264.c
libavcodec/libx264.c
+14
-1
options.c
libavcodec/options.c
+3
-1
No files found.
libavcodec/avcodec.h
View file @
85254fcb
...
@@ -2722,6 +2722,7 @@ typedef struct AVCodecContext {
...
@@ -2722,6 +2722,7 @@ typedef struct AVCodecContext {
*/
*/
int
weighted_p_pred
;
int
weighted_p_pred
;
#if FF_API_X264_GLOBAL_OPTS
/**
/**
* AQ mode
* AQ mode
* 0: Disabled
* 0: Disabled
...
@@ -2730,7 +2731,8 @@ typedef struct AVCodecContext {
...
@@ -2730,7 +2731,8 @@ typedef struct AVCodecContext {
* - encoding: Set by user
* - encoding: Set by user
* - decoding: unused
* - decoding: unused
*/
*/
int
aq_mode
;
attribute_deprecated
int
aq_mode
;
#endif
/**
/**
* AQ strength
* AQ strength
...
...
libavcodec/libx264.c
View file @
85254fcb
...
@@ -43,6 +43,7 @@ typedef struct X264Context {
...
@@ -43,6 +43,7 @@ typedef struct X264Context {
int
fastfirstpass
;
int
fastfirstpass
;
float
crf
;
float
crf
;
int
cqp
;
int
cqp
;
int
aq_mode
;
}
X264Context
;
}
X264Context
;
static
void
X264_log
(
void
*
p
,
int
level
,
const
char
*
fmt
,
va_list
args
)
static
void
X264_log
(
void
*
p
,
int
level
,
const
char
*
fmt
,
va_list
args
)
...
@@ -234,7 +235,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -234,7 +235,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_TESA
;
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_TESA
;
else
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_HEX
;
else
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_HEX
;
x4
->
params
.
rc
.
i_aq_mode
=
avctx
->
aq_mode
;
x4
->
params
.
rc
.
f_aq_strength
=
avctx
->
aq_strength
;
x4
->
params
.
rc
.
f_aq_strength
=
avctx
->
aq_strength
;
x4
->
params
.
rc
.
i_lookahead
=
avctx
->
rc_lookahead
;
x4
->
params
.
rc
.
i_lookahead
=
avctx
->
rc_lookahead
;
...
@@ -308,6 +308,15 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -308,6 +308,15 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
f_pb_factor
=
avctx
->
b_quant_factor
;
x4
->
params
.
rc
.
f_pb_factor
=
avctx
->
b_quant_factor
;
x4
->
params
.
analyse
.
i_chroma_qp_offset
=
avctx
->
chromaoffset
;
x4
->
params
.
analyse
.
i_chroma_qp_offset
=
avctx
->
chromaoffset
;
#if FF_API_X264_GLOBAL_OPTS
if
(
avctx
->
aq_mode
>=
0
)
x4
->
params
.
rc
.
i_aq_mode
=
avctx
->
aq_mode
;
#endif
if
(
x4
->
aq_mode
>=
0
)
x4
->
params
.
rc
.
i_aq_mode
=
x4
->
aq_mode
;
if
(
x4
->
fastfirstpass
)
if
(
x4
->
fastfirstpass
)
x264_param_apply_fastfirstpass
(
&
x4
->
params
);
x264_param_apply_fastfirstpass
(
&
x4
->
params
);
...
@@ -382,6 +391,10 @@ static const AVOption options[] = {
...
@@ -382,6 +391,10 @@ static const AVOption options[] = {
{
"fastfirstpass"
,
"Use fast settings when encoding first pass"
,
OFFSET
(
fastfirstpass
),
FF_OPT_TYPE_INT
,
{
1
},
0
,
1
,
VE
},
{
"fastfirstpass"
,
"Use fast settings when encoding first pass"
,
OFFSET
(
fastfirstpass
),
FF_OPT_TYPE_INT
,
{
1
},
0
,
1
,
VE
},
{
"crf"
,
"Select the quality for constant quality mode"
,
OFFSET
(
crf
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"crf"
,
"Select the quality for constant quality mode"
,
OFFSET
(
crf
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"cqp"
,
"Constant quantization parameter rate control method"
,
OFFSET
(
cqp
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
},
{
"cqp"
,
"Constant quantization parameter rate control method"
,
OFFSET
(
cqp
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
},
{
"aq_mode"
,
"AQ method"
,
OFFSET
(
aq_mode
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
,
"aq_mode"
},
{
"none"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_AQ_NONE
},
INT_MIN
,
INT_MAX
,
VE
,
"aq_mode"
},
{
"variance"
,
"Variance AQ (complexity mask)"
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_AQ_VARIANCE
},
INT_MIN
,
INT_MAX
,
VE
,
"aq_mode"
},
{
"autovariance"
,
"Auto-variance AQ (experimental)"
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_AQ_AUTOVARIANCE
},
INT_MIN
,
INT_MAX
,
VE
,
"aq_mode"
},
{
NULL
},
{
NULL
},
};
};
...
...
libavcodec/options.c
View file @
85254fcb
...
@@ -439,7 +439,9 @@ static const AVOption options[]={
...
@@ -439,7 +439,9 @@ static const AVOption options[]={
{
"psy"
,
"use psycho visual optimization"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_PSY
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"psy"
,
"use psycho visual optimization"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_PSY
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"psy_rd"
,
"specify psycho visual strength"
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"psy_rd"
,
"specify psycho visual strength"
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"psy_trellis"
,
"specify psycho visual trellis"
,
OFFSET
(
psy_trellis
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"psy_trellis"
,
"specify psycho visual trellis"
,
OFFSET
(
psy_trellis
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"aq_mode"
,
"specify aq method"
,
OFFSET
(
aq_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
1
},
0
,
INT_MAX
,
V
|
E
},
#if FF_API_X264_GLOBAL_OPTS
{
"aq_mode"
,
"specify aq method"
,
OFFSET
(
aq_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
INT_MAX
,
V
|
E
},
#endif
{
"aq_strength"
,
"specify aq strength"
,
OFFSET
(
aq_strength
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"aq_strength"
,
"specify aq strength"
,
OFFSET
(
aq_strength
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
0
,
FLT_MAX
,
V
|
E
},
{
"rc_lookahead"
,
"specify number of frames to look ahead for frametype"
,
OFFSET
(
rc_lookahead
),
FF_OPT_TYPE_INT
,
{.
dbl
=
40
},
0
,
INT_MAX
,
V
|
E
},
{
"rc_lookahead"
,
"specify number of frames to look ahead for frametype"
,
OFFSET
(
rc_lookahead
),
FF_OPT_TYPE_INT
,
{.
dbl
=
40
},
0
,
INT_MAX
,
V
|
E
},
{
"ssim"
,
"ssim will be calculated during encoding"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_SSIM
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"ssim"
,
"ssim will be calculated during encoding"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_SSIM
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
...
...
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