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
93e623c6
Commit
93e623c6
authored
Aug 22, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'psy_rd' private option.
Deprecate corresponding global option.
parent
5c75b2a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
avcodec.h
libavcodec/avcodec.h
+2
-2
libx264.c
libavcodec/libx264.c
+7
-1
options.c
libavcodec/options.c
+3
-1
No files found.
libavcodec/avcodec.h
View file @
93e623c6
...
...
@@ -2740,7 +2740,6 @@ typedef struct AVCodecContext {
* - decoding: unused
*/
attribute_deprecated
float
aq_strength
;
#endif
/**
* PSY RD
...
...
@@ -2748,7 +2747,8 @@ typedef struct AVCodecContext {
* - encoding: Set by user
* - decoding: unused
*/
float
psy_rd
;
attribute_deprecated
float
psy_rd
;
#endif
/**
* PSY trellis
...
...
libavcodec/libx264.c
View file @
93e623c6
...
...
@@ -45,6 +45,7 @@ typedef struct X264Context {
int
cqp
;
int
aq_mode
;
float
aq_strength
;
float
psy_rd
;
}
X264Context
;
static
void
X264_log
(
void
*
p
,
int
level
,
const
char
*
fmt
,
va_list
args
)
...
...
@@ -239,7 +240,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
i_lookahead
=
avctx
->
rc_lookahead
;
x4
->
params
.
analyse
.
b_psy
=
avctx
->
flags2
&
CODEC_FLAG2_PSY
;
x4
->
params
.
analyse
.
f_psy_rd
=
avctx
->
psy_rd
;
x4
->
params
.
analyse
.
f_psy_trellis
=
avctx
->
psy_trellis
;
x4
->
params
.
analyse
.
i_me_range
=
avctx
->
me_range
;
...
...
@@ -313,12 +313,17 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
i_aq_mode
=
avctx
->
aq_mode
;
if
(
avctx
->
aq_strength
>=
0
)
x4
->
params
.
rc
.
f_aq_strength
=
avctx
->
aq_strength
;
if
(
avctx
->
psy_rd
>=
0
)
x4
->
params
.
analyse
.
f_psy_rd
=
avctx
->
psy_rd
;
#endif
if
(
x4
->
aq_mode
>=
0
)
x4
->
params
.
rc
.
i_aq_mode
=
x4
->
aq_mode
;
if
(
x4
->
aq_strength
>=
0
)
x4
->
params
.
rc
.
f_aq_strength
=
x4
->
aq_strength
;
if
(
x4
->
psy_rd
>=
0
)
x4
->
params
.
analyse
.
f_psy_rd
=
x4
->
psy_rd
;
if
(
x4
->
fastfirstpass
)
x264_param_apply_fastfirstpass
(
&
x4
->
params
);
...
...
@@ -399,6 +404,7 @@ static const AVOption options[] = {
{
"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"
},
{
"aq_strength"
,
"AQ strength. Reduces blocking and blurring in flat and textured areas."
,
OFFSET
(
aq_strength
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"pdy_rd"
,
"Psy RD strength."
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
NULL
},
};
...
...
libavcodec/options.c
View file @
93e623c6
...
...
@@ -437,7 +437,9 @@ static const AVOption options[]={
{
"color_range"
,
NULL
,
OFFSET
(
color_range
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AVCOL_RANGE_UNSPECIFIED
},
0
,
AVCOL_RANGE_NB
-
1
,
V
|
E
|
D
},
{
"chroma_sample_location"
,
NULL
,
OFFSET
(
chroma_sample_location
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AVCHROMA_LOC_UNSPECIFIED
},
0
,
AVCHROMA_LOC_NB
-
1
,
V
|
E
|
D
},
{
"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
},
#if FF_API_X264_GLOBAL_OPTS
{
"psy_rd"
,
"specify psycho visual strength"
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
,
FLT_MAX
,
V
|
E
},
#endif
{
"psy_trellis"
,
"specify psycho visual trellis"
,
OFFSET
(
psy_trellis
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
FLT_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
},
...
...
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