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
0635a8aa
Commit
0635a8aa
authored
Sep 01, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libx264: add 'partitions' private option
Deprecate AVCodecContext.partitions.
parent
70423376
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
avcodec.h
libavcodec/avcodec.h
+2
-2
libx264.c
libavcodec/libx264.c
+16
-14
options.c
libavcodec/options.c
+1
-1
ffmdec.c
libavformat/ffmdec.c
+0
-1
ffmenc.c
libavformat/ffmenc.c
+0
-1
ffm
tests/ref/lavf/ffm
+1
-1
No files found.
libavcodec/avcodec.h
View file @
0635a8aa
...
@@ -2472,19 +2472,19 @@ typedef struct AVCodecContext {
...
@@ -2472,19 +2472,19 @@ typedef struct AVCodecContext {
* - decoding: unused
* - decoding: unused
*/
*/
attribute_deprecated
int
deblockbeta
;
attribute_deprecated
int
deblockbeta
;
#endif
/**
/**
* macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4
* macroblock subpartition sizes to consider - p8x8, p4x4, b8x8, i8x8, i4x4
* - encoding: Set by user.
* - encoding: Set by user.
* - decoding: unused
* - decoding: unused
*/
*/
int
partitions
;
attribute_deprecated
int
partitions
;
#define X264_PART_I4X4 0x001
/* Analyze i4x4 */
#define X264_PART_I4X4 0x001
/* Analyze i4x4 */
#define X264_PART_I8X8 0x002
/* Analyze i8x8 (requires 8x8 transform) */
#define X264_PART_I8X8 0x002
/* Analyze i8x8 (requires 8x8 transform) */
#define X264_PART_P8X8 0x010
/* Analyze p16x8, p8x16 and p8x8 */
#define X264_PART_P8X8 0x010
/* Analyze p16x8, p8x16 and p8x8 */
#define X264_PART_P4X4 0x020
/* Analyze p8x4, p4x8, p4x4 */
#define X264_PART_P4X4 0x020
/* Analyze p8x4, p4x8, p4x4 */
#define X264_PART_B8X8 0x100
/* Analyze b16x8, b8x16 and b8x8 */
#define X264_PART_B8X8 0x100
/* Analyze b16x8, b8x16 and b8x8 */
#endif
/**
/**
* direct MV prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)
* direct MV prediction mode - 0 (none), 1 (spatial), 2 (temporal), 3 (auto)
...
...
libavcodec/libx264.c
View file @
0635a8aa
...
@@ -62,6 +62,7 @@ typedef struct X264Context {
...
@@ -62,6 +62,7 @@ typedef struct X264Context {
int
mbtree
;
int
mbtree
;
char
*
deblock
;
char
*
deblock
;
float
cplxblur
;
float
cplxblur
;
char
*
partitions
;
}
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
)
...
@@ -207,20 +208,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -207,20 +208,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
b_deblocking_filter
=
avctx
->
flags
&
CODEC_FLAG_LOOP_FILTER
;
x4
->
params
.
b_deblocking_filter
=
avctx
->
flags
&
CODEC_FLAG_LOOP_FILTER
;
x4
->
params
.
analyse
.
inter
=
0
;
if
(
avctx
->
partitions
)
{
if
(
avctx
->
partitions
&
X264_PART_I4X4
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_I4x4
;
if
(
avctx
->
partitions
&
X264_PART_I8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_I8x8
;
if
(
avctx
->
partitions
&
X264_PART_P8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_PSUB16x16
;
if
(
avctx
->
partitions
&
X264_PART_P4X4
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_PSUB8x8
;
if
(
avctx
->
partitions
&
X264_PART_B8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_BSUB16x16
;
}
x4
->
params
.
analyse
.
i_direct_mv_pred
=
avctx
->
directpred
;
x4
->
params
.
analyse
.
i_direct_mv_pred
=
avctx
->
directpred
;
if
(
avctx
->
me_method
==
ME_EPZS
)
if
(
avctx
->
me_method
==
ME_EPZS
)
...
@@ -320,6 +307,18 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -320,6 +307,18 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
i_deblocking_filter_beta
=
avctx
->
deblockbeta
;
x4
->
params
.
i_deblocking_filter_beta
=
avctx
->
deblockbeta
;
if
(
avctx
->
complexityblur
>=
0
)
if
(
avctx
->
complexityblur
>=
0
)
x4
->
params
.
rc
.
f_complexity_blur
=
avctx
->
complexityblur
;
x4
->
params
.
rc
.
f_complexity_blur
=
avctx
->
complexityblur
;
if
(
avctx
->
partitions
)
{
if
(
avctx
->
partitions
&
X264_PART_I4X4
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_I4x4
;
if
(
avctx
->
partitions
&
X264_PART_I8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_I8x8
;
if
(
avctx
->
partitions
&
X264_PART_P8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_PSUB16x16
;
if
(
avctx
->
partitions
&
X264_PART_P4X4
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_PSUB8x8
;
if
(
avctx
->
partitions
&
X264_PART_B8X8
)
x4
->
params
.
analyse
.
inter
|=
X264_ANALYSE_BSUB16x16
;
}
x4
->
params
.
analyse
.
b_ssim
=
avctx
->
flags2
&
CODEC_FLAG2_SSIM
;
x4
->
params
.
analyse
.
b_ssim
=
avctx
->
flags2
&
CODEC_FLAG2_SSIM
;
x4
->
params
.
b_intra_refresh
=
avctx
->
flags2
&
CODEC_FLAG2_INTRA_REFRESH
;
x4
->
params
.
b_intra_refresh
=
avctx
->
flags2
&
CODEC_FLAG2_INTRA_REFRESH
;
x4
->
params
.
i_bframe_pyramid
=
avctx
->
flags2
&
CODEC_FLAG2_BPYRAMID
?
X264_B_PYRAMID_NORMAL
:
X264_B_PYRAMID_NONE
;
x4
->
params
.
i_bframe_pyramid
=
avctx
->
flags2
&
CODEC_FLAG2_BPYRAMID
?
X264_B_PYRAMID_NORMAL
:
X264_B_PYRAMID_NONE
;
...
@@ -357,6 +356,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
...
@@ -357,6 +356,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
rc
.
f_aq_strength
=
x4
->
aq_strength
;
x4
->
params
.
rc
.
f_aq_strength
=
x4
->
aq_strength
;
PARSE_X264_OPT
(
"psy-rd"
,
psy_rd
);
PARSE_X264_OPT
(
"psy-rd"
,
psy_rd
);
PARSE_X264_OPT
(
"deblock"
,
deblock
);
PARSE_X264_OPT
(
"deblock"
,
deblock
);
PARSE_X264_OPT
(
"partitions"
,
partitions
);
if
(
x4
->
psy
>=
0
)
if
(
x4
->
psy
>=
0
)
x4
->
params
.
analyse
.
b_psy
=
x4
->
psy
;
x4
->
params
.
analyse
.
b_psy
=
x4
->
psy
;
if
(
x4
->
rc_lookahead
>=
0
)
if
(
x4
->
rc_lookahead
>=
0
)
...
@@ -486,6 +486,8 @@ static const AVOption options[] = {
...
@@ -486,6 +486,8 @@ static const AVOption options[] = {
{
"mbtree"
,
"Use macroblock tree ratecontrol."
,
OFFSET
(
mbtree
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"mbtree"
,
"Use macroblock tree ratecontrol."
,
OFFSET
(
mbtree
),
FF_OPT_TYPE_INT
,
{
-
1
},
-
1
,
1
,
VE
},
{
"deblock"
,
"Loop filter parameters, in <alpha:beta> form."
,
OFFSET
(
deblock
),
FF_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"deblock"
,
"Loop filter parameters, in <alpha:beta> form."
,
OFFSET
(
deblock
),
FF_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"cplxblur"
,
"Reduce fluctuations in QP (before curve compression)"
,
OFFSET
(
cplxblur
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"cplxblur"
,
"Reduce fluctuations in QP (before curve compression)"
,
OFFSET
(
cplxblur
),
FF_OPT_TYPE_FLOAT
,
{
-
1
},
-
1
,
FLT_MAX
,
VE
},
{
"partitions"
,
"A comma-separated list of partitions to consider. "
"Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all"
,
OFFSET
(
partitions
),
FF_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
NULL
},
{
NULL
},
};
};
...
...
libavcodec/options.c
View file @
0635a8aa
...
@@ -416,13 +416,13 @@ static const AVOption options[]={
...
@@ -416,13 +416,13 @@ static const AVOption options[]={
{
"complexityblur"
,
"reduce fluctuations in qp (before curve compression)"
,
OFFSET
(
complexityblur
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
},
-
1
,
FLT_MAX
,
V
|
E
},
{
"complexityblur"
,
"reduce fluctuations in qp (before curve compression)"
,
OFFSET
(
complexityblur
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
},
-
1
,
FLT_MAX
,
V
|
E
},
{
"deblockalpha"
,
"in-loop deblocking filter alphac0 parameter"
,
OFFSET
(
deblockalpha
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
-
6
,
6
,
V
|
E
},
{
"deblockalpha"
,
"in-loop deblocking filter alphac0 parameter"
,
OFFSET
(
deblockalpha
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
-
6
,
6
,
V
|
E
},
{
"deblockbeta"
,
"in-loop deblocking filter beta parameter"
,
OFFSET
(
deblockbeta
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
-
6
,
6
,
V
|
E
},
{
"deblockbeta"
,
"in-loop deblocking filter beta parameter"
,
OFFSET
(
deblockbeta
),
FF_OPT_TYPE_INT
,
{.
dbl
=
DEFAULT
},
-
6
,
6
,
V
|
E
},
#endif
{
"partitions"
,
"macroblock subpartition sizes to consider"
,
OFFSET
(
partitions
),
FF_OPT_TYPE_FLAGS
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partitions"
,
"macroblock subpartition sizes to consider"
,
OFFSET
(
partitions
),
FF_OPT_TYPE_FLAGS
,
{.
dbl
=
DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"parti4x4"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_I4X4
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"parti4x4"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_I4X4
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"parti8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_I8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"parti8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_I8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partp4x4"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_P4X4
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partp4x4"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_P4X4
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partp8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_P8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partp8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_P8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partb8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_B8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"partb8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_B8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
#endif
{
"sc_factor"
,
"multiplied by qscale for each frame and added to scene_change_score"
,
OFFSET
(
scenechange_factor
),
FF_OPT_TYPE_INT
,
{.
dbl
=
6
},
0
,
INT_MAX
,
V
|
E
},
{
"sc_factor"
,
"multiplied by qscale for each frame and added to scene_change_score"
,
OFFSET
(
scenechange_factor
),
FF_OPT_TYPE_INT
,
{.
dbl
=
6
},
0
,
INT_MAX
,
V
|
E
},
{
"mv0_threshold"
,
NULL
,
OFFSET
(
mv0_threshold
),
FF_OPT_TYPE_INT
,
{.
dbl
=
256
},
0
,
INT_MAX
,
V
|
E
},
{
"mv0_threshold"
,
NULL
,
OFFSET
(
mv0_threshold
),
FF_OPT_TYPE_INT
,
{.
dbl
=
256
},
0
,
INT_MAX
,
V
|
E
},
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
...
...
libavformat/ffmdec.c
View file @
0635a8aa
...
@@ -344,7 +344,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -344,7 +344,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec
->
thread_count
=
avio_r8
(
pb
);
codec
->
thread_count
=
avio_r8
(
pb
);
codec
->
coder_type
=
avio_rb32
(
pb
);
codec
->
coder_type
=
avio_rb32
(
pb
);
codec
->
me_cmp
=
avio_rb32
(
pb
);
codec
->
me_cmp
=
avio_rb32
(
pb
);
codec
->
partitions
=
avio_rb32
(
pb
);
codec
->
me_subpel_quality
=
avio_rb32
(
pb
);
codec
->
me_subpel_quality
=
avio_rb32
(
pb
);
codec
->
me_range
=
avio_rb32
(
pb
);
codec
->
me_range
=
avio_rb32
(
pb
);
codec
->
keyint_min
=
avio_rb32
(
pb
);
codec
->
keyint_min
=
avio_rb32
(
pb
);
...
...
libavformat/ffmenc.c
View file @
0635a8aa
...
@@ -156,7 +156,6 @@ static int ffm_write_header(AVFormatContext *s)
...
@@ -156,7 +156,6 @@ static int ffm_write_header(AVFormatContext *s)
avio_w8
(
pb
,
codec
->
thread_count
);
avio_w8
(
pb
,
codec
->
thread_count
);
avio_wb32
(
pb
,
codec
->
coder_type
);
avio_wb32
(
pb
,
codec
->
coder_type
);
avio_wb32
(
pb
,
codec
->
me_cmp
);
avio_wb32
(
pb
,
codec
->
me_cmp
);
avio_wb32
(
pb
,
codec
->
partitions
);
avio_wb32
(
pb
,
codec
->
me_subpel_quality
);
avio_wb32
(
pb
,
codec
->
me_subpel_quality
);
avio_wb32
(
pb
,
codec
->
me_range
);
avio_wb32
(
pb
,
codec
->
me_range
);
avio_wb32
(
pb
,
codec
->
keyint_min
);
avio_wb32
(
pb
,
codec
->
keyint_min
);
...
...
tests/ref/lavf/ffm
View file @
0635a8aa
f9bee27ea1b6b83a06b5f9efb0a4ac1f
*./tests/data/lavf/lavf.ffm
6d6db9474c5c10621bff51f20984797b
*./tests/data/lavf/lavf.ffm
376832 ./tests/data/lavf/lavf.ffm
376832 ./tests/data/lavf/lavf.ffm
./tests/data/lavf/lavf.ffm CRC=0xf361ed74
./tests/data/lavf/lavf.ffm CRC=0xf361ed74
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