[FFmpeg-devel] [PATCH] Remove mmx.h from dsputil_mmx.c

Michael Niedermayer michaelni
Thu Apr 2 22:36:21 CEST 2009


On Thu, Apr 02, 2009 at 04:25:13PM -0400, Alex Converse wrote:
> On Wed, Mar 25, 2009 at 8:10 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Wed, Mar 25, 2009 at 04:45:16PM -0400, Alex Converse wrote:
> >> On Mon, Mar 23, 2009 at 8:48 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Mon, Mar 23, 2009 at 07:38:49PM -0400, Alex Converse wrote:
[...]
> >> 881 dezicycles in 1st call, 8388543 runs, 65 skips
> >> vs.
> >> 862 dezicycles in 1st call, 8388524 runs, 84 skips
> >
> > benchmark looks good
> >
> 
> benchmark still looks similar
> 
> > [...]
> >> ?void put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size)
> >> ?{
> >> - ? ?int i;
> >> -
> >> - ? ?movq_m2r(*vector128, mm1);
> >> - ? ?for (i = 0; i < 8; i++) {
> >> - ? ? ? ?movq_m2r(*(block), mm0);
> >> - ? ? ? ?packsswb_m2r(*(block + 4), mm0);
> >> - ? ? ? ?block += 8;
> >> - ? ? ? ?paddb_r2r(mm1, mm0);
> >> - ? ? ? ?movq_r2m(mm0, *pixels);
> >> - ? ? ? ?pixels += line_size;
> >> - ? ?}
> >
> >> + ? ?const DCTELEM *p = block;
> >
> > useless temporary
> >
> 
> fixed
> 
> >
> >> + ? ?uint8_t *pix = pixels;
> >> + ? ?x86_reg line_skip = line_size;
> >> + ? ?const unsigned char* vec = vector128;
> >> +
> >> + ? ?__asm__ volatile (
> >> + ? ? ? ? ? ?"movq (%1), %%mm0 ? ? ? ? ? ? ? ? ? \n\t"
> >
> > you can use MANGLE() to access vector128 without a register
> >
> 
> fixed
> 
> [...]
> 
> Thanks for bearing with me,

patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090402/d3c828b8/attachment.pgp>



More information about the ffmpeg-devel mailing list