Ticket #28935: patch-ffmpeg-0.6-PIC_fix.diff

File patch-ffmpeg-0.6-PIC_fix.diff, 1.8 KB (added by fran6co@…, 13 years ago)

And the patch

  • libavcodec/x86/dsputil_mmx.c

    static void h263_v_loop_filter_mmx(uint8 
    725725
    726726static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
    727727    __asm__ volatile( //FIXME could save 1 instruction if done as 8x4 ...
    728         "movd  %4, %%mm0                \n\t"
    729         "movd  %5, %%mm1                \n\t"
    730         "movd  %6, %%mm2                \n\t"
    731         "movd  %7, %%mm3                \n\t"
     728        "movd  %0, %%mm0                \n\t"
     729        "movd  %1, %%mm1                \n\t"
     730        "movd  %2, %%mm2                \n\t"
     731        "movd  %3, %%mm3                \n\t"
    732732        "punpcklbw %%mm1, %%mm0         \n\t"
    733733        "punpcklbw %%mm3, %%mm2         \n\t"
    734734        "movq %%mm0, %%mm1              \n\t"
    735735        "punpcklwd %%mm2, %%mm0         \n\t"
    736736        "punpckhwd %%mm2, %%mm1         \n\t"
     737                : /* nothing */
     738        :  "m" (*(uint32_t*)(src + 0*src_stride)),
     739           "m" (*(uint32_t*)(src + 1*src_stride)),
     740           "m" (*(uint32_t*)(src + 2*src_stride)),
     741           "m" (*(uint32_t*)(src + 3*src_stride))
     742    );
     743
     744    __asm__ volatile( //FIXME could save 1 instruction if done as 8x4 ...
    737745        "movd  %%mm0, %0                \n\t"
    738746        "punpckhdq %%mm0, %%mm0         \n\t"
    739747        "movd  %%mm0, %1                \n\t"
    static inline void transpose4x4(uint8_t  
    745753          "=m" (*(uint32_t*)(dst + 1*dst_stride)),
    746754          "=m" (*(uint32_t*)(dst + 2*dst_stride)),
    747755          "=m" (*(uint32_t*)(dst + 3*dst_stride))
    748         :  "m" (*(uint32_t*)(src + 0*src_stride)),
    749            "m" (*(uint32_t*)(src + 1*src_stride)),
    750            "m" (*(uint32_t*)(src + 2*src_stride)),
    751            "m" (*(uint32_t*)(src + 3*src_stride))
    752756    );
    753757}
    754758