changeset 14943:4f43e3452b36

sync to x264 171: chroma_me, chroma_qp_offset
author lorenm
date Mon, 14 Mar 2005 23:26:11 +0000
parents 33066542018d
children 7e7b077b7a50
files DOCS/man/en/mplayer.1 configure libmpcodecs/ve_x264.c
diffstat 3 files changed, 23 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Mon Mar 14 06:28:18 2005 +0000
+++ b/DOCS/man/en/mplayer.1	Mon Mar 14 23:26:11 2005 +0000
@@ -7637,7 +7637,7 @@
 are just as big as I-frames, but don't reset the "keyint counter".
 .
 .TP
-.B frameref=<1\-15>
+.B frameref=<1\-16>
 Number of previous frames used as predictors in a P-frame (default: 1).
 This is effective in Anime, but seems to make little difference in
 live-action source material.
@@ -7871,6 +7871,17 @@
 4x4, 4x8, 8x4 are tried only if 8x8 is better than 16x16.
 .
 .TP
+.B (no)chroma_me
+Takes into account chroma information during subpixel motion search
+(default: enabled).
+Requires subq=5.
+.
+.TP
+.B chroma_qp_offset=<-12\-12>
+Use a different quantizer for chroma as compared to luma.
+Useful values are in the range <-2\-2>. (default: 0)
+.
+.TP
 .B level_idc=<10\-51>
 Set the bitstream's Level as defined by Annex A of the H.264 standard
 (default: 40 - Level 4.0).
--- a/configure	Mon Mar 14 06:28:18 2005 +0000
+++ b/configure	Mon Mar 14 23:26:11 2005 +0000
@@ -5919,7 +5919,7 @@
 cat > $TMPC << EOF
 #include <inttypes.h>
 #include <x264.h>
-#if X264_BUILD < 0x0014
+#if X264_BUILD < 22
 #error We do not support old versions of x264. Get the latest from SVN.
 #endif
 int main(void) { x264_encoder_open((void*)0); return 0; }
--- a/libmpcodecs/ve_x264.c	Mon Mar 14 06:28:18 2005 +0000
+++ b/libmpcodecs/ve_x264.c	Mon Mar 14 23:26:11 2005 +0000
@@ -78,6 +78,8 @@
 static int b8x8mv = 1;
 static int direct_pred = X264_DIRECT_PRED_TEMPORAL;
 static int weight_b = 0;
+static int chroma_me = 1;
+static int chroma_qp_offset = 0;
 static float ip_factor = 1.4;
 static float pb_factor = 1.3;
 static int rc_buffer_size = -1;
@@ -99,7 +101,7 @@
 m_option_t x264encopts_conf[] = {
     {"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
     {"qp_constant", &qp_constant, CONF_TYPE_INT, CONF_RANGE, 1, 51, NULL},
-    {"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 15, NULL},
+    {"frameref", &frame_ref, CONF_TYPE_INT, CONF_RANGE, 1, 16, NULL},
     {"keyint", &keyint_max, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
     {"keyint_min", &keyint_min, CONF_TYPE_INT, CONF_RANGE, 1, 24000000, NULL},
     {"scenecut", &scenecut_threshold, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
@@ -125,6 +127,9 @@
     {"direct_pred", &direct_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
     {"weight_b", &weight_b, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     {"noweight_b", &weight_b, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"chroma_me", &chroma_me, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nochroma_me", &chroma_me, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"chroma_qp_offset", &chroma_qp_offset, CONF_TYPE_INT, CONF_RANGE, -12, 12, NULL},
     {"ip_factor", &ip_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
     {"pb_factor", &pb_factor, CONF_TYPE_FLOAT, CONF_RANGE, -10.0, 10.0, NULL},
     {"rc_buffer_size", &rc_buffer_size, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
@@ -232,6 +237,8 @@
         mod->param.analyse.inter |= X264_ANALYSE_BSUB16x16;
     mod->param.analyse.i_direct_mv_pred = direct_pred;
     mod->param.analyse.b_weighted_bipred = weight_b;
+    mod->param.analyse.i_chroma_qp_offset = chroma_qp_offset;
+    mod->param.analyse.b_chroma_me = chroma_me;
 
     mod->param.i_width = width;
     mod->param.i_height = height;
@@ -314,9 +321,8 @@
     case IMGFMT_RGB:
     case IMGFMT_BGR:
     case IMGFMT_BGR32:
-        /* 2004/08/05: There seems to be some, but not complete,
-           support for these colorspaces in X264. Better to stay
-           on the safe side for now. */
+        /* These colorspaces are supported, but they'll just have
+         * to be converted to I420 internally */
         return 0; /* VFCAP_CSP_SUPPORTED */
     }
     return 0;
@@ -370,7 +376,6 @@
 
 static void uninit(struct vf_instance_s *vf)
 {
-    // FIXME: flush delayed frames
     h264_module_t *mod=(h264_module_t*)vf->priv;
     x264_encoder_close(mod->x264);
 }