[FFmpeg-cvslog] r20600 - in trunk: configure ffpresets/libx264-baseline.ffpreset ffpresets/libx264-default.ffpreset ffpresets/libx264-fastfirstpass.ffpreset ffpresets/libx264-hq.ffpreset ffpresets/libx264-ipod320....

darkshikari subversion
Tue Nov 24 16:49:34 CET 2009


Author: darkshikari
Date: Tue Nov 24 16:49:34 2009
New Revision: 20600

Log:
Add weightp support in API for libx264.
ffmpeg can encode baseline profile again.

Modified:
   trunk/configure
   trunk/ffpresets/libx264-baseline.ffpreset
   trunk/ffpresets/libx264-default.ffpreset
   trunk/ffpresets/libx264-fastfirstpass.ffpreset
   trunk/ffpresets/libx264-hq.ffpreset
   trunk/ffpresets/libx264-ipod320.ffpreset
   trunk/ffpresets/libx264-ipod640.ffpreset
   trunk/ffpresets/libx264-lossless_fast.ffpreset
   trunk/ffpresets/libx264-lossless_max.ffpreset
   trunk/ffpresets/libx264-lossless_medium.ffpreset
   trunk/ffpresets/libx264-lossless_slow.ffpreset
   trunk/ffpresets/libx264-lossless_slower.ffpreset
   trunk/ffpresets/libx264-max.ffpreset
   trunk/ffpresets/libx264-normal.ffpreset
   trunk/ffpresets/libx264-slowfirstpass.ffpreset
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/libx264.c
   trunk/libavcodec/options.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/configure	Tue Nov 24 16:49:34 2009	(r20600)
@@ -2378,8 +2378,8 @@ enabled libspeex   && require  libspeex 
 enabled libtheora  && require  libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
 enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
 enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 -lm &&
-                      { check_cpp_condition x264.h "X264_BUILD >= 78" ||
-                        die "ERROR: libx264 version must be >= 0.78."; }
+                      { check_cpp_condition x264.h "X264_BUILD >= 79" ||
+                        die "ERROR: libx264 version must be >= 0.79."; }
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 

Modified: trunk/ffpresets/libx264-baseline.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-baseline.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-baseline.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -1,3 +1,4 @@
 coder=0
 bf=0
 flags2=-wpred-dct8x8
+wpredp=0

Modified: trunk/ffpresets/libx264-default.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-default.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-default.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -19,3 +19,4 @@ refs=3
 directpred=1
 trellis=1
 flags2=+mixed_refs+wpred+dct8x8+fastpskip
+wpredp=2

Modified: trunk/ffpresets/libx264-fastfirstpass.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-fastfirstpass.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-fastfirstpass.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -3,7 +3,7 @@ flags=+loop
 cmp=+chroma
 partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
 me_method=dia
-subq=1
+subq=2
 me_range=16
 g=250
 keyint_min=25
@@ -19,3 +19,4 @@ refs=1
 directpred=3
 trellis=0
 flags2=-bpyramid-wpred-mixed_refs-dct8x8+fastpskip
+wpredp=2

Modified: trunk/ffpresets/libx264-hq.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-hq.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-hq.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -19,3 +19,4 @@ refs=4
 directpred=3
 trellis=1
 flags2=+wpred+mixed_refs+dct8x8+fastpskip
+wpredp=2

Modified: trunk/ffpresets/libx264-ipod320.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-ipod320.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-ipod320.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -4,3 +4,4 @@ flags2=-wpred-dct8x8
 level=13
 maxrate=768000
 bufsize=3000000
+wpredp=0

Modified: trunk/ffpresets/libx264-ipod640.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-ipod640.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-ipod640.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -5,3 +5,4 @@ flags2=-wpred-dct8x8
 level=30
 maxrate=10000000
 bufsize=10000000
+wpredp=0

Modified: trunk/ffpresets/libx264-lossless_fast.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-lossless_fast.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-lossless_fast.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -17,3 +17,4 @@ qdiff=4
 directpred=1
 flags2=+fastpskip
 cqp=0
