[Ffmpeg-devel] BlackFin lowlevel pixel operations PATCH

Måns Rullgård mans
Thu Mar 29 00:00:47 CEST 2007


Marc Hoffman <mmh at pleasantst.com> writes:

> how does this look now? Thanks Marc
>
>
> Index: Makefile
> ===================================================================
> --- Makefile	(revision 8517)
> +++ Makefile	(working copy)
> @@ -398,6 +398,11 @@
>  
>  OBJS-$(TARGET_ARCH_BFIN)               += bfin/dsputil_bfin.o \
>  
> +ASM_OBJS-$(TARGET_ARCH_BFIN)           += bfin/pixels_bfin.o \
> +		                          bfin/idct_bfin.o   \
> +					  bfin/fdct_bfin.o   \
> +		                          bfin/xidct.o	     \
> +

Lose the tabs, please.

>  EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
>  
>  NAME=avcodec
> Index: bfin/fdct_bfin.S
> ===================================================================
> --- bfin/fdct_bfin.S	(revision 0)
> +++ bfin/fdct_bfin.S	(revision 0)
> @@ -0,0 +1,383 @@
> +/*                              -*- text -*-

Just out of interest, why force text mode in Emacs?

> +DEFUN(fdct,mL1,
> +        (DCTELEM *block)):
> +        [--SP] = (R7:4, P5:3);          // Pushing the Registers on stack.
> +
> +        b0 = r0; 
> +        r0 = [P3+dct_coeff at GOT17M4];
> +        b3 = r0; 
> +        r0 = [P3+vtmp at GOT17M4];
> +        b2 = r0; 
> +
> +        L3 = 16;                        // L3 is set to 16 to make the coeffs 
> +                                        //  array Circular. 
> +
> +        
> +//----------------------------------------------------------------------------
> +
> +/*
> +* I0, I1, and I2 registers are used to read the input data. I3 register is used
> +* to read the coefficients. P0 and P1 registers are used for writing the output
> +* data.  
> +*/      

The general convention in FFmpeg is to restrict lines to 79
characters.  It eases reading on an 80-column display.

> +#ifndef DEFUN
> +#ifndef mL1
> +#define mL1 .l1.text
> +#endif
> +#define mL3 .text
> +
> +#define DEFUN(fname,where,interface) \
> +        .section where; \
> +        .global _ff_bfin_ ## fname ; \
> +        .align 8; \
> +        _ff_bfin_ ## fname
> +#endif

What's with the leading underscore on the names?  Is something mangling
external symbols a la windows?

I don't know Blackfin at all, so I can't comment on the correctness of
the code.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list