root/trunk/avifile/avifile-0.7.38-gcc34_ffmpeg-1.patch

Revision 625, 4.9 KB (checked in by jim, 4 years ago)

Added: avifile patches

  • ffmpeg/libavcodec/liba52/resample_mmx.c

    Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
    Date:                    2004-09-01
    Initial Package Version: 0.7.38
    Upstream Status:         Not submitted
    Origin:                  Self-created
    Description:             Fixes GCC-3.4.x related build problems with FFmpeg plugin
    
    diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/liba52/resample_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/liba52/resample_mmx.c
    old new  
    77        and it would mean (C / MMX2 / MMX / 3DNOW) versions  
    88*/ 
    99 
    10 static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; 
    11 static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; 
    12 static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; 
    13 static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; 
     10const uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; 
     11const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; 
     12const uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; 
     13const uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; 
    1414 
    1515static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ 
    1616    int32_t * f = (int32_t *) _f; 
  • ffmpeg/libavcodec/i386/motion_est_mmx.c

    diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/motion_est_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/motion_est_mmx.c
    old new  
    2020 */ 
    2121#include "../dsputil.h" 
    2222 
    23 static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={ 
     23const __attribute__ ((aligned(8))) uint64_t round_tab[3]={ 
    24240x0000000000000000, 
    25250x0001000100010001, 
    26260x0002000200020002, 
    2727}; 
    2828 
    29 static __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL; 
     29const __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL; 
    3030 
    3131static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) 
    3232{ 
  • ffmpeg/libavcodec/i386/dsputil_mmx.c

    diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/dsputil_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/dsputil_mmx.c
    old new  
    2525int mm_flags; /* multimedia extension flags */ 
    2626 
    2727/* pixel operations */ 
    28 static const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL; 
    29 static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; 
    30 static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL; 
    31  
    32 static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL; 
    33 static const uint64_t ff_pw_3  __attribute__ ((aligned(8))) = 0x0003000300030003ULL; 
    34 static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL; 
    35 static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL; 
     28const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL; 
     29const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; 
     30const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL; 
     31 
     32const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL; 
     33const uint64_t ff_pw_3  __attribute__ ((aligned(8))) = 0x0003000300030003ULL; 
     34const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL; 
     35const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL; 
    3636 
    3737#define JUMPALIGN() __asm __volatile (".balign 8"::) 
    3838#define MOVQ_ZERO(regd)  __asm __volatile ("pxor %%" #regd ", %%" #regd ::) 
  • ffmpeg/libavcodec/i386/simple_idct_mmx.c

    diff -Naur avifile-0.7-0.7.38-orig/ffmpeg/libavcodec/i386/simple_idct_mmx.c avifile-0.7-0.7.38/ffmpeg/libavcodec/i386/simple_idct_mmx.c
    old new  
    4545#define ROW_SHIFT 11 
    4646#define COL_SHIFT 20 // 6 
    4747 
    48 static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL; 
    49 static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL; 
    50 static int16_t __attribute__((aligned(8))) temp[64]; 
    51 static int16_t __attribute__((aligned(8))) coeffs[]= { 
     48static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL; 
     49const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL; 
     50const int16_t __attribute__((aligned(8))) temp[64]; 
     51const int16_t __attribute__((aligned(8))) coeffs[]= { 
    5252        1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0, 
    5353//      1<<(COL_SHIFT-1), 0, 1<<(COL_SHIFT-1), 0, 
    5454//      0, 1<<(COL_SHIFT-1-16), 0, 1<<(COL_SHIFT-1-16), 
Note: See TracBrowser for help on using the browser.