[FFmpeg-cvslog] r24169 - in trunk: libavcodec/4xm.c libavcodec/8bps.c libavcodec/aac_parser.c libavcodec/ac3_parser.c libavcodec/asv1.c libavcodec/atrac3.c libavcodec/bmp.c libavcodec/cook.c libavcodec/flacenc.c l...
mru
subversion
Sun Jul 11 00:09:01 CEST 2010
Author: mru
Date: Sun Jul 11 00:09:01 2010
New Revision: 24169
Log:
bswap: change ME to NE in macro names
Other parts of FFmpeg use NE (native endian) rather than ME (machine).
This makes it consistent.
Modified:
trunk/libavcodec/4xm.c
trunk/libavcodec/8bps.c
trunk/libavcodec/aac_parser.c
trunk/libavcodec/ac3_parser.c
trunk/libavcodec/asv1.c
trunk/libavcodec/atrac3.c
trunk/libavcodec/bmp.c
trunk/libavcodec/cook.c
trunk/libavcodec/flacenc.c
trunk/libavcodec/get_bits.h
trunk/libavcodec/iff.c
trunk/libavcodec/indeo3.c
trunk/libavcodec/mjpegdec.c
trunk/libavcodec/pnmdec.c
trunk/libavcodec/put_bits.h
trunk/libavcodec/r210dec.c
trunk/libavcodec/v210dec.c
trunk/libavcodec/v210x.c
trunk/libavformat/asfcrypt.c
trunk/libavformat/nutdec.c
trunk/libavformat/smacker.c
trunk/libavformat/sol.c
trunk/libavutil/bswap.h
trunk/libavutil/crc.c
trunk/libavutil/des.c
trunk/libavutil/md5.c
trunk/libavutil/sha.c
Modified: trunk/libavcodec/4xm.c
==============================================================================
--- trunk/libavcodec/4xm.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/4xm.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -333,16 +333,16 @@ static void decode_p_block(FourXContext
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
return;
}
- mcdc(dst, src, log2w, h, stride, 1, le2me_16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 1, le2ne_16(*f->wordstream++));
}else if(code == 5){
- mcdc(dst, src, log2w, h, stride, 0, le2me_16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 0, le2ne_16(*f->wordstream++));
}else if(code == 6){
if(log2w){
- dst[0] = le2me_16(*f->wordstream++);
- dst[1] = le2me_16(*f->wordstream++);
+ dst[0] = le2ne_16(*f->wordstream++);
+ dst[1] = le2ne_16(*f->wordstream++);
}else{
- dst[0 ] = le2me_16(*f->wordstream++);
- dst[stride] = le2me_16(*f->wordstream++);
+ dst[0 ] = le2ne_16(*f->wordstream++);
+ dst[stride] = le2ne_16(*f->wordstream++);
}
}
}
Modified: trunk/libavcodec/8bps.c
==============================================================================
--- trunk/libavcodec/8bps.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/8bps.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -100,7 +100,7 @@ static int decode_frame(AVCodecContext *
for(row = 0; row < height; row++) {
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
pixptr_end = pixptr + c->pic.linesize[0];
- dlen = be2me_16(*(const unsigned short *)(lp+row*2));
+ dlen = be2ne_16(*(const unsigned short *)(lp+row*2));
/* Decode a row of this plane */
while(dlen > 0) {
if(dp + 1 >= buf+buf_size) return -1;
Modified: trunk/libavcodec/aac_parser.c
==============================================================================
--- trunk/libavcodec/aac_parser.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/aac_parser.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -80,7 +80,7 @@ static int aac_sync(uint64_t state, AACA
uint8_t u8[8];
} tmp;
- tmp.u64 = be2me_64(state);
+ tmp.u64 = be2ne_64(state);
init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
Modified: trunk/libavcodec/ac3_parser.c
==============================================================================
--- trunk/libavcodec/ac3_parser.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/ac3_parser.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -164,7 +164,7 @@ static int ac3_sync(uint64_t state, AACA
union {
uint64_t u64;
uint8_t u8[8];
- } tmp = { be2me_64(state) };
+ } tmp = { be2ne_64(state) };
AC3HeaderInfo hdr;
GetBitContext gbc;
Modified: trunk/libavcodec/asv1.c
==============================================================================
--- trunk/libavcodec/asv1.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/asv1.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -588,8 +588,8 @@ static av_cold int encode_init(AVCodecCo
avctx->extradata= av_mallocz(8);
avctx->extradata_size=8;
- ((uint32_t*)avctx->extradata)[0]= le2me_32(a->inv_qscale);
- ((uint32_t*)avctx->extradata)[1]= le2me_32(AV_RL32("ASUS"));
+ ((uint32_t*)avctx->extradata)[0]= le2ne_32(a->inv_qscale);
+ ((uint32_t*)avctx->extradata)[1]= le2ne_32(AV_RL32("ASUS"));
for(i=0; i<64; i++){
int q= 32*scale*ff_mpeg1_default_intra_matrix[i];
Modified: trunk/libavcodec/atrac3.c
==============================================================================
--- trunk/libavcodec/atrac3.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/atrac3.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -179,7 +179,7 @@ static int decode_bytes(const uint8_t* i
off = (intptr_t)inbuffer & 3;
buf = (const uint32_t*) (inbuffer - off);
- c = be2me_32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
+ c = be2ne_32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
bytes += 3 + off;
for (i = 0; i < bytes/4; i++)
obuf[i] = c ^ buf[i];
Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/bmp.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -290,7 +290,7 @@ static int bmp_decode_frame(AVCodecConte
uint16_t *dst = (uint16_t *) ptr;
for(j = 0; j < avctx->width; j++)
- *dst++ = le2me_16(*src++);
+ *dst++ = le2ne_16(*src++);
buf += n;
ptr += linesize;
Modified: trunk/libavcodec/cook.c
==============================================================================
--- trunk/libavcodec/cook.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/cook.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -316,12 +316,12 @@ static inline int decode_bytes(const uin
/* FIXME: 64 bit platforms would be able to do 64 bits at a time.
* I'm too lazy though, should be something like
* for(i=0 ; i<bitamount/64 ; i++)
- * (int64_t)out[i] = 0x37c511f237c511f2^be2me_64(int64_t)in[i]);
+ * (int64_t)out[i] = 0x37c511f237c511f2^be2ne_64(int64_t)in[i]);
* Buffer alignment needs to be checked. */
off = (intptr_t)inbuffer & 3;
buf = (const uint32_t*) (inbuffer - off);
- c = be2me_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8))));
+ c = be2ne_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8))));
bytes += 3 + off;
for (i = 0; i < bytes/4; i++)
obuf[i] = c ^ buf[i];
Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/flacenc.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -1164,7 +1164,7 @@ static void update_md5_sum(FlacEncodeCon
#if HAVE_BIGENDIAN
int i;
for(i = 0; i < s->frame.blocksize*s->channels; i++) {
- int16_t smp = le2me_16(samples[i]);
+ int16_t smp = le2ne_16(samples[i]);
av_md5_update(s->md5ctx, (uint8_t *)&smp, 2);
}
#else
Modified: trunk/libavcodec/get_bits.h
==============================================================================
--- trunk/libavcodec/get_bits.h Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/get_bits.h Sun Jul 11 00:09:01 2010 (r24169)
@@ -267,7 +267,7 @@ static inline void skip_bits_long(GetBit
# define UPDATE_CACHE(name, gb)\
if(name##_bit_count > 0){\
- const uint32_t next= be2me_32( *name##_buffer_ptr );\
+ const uint32_t next= be2ne_32( *name##_buffer_ptr );\
name##_cache0 |= NEG_USR32(next,name##_bit_count);\
name##_cache1 |= next<<name##_bit_count;\
name##_buffer_ptr++;\
@@ -319,7 +319,7 @@ static inline void skip_bits_long(GetBit
re_bit_count += n;
re_buffer_ptr += re_bit_count>>5;
re_bit_count &= 31;
- re_cache0 = be2me_32( re_buffer_ptr[-1] ) << re_bit_count;
+ re_cache0 = be2ne_32( re_buffer_ptr[-1] ) << re_bit_count;
re_cache1 = 0;
UPDATE_CACHE(re, s)
CLOSE_READER(re, s)
Modified: trunk/libavcodec/iff.c
==============================================================================
--- trunk/libavcodec/iff.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/iff.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -38,22 +38,22 @@ typedef struct {
} IffContext;
#define LUT8_PART(plane, v) \
- AV_LE2ME64C(UINT64_C(0x0000000)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1000000)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0010000)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1010000)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0000100)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1000100)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0010100)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1010100)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0000001)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1000001)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0010001)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1010001)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0000101)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1000101)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x0010101)<<32 | v) << plane, \
- AV_LE2ME64C(UINT64_C(0x1010101)<<32 | v) << plane
+ AV_LE2NE64C(UINT64_C(0x0000000)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1000000)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0010000)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1010000)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0000100)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1000100)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0010100)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1010100)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0000001)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1000001)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0010001)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1010001)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0000101)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1000101)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x0010101)<<32 | v) << plane, \
+ AV_LE2NE64C(UINT64_C(0x1010101)<<32 | v) << plane
#define LUT8(plane) { \
LUT8_PART(plane, 0x0000000), \
Modified: trunk/libavcodec/indeo3.c
==============================================================================
--- trunk/libavcodec/indeo3.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/indeo3.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -359,14 +359,14 @@ static void iv_Decode_Chunk(Indeo3Decode
switch(correction_type_sp[0][k]) {
case 0:
- *cur_lp = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ *cur_lp = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
break;
case 1:
- res = ((le2me_16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
- ((unsigned short *)cur_lp)[0] = le2me_16(res);
- res = ((le2me_16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
- ((unsigned short *)cur_lp)[1] = le2me_16(res);
+ res = ((le2ne_16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
+ ((unsigned short *)cur_lp)[0] = le2ne_16(res);
+ res = ((le2ne_16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
+ ((unsigned short *)cur_lp)[1] = le2ne_16(res);
buf1++;
lp2++;
break;
@@ -462,19 +462,19 @@ static void iv_Decode_Chunk(Indeo3Decode
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
if(lp2 > 0 || flag1 == 0 || strip->ypos != 0)
cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
else
- cur_lp[0] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[0] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
break;
case 1:
- res = ((le2me_16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
- ((unsigned short *)cur_lp)[width_tbl[2]] = le2me_16(res);
- res = ((le2me_16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
- ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2me_16(res);
+ res = ((le2ne_16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
+ ((unsigned short *)cur_lp)[width_tbl[2]] = le2ne_16(res);
+ res = ((le2ne_16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
+ ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2ne_16(res);
if(lp2 > 0 || flag1 == 0 || strip->ypos != 0)
cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
@@ -591,8 +591,8 @@ static void iv_Decode_Chunk(Indeo3Decode
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
- cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(lv2) >> 1) + correctionhighorder_lp[lp2 & 0x01][k]) << 1);
if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) {
cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
@@ -604,8 +604,8 @@ static void iv_Decode_Chunk(Indeo3Decode
break;
case 1:
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1);
- cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1);
+ cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(lv2) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
if(lp2 > 0 || strip->ypos != 0 || flag1 == 0) {
cur_lp[0] = ((cur_lp[-width_tbl[1]] >> 1) + (cur_lp[width_tbl[1]] >> 1)) & 0xFEFEFEFE;
cur_lp[1] = ((cur_lp[-width_tbl[1]+1] >> 1) + (cur_lp[width_tbl[1]+1] >> 1)) & 0xFEFEFEFE;
@@ -748,20 +748,20 @@ static void iv_Decode_Chunk(Indeo3Decode
case 0:
lv1 = correctionloworder_lp[lp2 & 0x01][k];
lv2 = correctionhighorder_lp[lp2 & 0x01][k];
- cur_lp[0] = le2me_32(((le2me_32(ref_lp[0]) >> 1) + lv1) << 1);
- cur_lp[1] = le2me_32(((le2me_32(ref_lp[1]) >> 1) + lv2) << 1);
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
- cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
+ cur_lp[0] = le2ne_32(((le2ne_32(ref_lp[0]) >> 1) + lv1) << 1);
+ cur_lp[1] = le2ne_32(((le2ne_32(ref_lp[1]) >> 1) + lv2) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
+ cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
lp2++;
break;
case 1:
lv1 = correctionloworder_lp[lp2 & 0x01][*buf1++];
lv2 = correctionloworder_lp[lp2 & 0x01][k];
- cur_lp[0] = le2me_32(((le2me_32(ref_lp[0]) >> 1) + lv1) << 1);
- cur_lp[1] = le2me_32(((le2me_32(ref_lp[1]) >> 1) + lv2) << 1);
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
- cur_lp[width_tbl[1]+1] = le2me_32(((le2me_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
+ cur_lp[0] = le2ne_32(((le2ne_32(ref_lp[0]) >> 1) + lv1) << 1);
+ cur_lp[1] = le2ne_32(((le2ne_32(ref_lp[1]) >> 1) + lv2) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
+ cur_lp[width_tbl[1]+1] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
lp2++;
break;
@@ -849,22 +849,22 @@ static void iv_Decode_Chunk(Indeo3Decode
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- cur_lp[0] = le2me_32(((le2me_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
- cur_lp[width_tbl[1]] = le2me_32(((le2me_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[0] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(ref_lp[width_tbl[1]]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
break;
case 1:
lv1 = (unsigned short)(correction_lp[lp2 & 0x01][*buf1++]);
lv2 = (unsigned short)(correction_lp[lp2 & 0x01][k]);
- res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1);
- ((unsigned short *)cur_lp)[0] = le2me_16(res);
- res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1);
- ((unsigned short *)cur_lp)[1] = le2me_16(res);
- res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1);
- ((unsigned short *)cur_lp)[width_tbl[2]] = le2me_16(res);
- res = (unsigned short)(((le2me_16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1);
- ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2me_16(res);
+ res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1);
+ ((unsigned short *)cur_lp)[0] = le2ne_16(res);
+ res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1);
+ ((unsigned short *)cur_lp)[1] = le2ne_16(res);
+ res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1);
+ ((unsigned short *)cur_lp)[width_tbl[2]] = le2ne_16(res);
+ res = (unsigned short)(((le2ne_16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1);
+ ((unsigned short *)cur_lp)[width_tbl[2]+1] = le2ne_16(res);
lp2++;
break;
Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/mjpegdec.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -1027,7 +1027,7 @@ static int mjpeg_decode_app(MJpegDecodeC
return -1;
id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
- id = be2me_32(id);
+ id = be2ne_32(id);
len -= 6;
if(s->avctx->debug & FF_DEBUG_STARTCODE){
@@ -1134,7 +1134,7 @@ static int mjpeg_decode_app(MJpegDecodeC
if ((s->start_code == APP1) && (len > (0x28 - 8)))
{
id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
- id = be2me_32(id);
+ id = be2ne_32(id);
len -= 4;
if (id == AV_RL32("mjpg")) /* Apple MJPEG-A */
{
Modified: trunk/libavcodec/pnmdec.c
==============================================================================
--- trunk/libavcodec/pnmdec.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/pnmdec.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -124,7 +124,7 @@ static int pnm_decode_frame(AVCodecConte
} else if (upgrade == 2) {
unsigned int j, v, f = (65535 * 32768 + s->maxval / 2) / s->maxval;
for (j = 0; j < n / 2; j++) {
- v = be2me_16(((uint16_t *)s->bytestream)[j]);
+ v = be2ne_16(((uint16_t *)s->bytestream)[j]);
((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
}
}
Modified: trunk/libavcodec/put_bits.h
==============================================================================
--- trunk/libavcodec/put_bits.h Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/put_bits.h Sun Jul 11 00:09:01 2010 (r24169)
@@ -168,7 +168,7 @@ static inline void put_bits(PutBitContex
AV_WL32(s->buf_ptr, bit_buf);
} else
#endif
- *(uint32_t *)s->buf_ptr = le2me_32(bit_buf);
+ *(uint32_t *)s->buf_ptr = le2ne_32(bit_buf);
s->buf_ptr+=4;
bit_buf = (bit_left==32)?0:value >> bit_left;
bit_left+=32;
@@ -186,7 +186,7 @@ static inline void put_bits(PutBitContex
AV_WB32(s->buf_ptr, bit_buf);
} else
#endif
- *(uint32_t *)s->buf_ptr = be2me_32(bit_buf);
+ *(uint32_t *)s->buf_ptr = be2ne_32(bit_buf);
//printf("bitbuf = %08x\n", bit_buf);
s->buf_ptr+=4;
bit_left+=32 - n;
@@ -224,8 +224,8 @@ static inline void put_bits(PutBitContex
value<<= 32-n;
- ptr[0] |= be2me_32(value>>(index&31));
- ptr[1] = be2me_32(value<<(32-(index&31)));
+ ptr[0] |= be2ne_32(value>>(index&31));
+ ptr[1] = be2ne_32(value<<(32-(index&31)));
//if(n>24) printf("%d %d\n", n, value);
index+= n;
s->index= index;
@@ -252,7 +252,7 @@ static inline void put_bits(PutBitContex
int index= s->index;
uint32_t *ptr= (uint32_t*)(((uint8_t *)s->buf)+(index>>3));
- ptr[0] |= be2me_32(value<<(32-n-(index&7) ));
+ ptr[0] |= be2ne_32(value<<(32-n-(index&7) ));
ptr[1] = 0;
//if(n>24) printf("%d %d\n", n, value);
index+= n;
Modified: trunk/libavcodec/r210dec.c
==============================================================================
--- trunk/libavcodec/r210dec.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/r210dec.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -61,7 +61,7 @@ static int decode_frame(AVCodecContext *
for (h = 0; h < avctx->height; h++) {
uint16_t *dst = (uint16_t *)dst_line;
for (w = 0; w < avctx->width; w++) {
- uint32_t pixel = be2me_32(*src++);
+ uint32_t pixel = be2ne_32(*src++);
uint16_t r, g, b;
b = pixel << 6;
g = (pixel >> 4) & 0xffc0;
Modified: trunk/libavcodec/v210dec.c
==============================================================================
--- trunk/libavcodec/v210dec.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/v210dec.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *
#define READ_PIXELS(a, b, c) \
do { \
- val = le2me_32(*src++); \
+ val = le2ne_32(*src++); \
*a++ = val << 6; \
*b++ = (val >> 4) & 0xFFC0; \
*c++ = (val >> 14) & 0xFFC0; \
@@ -86,14 +86,14 @@ static int decode_frame(AVCodecContext *
if (w < avctx->width - 1) {
READ_PIXELS(u, y, v);
- val = le2me_32(*src++);
+ val = le2ne_32(*src++);
*y++ = val << 6;
}
if (w < avctx->width - 3) {
*u++ = (val >> 4) & 0xFFC0;
*y++ = (val >> 14) & 0xFFC0;
- val = le2me_32(*src++);
+ val = le2ne_32(*src++);
*v++ = val << 6;
*y++ = (val >> 4) & 0xFFC0;
}
Modified: trunk/libavcodec/v210x.c
==============================================================================
--- trunk/libavcodec/v210x.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavcodec/v210x.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -67,12 +67,12 @@ static int decode_frame(AVCodecContext *
pic->key_frame= 1;
for(;;){
- uint32_t v= be2me_32(*src++);
+ uint32_t v= be2ne_32(*src++);
*udst++= (v>>16) & 0xFFC0;
*ydst++= (v>>6 ) & 0xFFC0;
*vdst++= (v<<4 ) & 0xFFC0;
- v= be2me_32(*src++);
+ v= be2ne_32(*src++);
*ydst++= (v>>16) & 0xFFC0;
if(ydst >= yend){
@@ -87,7 +87,7 @@ static int decode_frame(AVCodecContext *
*udst++= (v>>6 ) & 0xFFC0;
*ydst++= (v<<4 ) & 0xFFC0;
- v= be2me_32(*src++);
+ v= be2ne_32(*src++);
*vdst++= (v>>16) & 0xFFC0;
*ydst++= (v>>6 ) & 0xFFC0;
@@ -102,7 +102,7 @@ static int decode_frame(AVCodecContext *
*udst++= (v<<4 ) & 0xFFC0;
- v= be2me_32(*src++);
+ v= be2ne_32(*src++);
*ydst++= (v>>16) & 0xFFC0;
*vdst++= (v>>6 ) & 0xFFC0;
*ydst++= (v<<4 ) & 0xFFC0;
Modified: trunk/libavformat/asfcrypt.c
==============================================================================
--- trunk/libavformat/asfcrypt.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavformat/asfcrypt.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -170,7 +170,7 @@ void ff_asfcrypt_dec(const uint8_t key[2
ms_state = multiswap_enc(ms_keys, ms_state, AV_RL64(qwords));
multiswap_invert_keys(ms_keys);
packetkey = (packetkey << 32) | (packetkey >> 32);
- packetkey = le2me_64(packetkey);
+ packetkey = le2ne_64(packetkey);
packetkey = multiswap_dec(ms_keys, ms_state, packetkey);
AV_WL64(qwords, packetkey);
}
Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavformat/nutdec.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -94,7 +94,7 @@ static int get_packetheader(NUTContext *
int64_t size;
// start= url_ftell(bc) - 8;
- startcode= be2me_64(startcode);
+ startcode= be2ne_64(startcode);
startcode= ff_crc04C11DB7_update(0, (uint8_t*)&startcode, 8);
init_checksum(bc, ff_crc04C11DB7_update, startcode);
Modified: trunk/libavformat/smacker.c
==============================================================================
--- trunk/libavformat/smacker.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavformat/smacker.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -213,10 +213,10 @@ static int smacker_read_header(AVFormatC
av_free(smk->frm_flags);
return AVERROR(EIO);
}
- ((int32_t*)st->codec->extradata)[0] = le2me_32(smk->mmap_size);
- ((int32_t*)st->codec->extradata)[1] = le2me_32(smk->mclr_size);
- ((int32_t*)st->codec->extradata)[2] = le2me_32(smk->full_size);
- ((int32_t*)st->codec->extradata)[3] = le2me_32(smk->type_size);
+ ((int32_t*)st->codec->extradata)[0] = le2ne_32(smk->mmap_size);
+ ((int32_t*)st->codec->extradata)[1] = le2ne_32(smk->mclr_size);
+ ((int32_t*)st->codec->extradata)[2] = le2ne_32(smk->full_size);
+ ((int32_t*)st->codec->extradata)[3] = le2ne_32(smk->type_size);
smk->curstream = -1;
smk->nextpos = url_ftell(pb);
Modified: trunk/libavformat/sol.c
==============================================================================
--- trunk/libavformat/sol.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavformat/sol.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -34,7 +34,7 @@ static int sol_probe(AVProbeData *p)
{
/* check file header */
uint16_t magic;
- magic=le2me_16(*((uint16_t*)p->buf));
+ magic=le2ne_16(*((uint16_t*)p->buf));
if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) &&
p->buf[2] == 'S' && p->buf[3] == 'O' &&
p->buf[4] == 'L' && p->buf[5] == 0)
Modified: trunk/libavutil/bswap.h
==============================================================================
--- trunk/libavutil/bswap.h Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavutil/bswap.h Sun Jul 11 00:09:01 2010 (r24169)
@@ -85,34 +85,34 @@ static inline uint64_t av_const bswap_64
}
#endif
-// be2me ... big-endian to machine-endian
-// le2me ... little-endian to machine-endian
+// be2ne ... big-endian to native-endian
+// le2ne ... little-endian to native-endian
#if HAVE_BIGENDIAN
-#define be2me_16(x) (x)
-#define be2me_32(x) (x)
-#define be2me_64(x) (x)
-#define le2me_16(x) bswap_16(x)
-#define le2me_32(x) bswap_32(x)
-#define le2me_64(x) bswap_64(x)
-#define AV_BE2MEC(s, x) (x)
-#define AV_LE2MEC(s, x) AV_BSWAPC(s, x)
+#define be2ne_16(x) (x)
+#define be2ne_32(x) (x)
+#define be2ne_64(x) (x)
+#define le2ne_16(x) bswap_16(x)
+#define le2ne_32(x) bswap_32(x)
+#define le2ne_64(x) bswap_64(x)
+#define AV_BE2NEC(s, x) (x)
+#define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
#else
-#define be2me_16(x) bswap_16(x)
-#define be2me_32(x) bswap_32(x)
-#define be2me_64(x) bswap_64(x)
-#define le2me_16(x) (x)
-#define le2me_32(x) (x)
-#define le2me_64(x) (x)
-#define AV_BE2MEC(s, x) AV_BSWAPC(s, x)
-#define AV_LE2MEC(s, x) (x)
+#define be2ne_16(x) bswap_16(x)
+#define be2ne_32(x) bswap_32(x)
+#define be2ne_64(x) bswap_64(x)
+#define le2ne_16(x) (x)
+#define le2ne_32(x) (x)
+#define le2ne_64(x) (x)
+#define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
+#define AV_LE2NEC(s, x) (x)
#endif
-#define AV_BE2ME16C(x) AV_BE2MEC(16, x)
-#define AV_BE2ME32C(x) AV_BE2MEC(32, x)
-#define AV_BE2ME64C(x) AV_BE2MEC(64, x)
-#define AV_LE2ME16C(x) AV_LE2MEC(16, x)
-#define AV_LE2ME32C(x) AV_LE2MEC(32, x)
-#define AV_LE2ME64C(x) AV_LE2MEC(64, x)
+#define AV_BE2NE16C(x) AV_BE2NEC(16, x)
+#define AV_BE2NE32C(x) AV_BE2NEC(32, x)
+#define AV_BE2NE64C(x) AV_BE2NEC(64, x)
+#define AV_LE2NE16C(x) AV_LE2NEC(16, x)
+#define AV_LE2NE32C(x) AV_LE2NEC(32, x)
+#define AV_LE2NE64C(x) AV_LE2NEC(64, x)
#endif /* AVUTIL_BSWAP_H */
Modified: trunk/libavutil/crc.c
==============================================================================
--- trunk/libavutil/crc.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavutil/crc.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -121,7 +121,7 @@ uint32_t av_crc(const AVCRC *ctx, uint32
crc = ctx[((uint8_t)crc) ^ *buffer++] ^ (crc >> 8);
while(buffer<end-3){
- crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4;
+ crc ^= le2ne_32(*(const uint32_t*)buffer); buffer+=4;
crc = ctx[3*256 + ( crc &0xFF)]
^ctx[2*256 + ((crc>>8 )&0xFF)]
^ctx[1*256 + ((crc>>16)&0xFF)]
Modified: trunk/libavutil/des.c
==============================================================================
--- trunk/libavutil/des.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavutil/des.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -297,10 +297,10 @@ int av_des_init(AVDES *d, const uint8_t
}
void av_des_crypt(AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) {
- uint64_t iv_val = iv ? be2me_64(*(uint64_t *)iv) : 0;
+ uint64_t iv_val = iv ? be2ne_64(*(uint64_t *)iv) : 0;
while (count-- > 0) {
uint64_t dst_val;
- uint64_t src_val = src ? be2me_64(*(const uint64_t *)src) : 0;
+ uint64_t src_val = src ? be2ne_64(*(const uint64_t *)src) : 0;
if (decrypt) {
uint64_t tmp = src_val;
if (d->triple_des) {
@@ -317,12 +317,12 @@ void av_des_crypt(AVDES *d, uint8_t *dst
}
iv_val = iv ? dst_val : 0;
}
- *(uint64_t *)dst = be2me_64(dst_val);
+ *(uint64_t *)dst = be2ne_64(dst_val);
src += 8;
dst += 8;
}
if (iv)
- *(uint64_t *)iv = be2me_64(iv_val);
+ *(uint64_t *)iv = be2ne_64(iv_val);
}
#ifdef TEST
Modified: trunk/libavutil/md5.c
==============================================================================
--- trunk/libavutil/md5.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavutil/md5.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -141,7 +141,7 @@ void av_md5_update(AVMD5 *ctx, const uin
void av_md5_final(AVMD5 *ctx, uint8_t *dst){
int i;
- uint64_t finalcount= le2me_64(ctx->len<<3);
+ uint64_t finalcount= le2ne_64(ctx->len<<3);
av_md5_update(ctx, "\200", 1);
while((ctx->len & 63)!=56)
@@ -150,7 +150,7 @@ void av_md5_final(AVMD5 *ctx, uint8_t *d
av_md5_update(ctx, (uint8_t*)&finalcount, 8);
for(i=0; i<4; i++)
- ((uint32_t*)dst)[i]= le2me_32(ctx->ABCD[3-i]);
+ ((uint32_t*)dst)[i]= le2ne_32(ctx->ABCD[3-i]);
}
void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len){
Modified: trunk/libavutil/sha.c
==============================================================================
--- trunk/libavutil/sha.c Sat Jul 10 20:46:10 2010 (r24168)
+++ trunk/libavutil/sha.c Sun Jul 11 00:09:01 2010 (r24169)
@@ -43,7 +43,7 @@ const int av_sha_size = sizeof(AVSHA);
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
-#define blk0(i) (block[i] = be2me_32(((const uint32_t*)buffer)[i]))
+#define blk0(i) (block[i] = be2ne_32(((const uint32_t*)buffer)[i]))
#define blk(i) (block[i] = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1))
#define R0(v,w,x,y,z,i) z += ((w&(x^y))^y) + blk0(i) + 0x5A827999 + rol(v, 5); w = rol(w, 30);
@@ -68,7 +68,7 @@ static void sha1_transform(uint32_t stat
for (i = 0; i < 80; i++) {
int t;
if (i < 16)
- t = be2me_32(((uint32_t*)buffer)[i]);
+ t = be2ne_32(((uint32_t*)buffer)[i]);
else
t = rol(block[i-3] ^ block[i-8] ^ block[i-14] ^ block[i-16], 1);
block[i] = t;
@@ -314,7 +314,7 @@ void av_sha_update(AVSHA* ctx, const uin
void av_sha_final(AVSHA* ctx, uint8_t *digest)
{
int i;
- uint64_t finalcount = be2me_64(ctx->count << 3);
+ uint64_t finalcount = be2ne_64(ctx->count << 3);
av_sha_update(ctx, "\200", 1);
while ((ctx->count & 63) != 56)
More information about the ffmpeg-cvslog
mailing list