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
0dc5e12f
Commit
0dc5e12f
authored
Aug 27, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'mbtree' private option.
Deprecate CODEC_FLAG2_MBTREE
parent
38934f19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
avcodec.h
libavcodec/avcodec.h
+1
-1
libx264.c
libavcodec/libx264.c
+5
-1
options.c
libavcodec/options.c
+2
-0
No files found.
libavcodec/avcodec.h
View file @
0dc5e12f
...
@@ -631,8 +631,8 @@ typedef struct RcOverride{
...
@@ -631,8 +631,8 @@ typedef struct RcOverride{
#if FF_API_LAME_GLOBAL_OPTS
#if FF_API_LAME_GLOBAL_OPTS
#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
#define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
#endif
#endif
#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
#if FF_API_X264_GLOBAL_OPTS
#if FF_API_X264_GLOBAL_OPTS
#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
#define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
#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_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.
#define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes.
...
...
libavcodec/libx264.c
View file @
0dc5e12f
...
@@ -58,6 +58,7 @@ typedef struct X264Context {
...
@@ -58,6 +58,7 @@ typedef struct X264Context {
int
dct8x8
;
int
dct8x8
;
int
fast_pskip
;
int
fast_pskip
;
int
aud
;
int
aud
;
int
mbtree
;
}
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
)
...
@@ -304,7 +305,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -304,7 +305,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
(
float
)
avctx
->
rc_initial_buffer_occupancy
/
avctx
->
rc_buffer_size
;
(
float
)
avctx
->
rc_initial_buffer_occupancy
/
avctx
->
rc_buffer_size
;
}
}
x4
->
params
.
rc
.
b_mb_tree
=
!!
(
avctx
->
flags2
&
CODEC_FLAG2_MBTREE
);
x4
->
params
.
rc
.
f_ip_factor
=
1
/
fabs
(
avctx
->
i_quant_factor
);
x4
->
params
.
rc
.
f_ip_factor
=
1
/
fabs
(
avctx
->
i_quant_factor
);
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
;
...
@@ -331,6 +331,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -331,6 +331,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
b_fast_pskip
=
avctx
->
flags2
&
CODEC_FLAG2_FASTPSKIP
;
x4
->
params
.
analyse
.
b_fast_pskip
=
avctx
->
flags2
&
CODEC_FLAG2_FASTPSKIP
;
x4
->
params
.
b_aud
=
avctx
->
flags2
&
CODEC_FLAG2_AUD
;
x4
->
params
.
b_aud
=
avctx
->
flags2
&
CODEC_FLAG2_AUD
;
x4
->
params
.
analyse
.
b_psy
=
avctx
->
flags2
&
CODEC_FLAG2_PSY
;
x4
->
params
.
analyse
.
b_psy
=
avctx
->
flags2
&
CODEC_FLAG2_PSY
;
x4
->
params
.
rc
.
b_mb_tree
=
!!
(
avctx
->
flags2
&
CODEC_FLAG2_MBTREE
);
#endif
#endif
if
(
x4
->
aq_mode
>=
0
)
if
(
x4
->
aq_mode
>=
0
)
...
@@ -364,6 +365,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -364,6 +365,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
analyse
.
b_fast_pskip
=
x4
->
fast_pskip
;
x4
->
params
.
analyse
.
b_fast_pskip
=
x4
->
fast_pskip
;
if
(
x4
->
aud
>=
0
)
if
(
x4
->
aud
>=
0
)
x4
->
params
.
b_aud
=
x4
->
aud
;
x4
->
params
.
b_aud
=
x4
->
aud
;
if
(
x4
->
mbtree
>=
0
)
x4
->
params
.
rc
.
b_mb_tree
=
x4
->
mbtree
;
if
(
x4
->
fastfirstpass
)
if
(
x4
->
fastfirstpass
)
x264_param_apply_fastfirstpass
(
&
x4
->
params
);
x264_param_apply_fastfirstpass
(
&
x4
->
params
);
...
@@ -460,6 +463,7 @@ static const AVOption options[] = {
...
@@ -460,6 +463,7 @@ static const AVOption options[] = {
{
"8x8dct"
,
"High profile 8x8 transform."
,
OFFSET
(
dct8x8
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"8x8dct"
,
"High profile 8x8 transform."
,
OFFSET
(
dct8x8
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"fast-pskip"
,
NULL
,
OFFSET
(
fast_pskip
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"fast-pskip"
,
NULL
,
OFFSET
(
fast_pskip
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"aud"
,
"Use access unit delimiters."
,
OFFSET
(
aud
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"aud"
,
"Use access unit delimiters."
,
OFFSET
(
aud
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"mbtree"
,
"Use macroblock tree ratecontrol."
,
OFFSET
(
mbtree
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
NULL
},
{
NULL
},
};
};
...
...
libavcodec/options.c
View file @
0dc5e12f
...
@@ -434,7 +434,9 @@ static const AVOption options[]={
...
@@ -434,7 +434,9 @@ static const AVOption options[]={
#if FF_API_LAME_GLOBAL_OPTS
#if FF_API_LAME_GLOBAL_OPTS
{
"reservoir"
,
"use bit reservoir"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_BIT_RESERVOIR
},
INT_MIN
,
INT_MAX
,
A
|
E
,
"flags2"
},
{
"reservoir"
,
"use bit reservoir"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_BIT_RESERVOIR
},
INT_MIN
,
INT_MAX
,
A
|
E
,
"flags2"
},
#endif
#endif
#if FF_API_X264_GLOBAL_OPTS
{
"mbtree"
,
"use macroblock tree ratecontrol (x264 only)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_MBTREE
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"mbtree"
,
"use macroblock tree ratecontrol (x264 only)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_MBTREE
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
#endif
{
"bits_per_raw_sample"
,
NULL
,
OFFSET
(
bits_per_raw_sample
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
},
{
"bits_per_raw_sample"
,
NULL
,
OFFSET
(
bits_per_raw_sample
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
},
{
"channel_layout"
,
NULL
,
OFFSET
(
channel_layout
),
FF_OPT_TYPE_INT64
,
{.
dbl
=
DEFAULT
},
0
,
INT64_MAX
,
A
|
E
|
D
,
"channel_layout"
},
{
"channel_layout"
,
NULL
,
OFFSET
(
channel_layout
),
FF_OPT_TYPE_INT64
,
{.
dbl
=
DEFAULT
},
0
,
INT64_MAX
,
A
|
E
|
D
,
"channel_layout"
},
{
"request_channel_layout"
,
NULL
,
OFFSET
(
request_channel_layout
),
FF_OPT_TYPE_INT64
,
{.
dbl
=
DEFAULT
},
0
,
INT64_MAX
,
A
|
D
,
"request_channel_layout"
},
{
"request_channel_layout"
,
NULL
,
OFFSET
(
request_channel_layout
),
FF_OPT_TYPE_INT64
,
{.
dbl
=
DEFAULT
},
0
,
INT64_MAX
,
A
|
D
,
"request_channel_layout"
},
...
...
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