summaryrefslogtreecommitdiff
path: root/libavformat
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 /libavformat
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 'libavformat')
-rw-r--r--libavformat/asfcrypt.c2
-rw-r--r--libavformat/asfdec.c2
-rw-r--r--libavformat/avidec.c2
-rw-r--r--libavformat/electronicarts.c2
-rw-r--r--libavformat/mov.c2
-rw-r--r--libavformat/mpegtsenc.c2
-rw-r--r--libavformat/mtv.c2
-rw-r--r--libavformat/nutdec.c2
-rw-r--r--libavformat/smacker.c8
-rw-r--r--libavformat/sol.c2
-rw-r--r--libavformat/spdif.c18
11 files changed, 22 insertions, 22 deletions
diff --git a/libavformat/asfcrypt.c b/libavformat/asfcrypt.c
index 993c9dac91..55ad82795a 100644
--- a/libavformat/asfcrypt.c
+++ b/libavformat/asfcrypt.c
@@ -170,7 +170,7 @@ void ff_asfcrypt_dec(const uint8_t key[20], uint8_t *data, int len) {
ms_state = multiswap_enc(ms_keys, ms_state, AV_RL64(qwords));
multiswap_invert_keys(ms_keys);
packetkey = (packetkey << 32) | (packetkey >> 32);
- packetkey = le2ne_64(packetkey);
+ packetkey = av_le2ne64(packetkey);
packetkey = multiswap_dec(ms_keys, ms_state, packetkey);
AV_WL64(qwords, packetkey);
}
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 17b203382c..149a49306a 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -386,7 +386,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl));
#if HAVE_BIGENDIAN
for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
- st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]);
+ st->codec->palctrl->palette[i] = av_bswap32(((uint32_t*)st->codec->extradata)[i]);
#else
memcpy(st->codec->palctrl->palette, st->codec->extradata,
FFMIN(st->codec->extradata_size, AVPALETTE_SIZE));
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index cdf8307298..78ccc2639c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -539,7 +539,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl));
#if HAVE_BIGENDIAN
for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++)
- st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]);
+ st->codec->palctrl->palette[i] = av_bswap32(((uint32_t*)st->codec->extradata)[i]);
#else
memcpy(st->codec->palctrl->palette, st->codec->extradata,
FFMIN(st->codec->extradata_size, AVPALETTE_SIZE));
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 86d7f91e66..df517df897 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -301,7 +301,7 @@ static int process_ea_header(AVFormatContext *s) {
if (i == 0)
ea->big_endian = size > 0x000FFFFF;
if (ea->big_endian)
- size = bswap_32(size);
+ size = av_bswap32(size);
switch (blockid) {
case ISNh_TAG:
diff --git a/libavformat/mov.c b/libavformat/mov.c
index fb2353c0d5..bf986b337d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -993,7 +993,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
st->codec->codec_tag = format;
id = ff_codec_get_id(codec_movaudio_tags, format);
if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
- id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF);
+ id = ff_codec_get_id(ff_codec_wav_tags, av_bswap32(format)&0xFFFF);
if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index af019ca47a..4bd48d3927 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -74,7 +74,7 @@ static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len)
unsigned char *q;
int first, b, len1, left;
- crc = bswap_32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, buf, len - 4));
+ crc = av_bswap32(av_crc(av_crc_get_table(AV_CRC_32_IEEE), -1, buf, len - 4));
buf[len - 4] = (crc >> 24) & 0xff;
buf[len - 3] = (crc >> 16) & 0xff;
buf[len - 2] = (crc >> 8) & 0xff;
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 4eae1a19e6..9280455d25 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -188,7 +188,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
*/
for(i=0;i<mtv->img_segment_size/2;i++)
- *((uint16_t *)pkt->data+i) = bswap_16(*((uint16_t *)pkt->data+i));
+ *((uint16_t *)pkt->data+i) = av_bswap16(*((uint16_t *)pkt->data+i));
#endif
pkt->stream_index = VIDEO_SID;
}
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 76ed7d470d..1b616dee4a 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -94,7 +94,7 @@ static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_ch
int64_t size;
// start= url_ftell(bc) - 8;
- startcode= be2ne_64(startcode);
+ startcode= av_be2ne64(startcode);
startcode= ff_crc04C11DB7_update(0, (uint8_t*)&startcode, 8);
init_checksum(bc, ff_crc04C11DB7_update, startcode);
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index 8a3a26e6ab..89e9e35df0 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -213,10 +213,10 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_free(smk->frm_flags);
return AVERROR(EIO);
}
- ((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);
+ ((int32_t*)st->codec->extradata)[0] = av_le2ne32(smk->mmap_size);
+ ((int32_t*)st->codec->extradata)[1] = av_le2ne32(smk->mclr_size);
+ ((int32_t*)st->codec->extradata)[2] = av_le2ne32(smk->full_size);
+ ((int32_t*)st->codec->extradata)[3] = av_le2ne32(smk->type_size);
smk->curstream = -1;
smk->nextpos = url_ftell(pb);
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 824e56ea28..a7faacc8e8 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -34,7 +34,7 @@ static int sol_probe(AVProbeData *p)
{
/* check file header */
uint16_t magic;
- magic=le2ne_16(*((uint16_t*)p->buf));
+ magic=av_le2ne16(*((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)
diff --git a/libavformat/spdif.c b/libavformat/spdif.c
index 813be679d7..1355797593 100644
--- a/libavformat/spdif.c
+++ b/libavformat/spdif.c
@@ -90,17 +90,17 @@ static void bswap_buf16(uint16_t *dst, const uint16_t *src, int w)
int i;
for (i = 0; i + 8 <= w; i += 8) {
- dst[i + 0] = bswap_16(src[i + 0]);
- dst[i + 1] = bswap_16(src[i + 1]);
- dst[i + 2] = bswap_16(src[i + 2]);
- dst[i + 3] = bswap_16(src[i + 3]);
- dst[i + 4] = bswap_16(src[i + 4]);
- dst[i + 5] = bswap_16(src[i + 5]);
- dst[i + 6] = bswap_16(src[i + 6]);
- dst[i + 7] = bswap_16(src[i + 7]);
+ dst[i + 0] = av_bswap16(src[i + 0]);
+ dst[i + 1] = av_bswap16(src[i + 1]);
+ dst[i + 2] = av_bswap16(src[i + 2]);
+ dst[i + 3] = av_bswap16(src[i + 3]);
+ dst[i + 4] = av_bswap16(src[i + 4]);
+ dst[i + 5] = av_bswap16(src[i + 5]);
+ dst[i + 6] = av_bswap16(src[i + 6]);
+ dst[i + 7] = av_bswap16(src[i + 7]);
}
for (; i < w; i++)
- dst[i + 0] = bswap_16(src[i + 0]);
+ dst[i + 0] = av_bswap16(src[i + 0]);
}
static int spdif_header_ac3(AVFormatContext *s, AVPacket *pkt)