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
38934f19
Commit
38934f19
authored
Aug 27, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'psy' private option.
Deprecate CODEC_FLAG2_PSY
parent
a7cec3a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
avcodec.h
libavcodec/avcodec.h
+1
-1
libx264.c
libavcodec/libx264.c
+5
-2
options.c
libavcodec/options.c
+1
-1
No files found.
libavcodec/avcodec.h
View file @
38934f19
...
...
@@ -632,8 +632,8 @@ typedef struct RcOverride{
#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
#endif
#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
#define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
#if FF_API_X264_GLOBAL_OPTS
#define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
#define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
#define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes.
#endif
...
...
libavcodec/libx264.c
View file @
38934f19
...
...
@@ -47,6 +47,7 @@ typedef struct X264Context {
int
aq_mode
;
float
aq_strength
;
char
*
psy_rd
;
int
psy
;
int
rc_lookahead
;
int
weightp
;
int
weightb
;
...
...
@@ -243,8 +244,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_TESA
;
else
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_HEX
;
x4
->
params
.
analyse
.
b_psy
=
avctx
->
flags2
&
CODEC_FLAG2_PSY
;
x4
->
params
.
analyse
.
i_me_range
=
avctx
->
me_range
;
x4
->
params
.
analyse
.
i_subpel_refine
=
avctx
->
me_subpel_quality
;
...
...
@@ -331,6 +330,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
b_transform_8x8
=
avctx
->
flags2
&
CODEC_FLAG2_8X8DCT
;
x4
->
params
.
analyse
.
b_fast_pskip
=
avctx
->
flags2
&
CODEC_FLAG2_FASTPSKIP
;
x4
->
params
.
b_aud
=
avctx
->
flags2
&
CODEC_FLAG2_AUD
;
x4
->
params
.
analyse
.
b_psy
=
avctx
->
flags2
&
CODEC_FLAG2_PSY
;
#endif
if
(
x4
->
aq_mode
>=
0
)
...
...
@@ -341,6 +341,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error parsing option 'psy-rd' with value '%s'.
\n
"
,
x4
->
psy_rd
);
return
AVERROR
(
EINVAL
);
}
if
(
x4
->
psy
>=
0
)
x4
->
params
.
analyse
.
b_psy
=
x4
->
psy
;
if
(
x4
->
rc_lookahead
>=
0
)
x4
->
params
.
rc
.
i_lookahead
=
x4
->
rc_lookahead
;
if
(
x4
->
weightp
>=
0
)
...
...
@@ -440,6 +442,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
},
{
"psy"
,
"Use psychovisual optimizations."
,
OFFSET
(
psy
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"psy-rd"
,
"Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format."
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"rc-lookahead"
,
"Number of frames to look ahead for frametype and ratecontrol"
,
OFFSET
(
rc_lookahead
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
},
{
"weightb"
,
"Weighted prediction for B-frames."
,
OFFSET
(
weightb
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
...
...
libavcodec/options.c
View file @
38934f19
...
...
@@ -446,8 +446,8 @@ static const AVOption options[]={
{
"colorspace"
,
NULL
,
OFFSET
(
colorspace
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AVCOL_SPC_UNSPECIFIED
},
1
,
AVCOL_SPC_NB
-
1
,
V
|
E
|
D
},
{
"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"
},
#if FF_API_X264_GLOBAL_OPTS
{
"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
},
-
1
,
FLT_MAX
,
V
|
E
},
{
"psy_trellis"
,
"specify psycho visual trellis"
,
OFFSET
(
psy_trellis
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
},
-
1
,
FLT_MAX
,
V
|
E
},
{
"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