aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-07-10 22:12:30 +0000
committerMåns Rullgård <mans@mansr.com>2010-07-10 22:12:30 +0000
commit8fc0162ac44f3e60798552ca6d19387be95cae4c (patch)
tree443f7c684a3a8be0e9b70d67a91b8572bfa1ddd2 /libavcodec
parente6b22522c94cfccda97018e52ab65da8c69d8a56 (diff)
downloadffmpeg-8fc0162ac44f3e60798552ca6d19387be95cae4c.tar.gz
Add av_ prefix to bswap macros
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/4xm.c12
-rw-r--r--libavcodec/8bps.c2
-rw-r--r--libavcodec/aac_parser.c2
-rw-r--r--libavcodec/ac3_parser.c2
-rw-r--r--libavcodec/ac3enc.c4
-rw-r--r--libavcodec/alsdec.c4
-rw-r--r--libavcodec/asv1.c4
-rw-r--r--libavcodec/atrac3.c2
-rw-r--r--libavcodec/bmp.c2
-rw-r--r--libavcodec/cook.c4
-rw-r--r--libavcodec/dca.c2
-rw-r--r--libavcodec/dsputil.c18
-rw-r--r--libavcodec/eamad.c2
-rw-r--r--libavcodec/flacenc.c4
-rw-r--r--libavcodec/get_bits.h4
-rw-r--r--libavcodec/imc.c2
-rw-r--r--libavcodec/indeo3.c66
-rw-r--r--libavcodec/mjpegdec.c4
-rw-r--r--libavcodec/pngdec.c2
-rw-r--r--libavcodec/pngenc.c2
-rw-r--r--libavcodec/pnmdec.c2
-rw-r--r--libavcodec/put_bits.h10
-rw-r--r--libavcodec/r210dec.c2
-rw-r--r--libavcodec/shorten.c4
-rw-r--r--libavcodec/smacker.c2
-rw-r--r--libavcodec/tta.c2
-rw-r--r--libavcodec/v210dec.c6
-rw-r--r--libavcodec/v210x.c8
28 files changed, 90 insertions, 90 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 955268fbb7..b6a97aa187 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -333,16 +333,16 @@ static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int lo
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
return;
}
- mcdc(dst, src, log2w, h, stride, 1, le2ne_16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 1, av_le2ne16(*f->wordstream++));
}else if(code == 5){
- mcdc(dst, src, log2w, h, stride, 0, le2ne_16(*f->wordstream++));
+ mcdc(dst, src, log2w, h, stride, 0, av_le2ne16(*f->wordstream++));
}else if(code == 6){
if(log2w){
- dst[0] = le2ne_16(*f->wordstream++);
- dst[1] = le2ne_16(*f->wordstream++);
+ dst[0] = av_le2ne16(*f->wordstream++);
+ dst[1] = av_le2ne16(*f->wordstream++);
}else{
- dst[0 ] = le2ne_16(*f->wordstream++);
- dst[stride] = le2ne_16(*f->wordstream++);
+ dst[0 ] = av_le2ne16(*f->wordstream++);
+ dst[stride] = av_le2ne16(*f->wordstream++);
}
}
}
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index badeb2134a..292c739c11 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -100,7 +100,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
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 = be2ne_16(*(const unsigned short *)(lp+row*2));
+ dlen = av_be2ne16(*(const unsigned short *)(lp+row*2));
/* Decode a row of this plane */
while(dlen > 0) {
if(dp + 1 >= buf+buf_size) return -1;
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index e0eb32091f..23ac8cebbd 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -80,7 +80,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
uint8_t u8[8];
} tmp;
- tmp.u64 = be2ne_64(state);
+ tmp.u64 = av_be2ne64(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)
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 8a1a8762fd..b844ec36c3 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -164,7 +164,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
union {
uint64_t u64;
uint8_t u8[8];
- } tmp = { be2ne_64(state) };
+ } tmp = { av_be2ne64(state) };
AC3HeaderInfo hdr;
GetBitContext gbc;
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index e30e1bdbb9..edae9a92bf 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1161,14 +1161,14 @@ static int output_frame_end(AC3EncodeContext *s)
/* Now we must compute both crcs : this is not so easy for crc1
because it is at the beginning of the data... */
frame_size_58 = (frame_size >> 1) + (frame_size >> 3);
- crc1 = bswap_16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
+ crc1 = av_bswap16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
frame + 4, 2 * frame_size_58 - 4));
/* XXX: could precompute crc_inv */
crc_inv = pow_poly((CRC16_POLY >> 1), (16 * frame_size_58) - 16, CRC16_POLY);
crc1 = mul_poly(crc_inv, crc1, CRC16_POLY);
AV_WB16(frame+2,crc1);
- crc2 = bswap_16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
+ crc2 = av_bswap16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
frame + 2 * frame_size_58,
(frame_size - frame_size_58) * 2 - 2));
AV_WB16(frame+2*frame_size-2,crc2);
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 7bf574a9f6..bbcbb70652 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1464,7 +1464,7 @@ static int decode_frame(AVCodecContext *avctx,
int32_t v;
if (swap)
- v = bswap_32(src[sample]);
+ v = av_bswap32(src[sample]);
else
v = src[sample];
if (!HAVE_BIGENDIAN)
@@ -1482,7 +1482,7 @@ static int decode_frame(AVCodecContext *avctx,
for (sample = 0;
sample < ctx->cur_frame_length * avctx->channels;
sample++)
- *dest++ = bswap_16(src[sample]);
+ *dest++ = av_bswap16(src[sample]);
} else {
ctx->dsp.bswap_buf((uint32_t*)ctx->crc_buffer, data,
ctx->cur_frame_length * avctx->channels);
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 9808926abe..6b1a0935ae 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -588,8 +588,8 @@ static av_cold int encode_init(AVCodecContext *avctx){
avctx->extradata= av_mallocz(8);
avctx->extradata_size=8;
- ((uint32_t*)avctx->extradata)[0]= le2ne_32(a->inv_qscale);
- ((uint32_t*)avctx->extradata)[1]= le2ne_32(AV_RL32("ASUS"));
+ ((uint32_t*)avctx->extradata)[0]= av_le2ne32(a->inv_qscale);
+ ((uint32_t*)avctx->extradata)[1]= av_le2ne32(AV_RL32("ASUS"));
for(i=0; i<64; i++){
int q= 32*scale*ff_mpeg1_default_intra_matrix[i];
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 71897ecd0b..c29fb19252 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -179,7 +179,7 @@ static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
off = (intptr_t)inbuffer & 3;
buf = (const uint32_t*) (inbuffer - off);
- c = be2ne_32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
+ c = av_be2ne32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
bytes += 3 + off;
for (i = 0; i < bytes/4; i++)
obuf[i] = c ^ buf[i];
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 6ca9d2c323..270452fe66 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -290,7 +290,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
uint16_t *dst = (uint16_t *) ptr;
for(j = 0; j < avctx->width; j++)
- *dst++ = le2ne_16(*src++);
+ *dst++ = av_le2ne16(*src++);
buf += n;
ptr += linesize;
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 8b85e597d9..b7e2ef1a91 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -316,12 +316,12 @@ static inline int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes)
/* 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^be2ne_64(int64_t)in[i]);
+ * (int64_t)out[i] = 0x37c511f237c511f2^av_be2ne64(int64_t)in[i]);
* Buffer alignment needs to be checked. */
off = (intptr_t)inbuffer & 3;
buf = (const uint32_t*) (inbuffer - off);
- c = be2ne_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8))));
+ c = av_be2ne32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8))));
bytes += 3 + off;
for (i = 0; i < bytes/4; i++)
obuf[i] = c ^ buf[i];
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 4b232c7006..7deb284481 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1230,7 +1230,7 @@ static int dca_convert_bitstream(const uint8_t * src, int src_size, uint8_t * ds
return src_size;
case DCA_MARKER_RAW_LE:
for (i = 0; i < (src_size + 1) >> 1; i++)
- *sdst++ = bswap_16(*ssrc++);
+ *sdst++ = av_bswap16(*ssrc++);
return src_size;
case DCA_MARKER_14B_BE:
case DCA_MARKER_14B_LE:
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index eb9e1ada15..44fcf596c4 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -247,17 +247,17 @@ static void bswap_buf(uint32_t *dst, const uint32_t *src, int w){
int i;
for(i=0; i+8<=w; i+=8){
- dst[i+0]= bswap_32(src[i+0]);
- dst[i+1]= bswap_32(src[i+1]);
- dst[i+2]= bswap_32(src[i+2]);
- dst[i+3]= bswap_32(src[i+3]);
- dst[i+4]= bswap_32(src[i+4]);
- dst[i+5]= bswap_32(src[i+5]);
- dst[i+6]= bswap_32(src[i+6]);
- dst[i+7]= bswap_32(src[i+7]);
+ dst[i+0]= av_bswap32(src[i+0]);
+ dst[i+1]= av_bswap32(src[i+1]);
+ dst[i+2]= av_bswap32(src[i+2]);
+ dst[i+3]= av_bswap32(src[i+3]);
+ dst[i+4]= av_bswap32(src[i+4]);
+ dst[i+5]= av_bswap32(src[i+5]);
+ dst[i+6]= av_bswap32(src[i+6]);
+ dst[i+7]= av_bswap32(src[i+7]);
}
for(;i<w; i++){
- dst[i+0]= bswap_32(src[i+0]);
+ dst[i+0]= av_bswap32(src[i+0]);
}
}
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 8fc5ef1362..3077c0883d 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -53,7 +53,7 @@ static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
{
int i;
for (i=0; i<count; i++)
- dst[i] = bswap_16(src[i]);
+ dst[i] = av_bswap16(src[i]);
}
static av_cold int decode_init(AVCodecContext *avctx)
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 3540198c6e..fa05b7d4ee 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1153,7 +1153,7 @@ static void output_frame_footer(FlacEncodeContext *s)
{
int crc;
flush_put_bits(&s->pb);
- crc = bswap_16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
+ crc = av_bswap16(av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0,
s->pb.buf, put_bits_count(&s->pb)>>3));
put_bits(&s->pb, 16, crc);
flush_put_bits(&s->pb);
@@ -1164,7 +1164,7 @@ static void update_md5_sum(FlacEncodeContext *s, int16_t *samples)
#if HAVE_BIGENDIAN
int i;
for(i = 0; i < s->frame.blocksize*s->channels; i++) {
- int16_t smp = le2ne_16(samples[i]);
+ int16_t smp = av_le2ne16(samples[i]);
av_md5_update(s->md5ctx, (uint8_t *)&smp, 2);
}
#else
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index f8c3535e4a..f4b3646e69 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -267,7 +267,7 @@ static inline void skip_bits_long(GetBitContext *s, int n){
# define UPDATE_CACHE(name, gb)\
if(name##_bit_count > 0){\
- const uint32_t next= be2ne_32( *name##_buffer_ptr );\
+ const uint32_t next= av_be2ne32( *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(GetBitContext *s, int n){
re_bit_count += n;
re_buffer_ptr += re_bit_count>>5;
re_bit_count &= 31;
- re_cache0 = be2ne_32( re_buffer_ptr[-1] ) << re_bit_count;
+ re_cache0 = av_be2ne32( re_buffer_ptr[-1] ) << re_bit_count;
re_cache1 = 0;
UPDATE_CACHE(re, s)
CLOSE_READER(re, s)
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 2a420f5bcf..a27e4b6d32 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -660,7 +660,7 @@ static int imc_decode_frame(AVCodecContext * avctx,
return -1;
}
for(i = 0; i < IMC_BLOCK_SIZE / 2; i++)
- buf16[i] = bswap_16(((const uint16_t*)buf)[i]);
+ buf16[i] = av_bswap16(((const uint16_t*)buf)[i]);
init_get_bits(&q->gb, (const uint8_t*)buf16, IMC_BLOCK_SIZE * 8);
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index af13694379..63d91da6a5 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -359,14 +359,14 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
switch(correction_type_sp[0][k]) {
case 0:
- *cur_lp = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ *cur_lp = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
break;
case 1:
- 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);
+ res = ((av_le2ne16(((unsigned short *)(ref_lp))[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
+ ((unsigned short *)cur_lp)[0] = av_le2ne16(res);
+ res = ((av_le2ne16(((unsigned short *)(ref_lp))[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
+ ((unsigned short *)cur_lp)[1] = av_le2ne16(res);
buf1++;
lp2++;
break;
@@ -462,19 +462,19 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- cur_lp[width_tbl[1]] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(*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] = le2ne_32(((le2ne_32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
lp2++;
break;
case 1:
- 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);
+ res = ((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + correction_lp[lp2 & 0x01][*buf1]) << 1;
+ ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res);
+ res = ((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + correction_lp[lp2 & 0x01][k]) << 1;
+ ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(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(Indeo3DecodeContext *s,
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- 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);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(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(Indeo3DecodeContext *s,
break;
case 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);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(lv1) >> 1) + correctionloworder_lp[lp2 & 0x01][*buf1]) << 1);
+ cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(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(Indeo3DecodeContext *s,
case 0:
lv1 = correctionloworder_lp[lp2 & 0x01][k];
lv2 = correctionhighorder_lp[lp2 & 0x01][k];
- 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);
+ cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1);
+ cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
+ cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(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] = 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);
+ cur_lp[0] = av_le2ne32(((av_le2ne32(ref_lp[0]) >> 1) + lv1) << 1);
+ cur_lp[1] = av_le2ne32(((av_le2ne32(ref_lp[1]) >> 1) + lv2) << 1);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]]) >> 1) + lv1) << 1);
+ cur_lp[width_tbl[1]+1] = av_le2ne32(((av_le2ne32(ref_lp[width_tbl[1]+1]) >> 1) + lv2) << 1);
lp2++;
break;
@@ -849,22 +849,22 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
switch(correction_type_sp[lp2 & 0x01][k]) {
case 0:
- 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);
+ cur_lp[0] = av_le2ne32(((av_le2ne32(*ref_lp) >> 1) + correction_lp[lp2 & 0x01][k]) << 1);
+ cur_lp[width_tbl[1]] = av_le2ne32(((av_le2ne32(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)(((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);
+ res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[0]) >> 1) + lv1) << 1);
+ ((unsigned short *)cur_lp)[0] = av_le2ne16(res);
+ res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[1]) >> 1) + lv2) << 1);
+ ((unsigned short *)cur_lp)[1] = av_le2ne16(res);
+ res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]]) >> 1) + lv1) << 1);
+ ((unsigned short *)cur_lp)[width_tbl[2]] = av_le2ne16(res);
+ res = (unsigned short)(((av_le2ne16(((unsigned short *)ref_lp)[width_tbl[2]+1]) >> 1) + lv2) << 1);
+ ((unsigned short *)cur_lp)[width_tbl[2]+1] = av_le2ne16(res);
lp2++;
break;
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 477ef973aa..8aff966f6e 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1027,7 +1027,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
return -1;
id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
- id = be2ne_32(id);
+ id = av_be2ne32(id);
len -= 6;
if(s->avctx->debug & FF_DEBUG_STARTCODE){
@@ -1134,7 +1134,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
if ((s->start_code == APP1) && (len > (0x28 - 8)))
{
id = (get_bits(&s->gb, 16) << 16) | get_bits(&s->gb, 16);
- id = be2ne_32(id);
+ id = av_be2ne32(id);
len -= 4;
if (id == AV_RL32("mjpg")) /* Apple MJPEG-A */
{
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a00c284946..037c5a0e58 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -429,7 +429,7 @@ static int decode_frame(AVCodecContext *avctx,
if (length > 0x7fffffff)
goto fail;
tag32 = bytestream_get_be32(&s->bytestream);
- tag = bswap_32(tag32);
+ tag = av_bswap32(tag32);
dprintf(avctx, "png: tag=%c%c%c%c length=%u\n",
(tag & 0xff),
((tag >> 8) & 0xff),
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 615bcc44cc..d199b95da9 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -199,7 +199,7 @@ static void png_write_chunk(uint8_t **f, uint32_t tag,
crc = crc32(0, Z_NULL, 0);
AV_WL32(tagbuf, tag);
crc = crc32(crc, tagbuf, 4);
- bytestream_put_be32(f, bswap_32(tag));
+ bytestream_put_be32(f, av_bswap32(tag));
if (length > 0) {
crc = crc32(crc, buf, length);
memcpy(*f, buf, length);
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 23039e7e6e..6bea93de02 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -124,7 +124,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
} else if (upgrade == 2) {
unsigned int j, v, f = (65535 * 32768 + s->maxval / 2) / s->maxval;
for (j = 0; j < n / 2; j++) {
- v = be2ne_16(((uint16_t *)s->bytestream)[j]);
+ v = av_be2ne16(((uint16_t *)s->bytestream)[j]);
((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
}
}
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 835c9e4157..d301d0afcc 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -168,7 +168,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
AV_WL32(s->buf_ptr, bit_buf);
} else
#endif
- *(uint32_t *)s->buf_ptr = le2ne_32(bit_buf);
+ *(uint32_t *)s->buf_ptr = av_le2ne32(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(PutBitContext *s, int n, unsigned int value)
AV_WB32(s->buf_ptr, bit_buf);
} else
#endif
- *(uint32_t *)s->buf_ptr = be2ne_32(bit_buf);
+ *(uint32_t *)s->buf_ptr = av_be2ne32(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(PutBitContext *s, int n, unsigned int value)
value<<= 32-n;
- ptr[0] |= be2ne_32(value>>(index&31));
- ptr[1] = be2ne_32(value<<(32-(index&31)));
+ ptr[0] |= av_be2ne32(value>>(index&31));
+ ptr[1] = av_be2ne32(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(PutBitContext *s, int n, unsigned int value)
int index= s->index;
uint32_t *ptr= (uint32_t*)(((uint8_t *)s->buf)+(index>>3));
- ptr[0] |= be2ne_32(value<<(32-n-(index&7) ));
+ ptr[0] |= av_be2ne32(value<<(32-n-(index&7) ));
ptr[1] = 0;
//if(n>24) printf("%d %d\n", n, value);
index+= n;
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 32516837c7..cf04070697 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -61,7 +61,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
for (h = 0; h < avctx->height; h++) {
uint16_t *dst = (uint16_t *)dst_line;
for (w = 0; w < avctx->width; w++) {
- uint32_t pixel = be2ne_32(*src++);
+ uint32_t pixel = av_be2ne32(*src++);
uint16_t r, g, b;
b = pixel << 6;
g = (pixel >> 4) & 0xffc0;
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 934da8e8b6..213e5b39b7 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -184,12 +184,12 @@ static void init_offset(ShortenContext *s)
static inline int get_le32(GetBitContext *gb)
{
- return bswap_32(get_bits_long(gb, 32));
+ return av_bswap32(get_bits_long(gb, 32));
}
static inline short get_le16(GetBitContext *gb)
{
- return bswap_16(get_bits_long(gb, 16));
+ return av_bswap16(get_bits_long(gb, 16));
}
static int decode_wave_header(AVCodecContext *avctx, uint8_t *header, int header_size)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 1d85f68907..ac2f76b775 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -618,7 +618,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
if(bits) { //decode 16-bit data
for(i = stereo; i >= 0; i--)
- pred[i] = bswap_16(get_bits(&gb, 16));
+ pred[i] = av_bswap16(get_bits(&gb, 16));
for(i = 0; i < stereo; i++)
*samples++ = pred[i];
for(i = 0; i < unp_size / 2; i++) {
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 901455324e..0a4c69a472 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -221,7 +221,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
{
/* signature */
skip_bits(&s->gb, 32);
-// if (get_bits_long(&s->gb, 32) != bswap_32(AV_RL32("TTA1"))) {
+// if (get_bits_long(&s->gb, 32) != av_bswap32(AV_RL32("TTA1"))) {
// av_log(s->avctx, AV_LOG_ERROR, "Missing magic\n");
// return -1;
// }
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 4cf8f73c19..61e9566c87 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -68,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
#define READ_PIXELS(a, b, c) \
do { \
- val = le2ne_32(*src++); \
+ val = av_le2ne32(*src++); \
*a++ = val << 6; \
*b++ = (val >> 4) & 0xFFC0; \
*c++ = (val >> 14) & 0xFFC0; \
@@ -86,14 +86,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (w < avctx->width - 1) {
READ_PIXELS(u, y, v);
- val = le2ne_32(*src++);
+ val = av_le2ne32(*src++);
*y++ = val << 6;
}
if (w < avctx->width - 3) {
*u++ = (val >> 4) & 0xFFC0;
*y++ = (val >> 14) & 0xFFC0;
- val = le2ne_32(*src++);
+ val = av_le2ne32(*src++);
*v++ = val << 6;
*y++ = (val >> 4) & 0xFFC0;
}
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 9375a4f2a8..6b93a056f9 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -67,12 +67,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
pic->key_frame= 1;
for(;;){
- uint32_t v= be2ne_32(*src++);
+ uint32_t v= av_be2ne32(*src++);
*udst++= (v>>16) & 0xFFC0;
*ydst++= (v>>6 ) & 0xFFC0;
*vdst++= (v<<4 ) & 0xFFC0;
- v= be2ne_32(*src++);
+ v= av_be2ne32(*src++);
*ydst++= (v>>16) & 0xFFC0;
if(ydst >= yend){
@@ -87,7 +87,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
*udst++= (v>>6 ) & 0xFFC0;
*ydst++= (v<<4 ) & 0xFFC0;
- v= be2ne_32(*src++);
+ v= av_be2ne32(*src++);
*vdst++= (v>>16) & 0xFFC0;
*ydst++= (v>>6 ) & 0xFFC0;
@@ -102,7 +102,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
*udst++= (v<<4 ) & 0xFFC0;
- v= be2ne_32(*src++);
+ v= av_be2ne32(*src++);
*ydst++= (v>>16) & 0xFFC0;
*vdst++= (v>>6 ) & 0xFFC0;
*ydst++= (v<<4 ) & 0xFFC0;