[FFmpeg-devel] [PATCH] add ME_T/ESA to avcodec.h

Stefano Sabatini stefano.sabatini-lala
Wed Jun 4 09:22:04 CEST 2008


On date Tuesday 2008-06-03 16:47:51 -0700, Baptiste Coudurier encoded:
> Hi,
> 
> $subject, and enable it for libx264, I add ME_ESA for exhaustivity too,
> should I add ME_DIA ?
> 
> Btw, what needs to be done to uniformize lavc to use ME_UMH, ME_HEX,
> ME_ESA ?
> 
> I'll try to. Thanks for the hints.
> 
> -- 
> Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
> Smartjog USA Inc.                                http://www.smartjog.com
> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA

> Index: libavcodec/libx264.c
> ===================================================================
> --- libavcodec/libx264.c	(revision 13650)
> +++ libavcodec/libx264.c	(working copy)
> @@ -218,8 +218,10 @@
>          x4->params.analyse.i_me_method = X264_ME_HEX;
>      else if(avctx->me_method == ME_UMH)
>          x4->params.analyse.i_me_method = X264_ME_UMH;
> -    else if(avctx->me_method == ME_FULL)
> +    else if(avctx->me_method == ME_FULL || avctx->me_method == ME_ESA)
>          x4->params.analyse.i_me_method = X264_ME_ESA;
> +    else if(avctx->me_method == ME_TESA)
> +        x4->params.analyse.i_me_method = X264_ME_TESA;
>      else x4->params.analyse.i_me_method = X264_ME_HEX;
>  
>      x4->params.analyse.i_me_range = avctx->me_range;
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h	(revision 13650)
> +++ libavcodec/avcodec.h	(working copy)
> @@ -374,6 +374,8 @@
>      ME_HEX,         ///< hexagon based search
>      ME_UMH,         ///< uneven multi-hexagon search
>      ME_ITER,        ///< iterative search
> +    ME_ESA,         ///< exhaustive search algorithm
> +    ME_TESA,        ///< thresholded exhaustive search algorithm
>  };
>  
>  enum AVDiscard{
> @@ -840,7 +842,7 @@
>      /**
>       * Motion estimation algorithm used for video coding.
>       * 1 (zero), 2 (full), 3 (log), 4 (phods), 5 (epzs), 6 (x1), 7 (hex),
> -     * 8 (umh), 9 (iter) [7, 8 are x264 specific, 9 is snow specific]
> +     * 8 (umh), 9 (iter) [7, 8, 10, 11 are x264 specific, 9 is snow specific]
>       * - encoding: MUST be set by user.
>       * - decoding: unused
>       */


Aren't you forgetting to add these lines in
libavcodec/utils.c:options:

{"esa", "esa motion estimation", 0, FF_OPT_TYPE_CONST, ME_ESA, INT_MIN, INT_MAX, V|E, "me_method" },
{"tesa", "tesa motion estimation", 0, FF_OPT_TYPE_CONST, ME_TESA, INT_MIN, INT_MAX, V|E, "me_method" },

?

Regards.
-- 
FFmpeg = Funny Funny MultiPurpose EnGine




More information about the ffmpeg-devel mailing list