[Ffmpeg-devel] ADI Blackfin port and optimization
Michael Niedermayer
michaelni
Wed Aug 23 02:05:36 CEST 2006
Hi
On Tue, Aug 22, 2006 at 06:30:05PM -0400, Michael Benjamin wrote:
> I've written some code to optimize 8x8 SAD on the Blackfin processor from
> Analog Devices. I attached a patch that uses the
> SAA (Quad 8-Bit Subtract-Absolute-Accumulate) instruction. Also, since no
> Blackfin port was available, the patch also adds support for
> TARGET_ARCH_BFIN. The inline assembly for sad8x8_bfin is simple and sort of
> crude, but more and better will follow. I just wanted to start the
> conversation for Blackfin optimizations.
>
> Michael
[...]
> --- ffmpeg/libavcodec/avcodec.h 2006-08-21 22:36:24.000000000 -0400
> +++ ffmpeg-bfin/libavcodec/avcodec.h 2006-08-22 14:42:09.000000000 -0400
> @@ -1132,6 +1132,7 @@ typedef struct AVCodecContext {
> #define FF_DCT_MLIB 4
> #define FF_DCT_ALTIVEC 5
> #define FF_DCT_FAAN 6
> +#define FF_DCT_BFIN 6
FF_DCT_FAAN == FF_DCT_BFIN ?
and as theres no *DCT in your patch this consequently doesnt belong in it
either
[...]
> diff -pruN ffmpeg/libavcodec/bfin/dsputil_bfin.c ffmpeg-bfin/libavcodec/bfin/dsputil_bfin.c
> --- ffmpeg/libavcodec/bfin/dsputil_bfin.c 1969-12-31 19:00:00.000000000 -0500
> +++ ffmpeg-bfin/libavcodec/bfin/dsputil_bfin.c 2006-08-22 17:53:38.000000000 -0400
[...]
> +
> +void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx );
> +
> +int sad8x8_bfin( void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h )
this should be static
[...]
> diff -pruN ffmpeg/libavcodec/bfin/mpegvideo_bfin.c ffmpeg-bfin/libavcodec/bfin/mpegvideo_bfin.c
> --- ffmpeg/libavcodec/bfin/mpegvideo_bfin.c 1969-12-31 19:00:00.000000000 -0500
> +++ ffmpeg-bfin/libavcodec/bfin/mpegvideo_bfin.c 2006-08-22 15:54:47.000000000 -0400
> @@ -0,0 +1,9 @@
> +#include "../dsputil.h"
> +#include "../mpegvideo.h"
> +#include "../avcodec.h"
> +
> +void MPV_common_init_bfin( MpegEncContext *s )
> +{
> + AVCodecContext *c = s->avctx;
> + MotionEstContext * const me = &s->me;
> +}
such do nothing code is not ok ...
it also contains tabs which arent allowed in ffmpeg
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list