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
c5dd0bc4
Commit
c5dd0bc4
authored
Aug 22, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'weightp' private option.
Deprecate corresponding global option.
parent
d4b96713
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
avcodec.h
libavcodec/avcodec.h
+2
-2
libx264.c
libavcodec/libx264.c
+10
-1
options.c
libavcodec/options.c
+3
-1
No files found.
libavcodec/avcodec.h
View file @
c5dd0bc4
...
...
@@ -2712,6 +2712,7 @@ typedef struct AVCodecContext {
*/
int
(
*
execute2
)(
struct
AVCodecContext
*
c
,
int
(
*
func
)(
struct
AVCodecContext
*
c2
,
void
*
arg
,
int
jobnr
,
int
threadnr
),
void
*
arg2
,
int
*
ret
,
int
count
);
#if FF_API_X264_GLOBAL_OPTS
/**
* explicit P-frame weighted prediction analysis method
* 0: off
...
...
@@ -2720,9 +2721,8 @@ typedef struct AVCodecContext {
* - encoding: Set by user.
* - decoding: unused
*/
int
weighted_p_pred
;
attribute_deprecated
int
weighted_p_pred
;
#if FF_API_X264_GLOBAL_OPTS
/**
* AQ mode
* 0: Disabled
...
...
libavcodec/libx264.c
View file @
c5dd0bc4
...
...
@@ -48,6 +48,7 @@ typedef struct X264Context {
float
psy_rd
;
float
psy_trellis
;
int
rc_lookahead
;
int
weightp
;
}
X264Context
;
static
void
X264_log
(
void
*
p
,
int
level
,
const
char
*
fmt
,
va_list
args
)
...
...
@@ -225,7 +226,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
i_direct_mv_pred
=
avctx
->
directpred
;
x4
->
params
.
analyse
.
b_weighted_bipred
=
avctx
->
flags2
&
CODEC_FLAG2_WPRED
;
x4
->
params
.
analyse
.
i_weighted_pred
=
avctx
->
weighted_p_pred
;
if
(
avctx
->
me_method
==
ME_EPZS
)
x4
->
params
.
analyse
.
i_me_method
=
X264_ME_DIA
;
...
...
@@ -318,6 +318,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
f_psy_trellis
=
avctx
->
psy_trellis
;
if
(
avctx
->
rc_lookahead
>=
0
)
x4
->
params
.
rc
.
i_lookahead
=
avctx
->
rc_lookahead
;
if
(
avctx
->
weighted_p_pred
>=
0
)
x4
->
params
.
analyse
.
i_weighted_pred
=
avctx
->
weighted_p_pred
;
#endif
if
(
x4
->
aq_mode
>=
0
)
...
...
@@ -330,6 +332,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
f_psy_trellis
=
x4
->
psy_trellis
;
if
(
x4
->
rc_lookahead
>=
0
)
x4
->
params
.
rc
.
i_lookahead
=
x4
->
rc_lookahead
;
if
(
x4
->
weightp
>=
0
)
x4
->
params
.
analyse
.
i_weighted_pred
=
x4
->
weightp
;
if
(
x4
->
fastfirstpass
)
...
...
@@ -414,6 +419,10 @@ static const AVOption options[] = {
{
"pdy_rd"
,
"Psy RD strength."
,
OFFSET
(
psy_rd
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"psy_trellis"
,
"Psy trellis strength"
,
OFFSET
(
psy_trellis
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
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
},
{
"weightp"
,
"Weighted prediction analysis method."
,
OFFSET
(
weightp
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
INT_MAX
,
VE
,
"weightp"
},
{
"none"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_WEIGHTP_NONE
},
INT_MIN
,
INT_MAX
,
VE
,
"weightp"
},
{
"simple"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_WEIGHTP_SIMPLE
},
INT_MIN
,
INT_MAX
,
VE
,
"weightp"
},
{
"smart"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{
X264_WEIGHTP_SMART
},
INT_MIN
,
INT_MAX
,
VE
,
"weightp"
},
{
NULL
},
};
...
...
libavcodec/options.c
View file @
c5dd0bc4
...
...
@@ -141,7 +141,9 @@ static const AVOption options[]={
{
"b_qfactor"
,
"qp factor between p and b frames"
,
OFFSET
(
b_quant_factor
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
25
},
-
FLT_MAX
,
FLT_MAX
,
V
|
E
},
{
"rc_strategy"
,
"ratecontrol method"
,
OFFSET
(
rc_strategy
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"b_strategy"
,
"strategy to choose between I/P/B-frames"
,
OFFSET
(
b_frame_strategy
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"wpredp"
,
"weighted prediction analysis method"
,
OFFSET
(
weighted_p_pred
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
V
|
E
},
#if FF_API_X264_GLOBAL_OPTS
{
"wpredp"
,
"weighted prediction analysis method"
,
OFFSET
(
weighted_p_pred
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
INT_MIN
,
INT_MAX
,
V
|
E
},
#endif
{
"ps"
,
"rtp payload size in bytes"
,
OFFSET
(
rtp_payload_size
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"mv_bits"
,
NULL
,
OFFSET
(
mv_bits
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
},
{
"header_bits"
,
NULL
,
OFFSET
(
header_bits
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
},
...
...
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