[FFmpeg-cvslog] libx264: add '8x8dct' private option.
Anton Khirnov
git at videolan.org
Thu Sep 1 00:03:04 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Aug 22 07:55:34 2011 +0200| [373257fa793b5ec2c22236a446d889018838e362] | committer: Anton Khirnov
libx264: add '8x8dct' private option.
Deprecate CODEC_FLAG2_8X8DCT.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=373257fa793b5ec2c22236a446d889018838e362
---
libavcodec/avcodec.h | 2 +-
libavcodec/libx264.c | 6 +++++-
libavcodec/options.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c7c8583..52c5fa0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -611,8 +611,8 @@ typedef struct RcOverride{
#define CODEC_FLAG2_BPYRAMID 0x00000010 ///< H.264 allow B-frames to be used as references.
#define CODEC_FLAG2_WPRED 0x00000020 ///< H.264 weighted biprediction for B-frames
#define CODEC_FLAG2_MIXED_REFS 0x00000040 ///< H.264 one reference per partition, as opposed to one reference per macroblock
-#endif
#define CODEC_FLAG2_8X8DCT 0x00000080 ///< H.264 high profile 8x8 transform
+#endif
#define CODEC_FLAG2_FASTPSKIP 0x00000100 ///< H.264 fast pskip
#define CODEC_FLAG2_AUD 0x00000200 ///< H.264 access unit delimiters
#define CODEC_FLAG2_BRDO 0x00000400 ///< B-frame rate-distortion optimization
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 3ebc0a8..d164dce 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -54,6 +54,7 @@ typedef struct X264Context {
int intra_refresh;
int b_pyramid;
int mixed_refs;
+ int dct8x8;
} X264Context;
static void X264_log(void *p, int level, const char *fmt, va_list args)
@@ -246,7 +247,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
- x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT;
x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP;
x4->params.analyse.i_trellis = avctx->trellis;
@@ -327,6 +327,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE;
x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
+ x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT;
#endif
if (x4->aq_mode >= 0)
@@ -352,6 +353,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.i_bframe_pyramid = x4->b_pyramid;
if (x4->mixed_refs >= 0)
x4->params.analyse.b_mixed_references = x4->mixed_refs;
+ if (x4->dct8x8 >= 0)
+ x4->params.analyse.b_transform_8x8 = x4->dct8x8;
if (x4->fastfirstpass)
x264_param_apply_fastfirstpass(&x4->params);
@@ -446,6 +449,7 @@ static const AVOption options[] = {
{ "strict", "Strictly hierarchical pyramid", 0, FF_OPT_TYPE_CONST, {X264_B_PYRAMID_STRICT}, INT_MIN, INT_MAX, VE, "b_pyramid" },
{ "normal", "Non-strict (not Blu-ray compatible)", 0, FF_OPT_TYPE_CONST, {X264_B_PYRAMID_NORMAL}, INT_MIN, INT_MAX, VE, "b_pyramid" },
{ "mixed-refs", "One reference per partition, as opposed to one reference per macroblock", OFFSET(mixed_refs), FF_OPT_TYPE_INT, {-1}, -1, 1, VE },
+ { "8x8dct", "High profile 8x8 transform.", OFFSET(dct8x8), FF_OPT_TYPE_INT, {-1 }, -1, 1, VE},
{ NULL },
};
diff --git a/libavcodec/options.c b/libavcodec/options.c
index f6fd6e5..a98fd8c 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -391,8 +391,8 @@ static const AVOption options[]={
{"bpyramid", "allows B-frames to be used as references for predicting", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_BPYRAMID }, INT_MIN, INT_MAX, V|E, "flags2"},
{"wpred", "weighted biprediction for b-frames (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_WPRED }, INT_MIN, INT_MAX, V|E, "flags2"},
{"mixed_refs", "one reference per partition, as opposed to one reference per macroblock", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_MIXED_REFS }, INT_MIN, INT_MAX, V|E, "flags2"},
-#endif
{"dct8x8", "high profile 8x8 transform (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_8X8DCT }, INT_MIN, INT_MAX, V|E, "flags2"},
+#endif
{"fastpskip", "fast pskip (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_FASTPSKIP }, INT_MIN, INT_MAX, V|E, "flags2"},
{"aud", "access unit delimiters (H.264)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_AUD }, INT_MIN, INT_MAX, V|E, "flags2"},
{"skiprd", "RD optimal MB level residual skipping", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SKIP_RD }, INT_MIN, INT_MAX, V|E, "flags2"},
More information about the ffmpeg-cvslog
mailing list