+wpredp=0

Modified: trunk/ffpresets/libx264-lossless_max.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-lossless_max.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-lossless_max.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -18,3 +18,4 @@ refs=16
 directpred=1
 flags2=+mixed_refs+dct8x8+fastpskip
 cqp=0
+wpredp=2

Modified: trunk/ffpresets/libx264-lossless_medium.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-lossless_medium.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-lossless_medium.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -17,3 +17,4 @@ qdiff=4
 directpred=1
 flags2=+fastpskip
 cqp=0
+wpredp=2

Modified: trunk/ffpresets/libx264-lossless_slow.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-lossless_slow.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-lossless_slow.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -18,3 +18,4 @@ refs=2
 directpred=1
 flags2=+dct8x8+fastpskip
 cqp=0
+wpredp=2

Modified: trunk/ffpresets/libx264-lossless_slower.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-lossless_slower.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-lossless_slower.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -18,3 +18,4 @@ refs=4
 directpred=1
 flags2=+mixed_refs+dct8x8+fastpskip
 cqp=0
+wpredp=2

Modified: trunk/ffpresets/libx264-max.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-max.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-max.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -19,3 +19,4 @@ refs=16
 directpred=3
 trellis=2
 flags2=+wpred+mixed_refs+dct8x8-fastpskip
+wpredp=2

Modified: trunk/ffpresets/libx264-normal.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-normal.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-normal.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -19,3 +19,4 @@ refs=2
 directpred=3
 trellis=0
 flags2=+wpred+dct8x8+fastpskip
+wpredp=2

Modified: trunk/ffpresets/libx264-slowfirstpass.ffpreset
==============================================================================
--- trunk/ffpresets/libx264-slowfirstpass.ffpreset	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/ffpresets/libx264-slowfirstpass.ffpreset	Tue Nov 24 16:49:34 2009	(r20600)
@@ -19,3 +19,4 @@ refs=1
 directpred=3
 trellis=0
 flags2=+wpred+dct8x8+fastpskip
+wpredp=2

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/libavcodec/avcodec.h	Tue Nov 24 16:49:34 2009	(r20600)
@@ -30,7 +30,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 41
+#define LIBAVCODEC_VERSION_MINOR 42
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -2554,6 +2554,16 @@ typedef struct AVCodecContext {
      * - decoding: Set by libavcodec, user can override.
      */
     int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
+
+    /**
+     * explicit P-frame weighted prediction analysis method
+     * 0: off
+     * 1: fast blind weighting (one reference duplicate with -1 offset)
+     * 2: smart weighting (full fade detection analysis)
+     * - encoding: Set by user.
+     * - decoding: unused
+     */
+    int weighted_p_pred;
 } AVCodecContext;
 
 /**

Modified: trunk/libavcodec/libx264.c
==============================================================================
--- trunk/libavcodec/libx264.c	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/libavcodec/libx264.c	Tue Nov 24 16:49:34 2009	(r20600)
@@ -228,6 +228,7 @@ static av_cold int X264_init(AVCodecCont
     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;

Modified: trunk/libavcodec/options.c
==============================================================================
--- trunk/libavcodec/options.c	Tue Nov 24 16:13:47 2009	(r20599)
+++ trunk/libavcodec/options.c	Tue Nov 24 16:49:34 2009	(r20600)
@@ -124,6 +124,7 @@ static const AVOption options[]={
 {"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E},
 {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), FF_OPT_TYPE_INT, 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, 0, INT_MIN, INT_MAX, V|E},
+{"wpredp", "weighted prediction analysis method", OFFSET(weighted_p_pred), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
 {"hurry_up", NULL, OFFSET(hurry_up), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|D},
 {"ps", "rtp payload size in bytes", OFFSET(rtp_payload_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
 {"mv_bits", NULL, OFFSET(mv_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},



More information about the ffmpeg-cvslog mailing list