[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec 4xm.c, 1.19, 1.20 asv1.c, 1.21, 1.22 dsputil.c, 1.132, 1.133 dsputil.h, 1.126, 1.127 dv.c, 1.70, 1.71 h264.c, 1.184, 1.185 imgresample.c, 1.29, 1.30 mdec.c, 1.18, 1.19 mjpeg.c, 1.121, 1.122 mpegvideo.c, 1.508, 1.509 mpegvideo.h, 1.236, 1.237 vp3.c, 1.77, 1.78 wmadec.c, 1.29, 1.30 wmv2.c, 1.38, 1.39
Diego Biurrun CVS
diego
Sun Feb 5 14:35:21 CET 2006
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec/i386 dsputil_h264_template_mmx.c, 1.4, 1.5 dsputil_mmx.c, 1.109, 1.110 mpegvideo_mmx_template.c, 1.29, 1.30 vp3dsp_sse2.c, 1.9, 1.10
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg configure,1.242,1.243
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv488/libavcodec
Modified Files:
4xm.c asv1.c dsputil.c dsputil.h dv.c h264.c imgresample.c
mdec.c mjpeg.c mpegvideo.c mpegvideo.h vp3.c wmadec.c wmv2.c
Log Message:
MSVC-compatible __align8/__align16 declaration
patch by Steve Lhomme, steve .dot. lhomme .at. free .dot. fr
Index: 4xm.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/4xm.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- 4xm.c 25 Jan 2006 22:10:12 -0000 1.19
+++ 4xm.c 5 Feb 2006 13:35:16 -0000 1.20
@@ -121,7 +121,7 @@
int mv[256];
VLC pre_vlc;
int last_dc;
- DCTELEM __align8 block[6][64];
+ DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
uint8_t *bitstream_buffer;
unsigned int bitstream_buffer_size;
CFrameBuffer cfrm[CFRAME_BUFFER_COUNT];
Index: asv1.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/asv1.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- asv1.c 25 Jan 2006 22:10:12 -0000 1.21
+++ asv1.c 5 Feb 2006 13:35:16 -0000 1.22
@@ -44,9 +44,9 @@
int mb_height;
int mb_width2;
int mb_height2;
- DCTELEM __align8 block[6][64];
- uint16_t __align8 intra_matrix[64];
- int __align8 q_intra_matrix[64];
+ DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
+ DECLARE_ALIGNED_8(uint16_t, intra_matrix[64]);
+ DECLARE_ALIGNED_8(int, q_intra_matrix[64]);
uint8_t *bitstream_buffer;
unsigned int bitstream_buffer_size;
} ASV1Context;
Index: dsputil.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/dsputil.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- dsputil.c 12 Jan 2006 22:43:14 -0000 1.132
+++ dsputil.c 5 Feb 2006 13:35:16 -0000 1.133
@@ -62,7 +62,7 @@
};
/* not permutated inverse zigzag_direct + 1 for MMX quantizer */
-uint16_t __align8 inv_zigzag_direct16[64] = {0, };
+DECLARE_ALIGNED_8(uint16_t, inv_zigzag_direct16[64]) = {0, };
const uint8_t ff_alternate_horizontal_scan[64] = {
0, 1, 2, 3, 8, 9, 16, 17,
@@ -3402,7 +3402,7 @@
static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
- uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
+ DECLARE_ALIGNED_8(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DCTELEM * const temp= (DCTELEM*)aligned_temp;
int sum=0, i;
@@ -3472,7 +3472,7 @@
static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
- uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
+ DECLARE_ALIGNED_8(uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DCTELEM * const temp= (DCTELEM*)aligned_temp;
int sum=0, i;
@@ -3491,7 +3491,7 @@
static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
- uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64*2/8];
+ DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64*2/8]);
DCTELEM * const temp= (DCTELEM*)aligned_temp;
DCTELEM * const bak = ((DCTELEM*)aligned_temp)+64;
int sum=0, i;
@@ -3516,8 +3516,8 @@
static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
const uint8_t *scantable= s->intra_scantable.permutated;
- uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
- uint64_t __align8 aligned_bak[stride];
+ DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
+ DECLARE_ALIGNED_8 (uint64_t, aligned_bak[stride]);
DCTELEM * const temp= (DCTELEM*)aligned_temp;
uint8_t * const bak= (uint8_t*)aligned_bak;
int i, last, run, bits, level, distoration, start_i;
@@ -3595,7 +3595,7 @@
static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){
MpegEncContext * const s= (MpegEncContext *)c;
const uint8_t *scantable= s->intra_scantable.permutated;
- uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8];
+ DECLARE_ALIGNED_8 (uint64_t, aligned_temp[sizeof(DCTELEM)*64/8]);
DCTELEM * const temp= (DCTELEM*)aligned_temp;
int i, last, run, bits, level, start_i;
const int esc_length= s->ac_esc_length;
Index: dsputil.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/dsputil.h,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- dsputil.h 12 Jan 2006 22:43:15 -0000 1.126
+++ dsputil.h 5 Feb 2006 13:35:16 -0000 1.127
@@ -390,7 +390,11 @@
one or more MultiMedia extension */
int mm_support(void);
-#define __align16 __attribute__ ((aligned (16)))
+#ifdef __GNUC__
+ #define DECLARE_ALIGNED_16(t,v) t v __attribute__ ((aligned (16)))
+#else
+ #define DECLARE_ALIGNED_16(t,v) __declspec(align(16)) t v
+#endif
#if defined(HAVE_MMX)
@@ -421,7 +425,12 @@
emms();\
}
-#define __align8 __attribute__ ((aligned (8)))
+#ifdef __GNUC__
+ #define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
+#else
+ #define DECLARE_ALIGNED_8(t,v) __declspec(align(8)) t v
+#endif
+
#define STRIDE_ALIGN 8
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
@@ -431,7 +440,7 @@
/* This is to use 4 bytes read to the IDCT pointers for some 'zero'
line optimizations */
-#define __align8 __attribute__ ((aligned (4)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (4)))
#define STRIDE_ALIGN 4
#define MM_IWMMXT 0x0100 /* XScale IWMMXT */
@@ -443,7 +452,7 @@
#elif defined(HAVE_MLIB)
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
-#define __align8 __attribute__ ((aligned (8)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#define STRIDE_ALIGN 8
void dsputil_init_mlib(DSPContext* c, AVCodecContext *avctx);
@@ -451,13 +460,13 @@
#elif defined(ARCH_SPARC)
/* SPARC/VIS IDCT needs 8-byte aligned DCT blocks */
-#define __align8 __attribute__ ((aligned (8)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#define STRIDE_ALIGN 8
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_ALPHA)
-#define __align8 __attribute__ ((aligned (8)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#define STRIDE_ALIGN 8
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
@@ -474,28 +483,28 @@
#undef pixel
#endif
-#define __align8 __attribute__ ((aligned (16)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (16)))
#define STRIDE_ALIGN 16
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
#elif defined(HAVE_MMI)
-#define __align8 __attribute__ ((aligned (16)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (16)))
#define STRIDE_ALIGN 16
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
#elif defined(ARCH_SH4)
-#define __align8 __attribute__ ((aligned (8)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#define STRIDE_ALIGN 8
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
#else
-#define __align8 __attribute__ ((aligned (8)))
+#define DECLARE_ALIGNED_8(t,v) t v __attribute__ ((aligned (8)))
#define STRIDE_ALIGN 8
#endif
Index: dv.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/dv.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- dv.c 12 Jan 2006 22:43:15 -0000 1.70
+++ dv.c 5 Feb 2006 13:35:16 -0000 1.71
@@ -379,9 +379,9 @@
PutBitContext pb, vs_pb;
GetBitContext gb;
BlockInfo mb_data[5 * 6], *mb, *mb1;
- DCTELEM sblock[5*6][64] __align8;
- uint8_t mb_bit_buffer[80 + 4] __align8; /* allow some slack */
- uint8_t vs_bit_buffer[5 * 80 + 4] __align8; /* allow some slack */
+ DECLARE_ALIGNED_8(DCTELEM, sblock[5*6][64]);
+ DECLARE_ALIGNED_8(uint8_t, mb_bit_buffer[80 + 4]); /* allow some slack */
+ DECLARE_ALIGNED_8(uint8_t, vs_bit_buffer[5 * 80 + 4]); /* allow some slack */
const int log2_blocksize= 3-s->avctx->lowres;
assert((((int)mb_bit_buffer)&7)==0);
@@ -779,7 +779,7 @@
uint8_t* data;
uint8_t* ptr;
int do_edge_wrap;
- DCTELEM block[64] __align8;
+ DECLARE_ALIGNED_8(DCTELEM, block[64]);
EncBlockInfo enc_blks[5*6];
PutBitContext pbs[5*6];
PutBitContext* pb;
Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- h264.c 31 Jan 2006 00:17:12 -0000 1.184
+++ h264.c 5 Feb 2006 13:35:16 -0000 1.185
@@ -199,14 +199,14 @@
* non zero coeff count cache.
* is 64 if not available.
*/
- uint8_t non_zero_count_cache[6*8] __align8;
+ DECLARE_ALIGNED_8(uint8_t, non_zero_count_cache[6*8]);
uint8_t (*non_zero_count)[16];
/**
* Motion vector cache.
*/
- int16_t mv_cache[2][5*8][2] __align8;
- int8_t ref_cache[2][5*8] __align8;
+ DECLARE_ALIGNED_8(int16_t, mv_cache[2][5*8][2]);
+ DECLARE_ALIGNED_8(int8_t, ref_cache[2][5*8]);
#define LIST_NOT_USED -1 //FIXME rename?
#define PART_NOT_AVAILABLE -2
@@ -335,7 +335,7 @@
GetBitContext *intra_gb_ptr;
GetBitContext *inter_gb_ptr;
- DCTELEM mb[16*24] __align8;
+ DECLARE_ALIGNED_8(DCTELEM, mb[16*24]);
/**
* Cabac
@@ -352,7 +352,7 @@
uint8_t *chroma_pred_mode_table;
int last_qscale_diff;
int16_t (*mvd_table[2])[2];
- int16_t mvd_cache[2][5*8][2] __align8;
+ DECLARE_ALIGNED_8(int16_t, mvd_cache[2][5*8][2]);
uint8_t *direct_table;
uint8_t direct_cache[5*8];
Index: imgresample.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/imgresample.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- imgresample.c 12 Jan 2006 22:43:15 -0000 1.29
+++ imgresample.c 5 Feb 2006 13:35:16 -0000 1.30
@@ -50,8 +50,8 @@
int padtop, padbottom, padleft, padright;
int pad_owidth, pad_oheight;
int h_incr, v_incr;
- int16_t h_filters[NB_PHASES][NB_TAPS] __align8; /* horizontal filters */
- int16_t v_filters[NB_PHASES][NB_TAPS] __align8; /* vertical filters */
+ DECLARE_ALIGNED_8(int16_t, h_filters[NB_PHASES][NB_TAPS]); /* horizontal filters */
+ DECLARE_ALIGNED_8(int16_t, v_filters[NB_PHASES][NB_TAPS]); /* vertical filters */
uint8_t *line_buf;
};
Index: mdec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mdec.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- mdec.c 25 Jan 2006 22:10:12 -0000 1.18
+++ mdec.c 5 Feb 2006 13:35:16 -0000 1.19
@@ -45,9 +45,9 @@
int mb_width;
int mb_height;
int mb_x, mb_y;
- DCTELEM __align8 block[6][64];
- uint16_t __align8 intra_matrix[64];
- int __align8 q_intra_matrix[64];
+ DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
+ DECLARE_ALIGNED_8(uint16_t, intra_matrix[64]);
+ DECLARE_ALIGNED_8(int, q_intra_matrix[64]);
uint8_t *bitstream_buffer;
unsigned int bitstream_buffer_size;
int block_last_index[6];
Index: mjpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mjpeg.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- mjpeg.c 2 Feb 2006 02:28:33 -0000 1.121
+++ mjpeg.c 5 Feb 2006 13:35:16 -0000 1.122
@@ -873,7 +873,7 @@
AVFrame picture; /* picture structure */
int linesize[MAX_COMPONENTS]; ///< linesize << interlaced
int8_t *qscale_table;
- DCTELEM block[64] __align8;
+ DECLARE_ALIGNED_8(DCTELEM, block[64]);
ScanTable scantable;
void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/);
Index: mpegvideo.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.c,v
retrieving revision 1.508
retrieving revision 1.509
diff -u -d -r1.508 -r1.509
--- mpegvideo.c 4 Feb 2006 22:18:45 -0000 1.508
+++ mpegvideo.c 5 Feb 2006 13:35:16 -0000 1.509
@@ -5963,7 +5963,7 @@
DCTELEM *block, int16_t *weight, DCTELEM *orig,
int n, int qscale){
int16_t rem[64];
- DCTELEM d1[64] __align16;
+ DECLARE_ALIGNED_16(DCTELEM, d1[64]);
const int *qmat;
const uint8_t *scantable= s->intra_scantable.scantable;
const uint8_t *perm_scantable= s->intra_scantable.permutated;
Index: mpegvideo.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpegvideo.h,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- mpegvideo.h 4 Feb 2006 20:32:02 -0000 1.236
+++ mpegvideo.h 5 Feb 2006 13:35:17 -0000 1.237
@@ -134,7 +134,7 @@
uint8_t raster_end[64];
#ifdef ARCH_POWERPC
/** Used by dct_quantise_alitvec to find last-non-zero */
- uint8_t __align8 inverse[64];
+ DECLARE_ALIGNED_8(uint8_t, inverse[64]);
#endif
} ScanTable;
@@ -494,7 +494,7 @@
uint16_t (*q_inter_matrix16)[2][64];
int block_last_index[12]; ///< last non zero coefficient in block
/* scantables */
- ScanTable __align8 intra_scantable;
+ DECLARE_ALIGNED_8(ScanTable, intra_scantable);
ScanTable intra_h_scantable;
ScanTable intra_v_scantable;
ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
Index: vp3.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/vp3.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- vp3.c 12 Jan 2006 22:43:17 -0000 1.77
+++ vp3.c 5 Feb 2006 13:35:17 -0000 1.78
@@ -285,9 +285,9 @@
/* these arrays need to be on 16-byte boundaries since SSE2 operations
* index into them */
- int16_t __align16 intra_y_dequant[64];
- int16_t __align16 intra_c_dequant[64];
- int16_t __align16 inter_dequant[64];
+ DECLARE_ALIGNED_16(int16_t, intra_y_dequant[64]);
+ DECLARE_ALIGNED_16(int16_t, intra_c_dequant[64]);
+ DECLARE_ALIGNED_16(int16_t, inter_dequant[64]);
/* This table contains superblock_count * 16 entries. Each set of 16
* numbers corresponds to the fragment indices 0..15 of the superblock.
@@ -1711,7 +1711,7 @@
int m, n;
int i; /* indicates current fragment */
int16_t *dequantizer;
- DCTELEM __align16 block[64];
+ DECLARE_ALIGNED_16(DCTELEM, block[64]);
unsigned char *output_plane;
unsigned char *last_plane;
unsigned char *golden_plane;
Index: wmadec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/wmadec.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- wmadec.c 12 Jan 2006 22:43:17 -0000 1.29
+++ wmadec.c 5 Feb 2006 13:35:17 -0000 1.30
@@ -102,15 +102,15 @@
int block_pos; /* current position in frame */
uint8_t ms_stereo; /* true if mid/side stereo mode */
uint8_t channel_coded[MAX_CHANNELS]; /* true if channel is coded */
- float exponents[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16)));
+ DECLARE_ALIGNED_16(float, exponents[MAX_CHANNELS][BLOCK_MAX_SIZE]);
float max_exponent[MAX_CHANNELS];
int16_t coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
- float coefs[MAX_CHANNELS][BLOCK_MAX_SIZE] __attribute__((aligned(16)));
+ DECLARE_ALIGNED_16(float, coefs[MAX_CHANNELS][BLOCK_MAX_SIZE]);
MDCTContext mdct_ctx[BLOCK_NB_SIZES];
float *windows[BLOCK_NB_SIZES];
- FFTSample mdct_tmp[BLOCK_MAX_SIZE] __attribute__((aligned(16))); /* temporary storage for imdct */
+ DECLARE_ALIGNED_16(FFTSample, mdct_tmp[BLOCK_MAX_SIZE]); /* temporary storage for imdct */
/* output buffer for one frame and the last for IMDCT windowing */
- float frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2] __attribute__((aligned(16)));
+ DECLARE_ALIGNED_16(float, frame_out[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]);
/* last frame info */
uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
int last_bitoffset;
@@ -1097,7 +1097,7 @@
for(ch = 0; ch < s->nb_channels; ch++) {
if (s->channel_coded[ch]) {
- FFTSample output[BLOCK_MAX_SIZE * 2] __attribute__((aligned(16)));
+ DECLARE_ALIGNED_16(FFTSample, output[BLOCK_MAX_SIZE * 2]);
float *ptr;
int i, n4, index, n;
Index: wmv2.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/wmv2.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- wmv2.c 12 Jan 2006 22:43:17 -0000 1.38
+++ wmv2.c 5 Feb 2006 13:35:17 -0000 1.39
@@ -49,7 +49,7 @@
int hshift;
ScanTable abt_scantable[2];
- DCTELEM abt_block2[6][64] __align8;
+ DECLARE_ALIGNED_8(DCTELEM, abt_block2[6][64]);
}Wmv2Context;
static void wmv2_common_init(Wmv2Context * w){
- Previous message: [Ffmpeg-cvslog] CVS: ffmpeg/libavcodec/i386 dsputil_h264_template_mmx.c, 1.4, 1.5 dsputil_mmx.c, 1.109, 1.110 mpegvideo_mmx_template.c, 1.29, 1.30 vp3dsp_sse2.c, 1.9, 1.10
- Next message: [Ffmpeg-cvslog] CVS: ffmpeg configure,1.242,1.243
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ffmpeg-cvslog
mailing list