changeset 6248:e630da0f5861 libavformat

Add av_ prefix to bswap macros
author mru
date Sat, 10 Jul 2010 22:12:30 +0000
parents a64b9fa63635
children 63edc8683095
files asfcrypt.c asfdec.c avidec.c electronicarts.c mov.c mpegtsenc.c mtv.c nutdec.c smacker.c sol.c spdif.c
diffstat 11 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/asfcrypt.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/asfcrypt.c	Sat Jul 10 22:12:30 2010 +0000
@@ -170,7 +170,7 @@
         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);
 }
--- a/asfdec.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/asfdec.c	Sat Jul 10 22:12:30 2010 +0000
@@ -386,7 +386,7 @@
                     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));
--- a/avidec.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/avidec.c	Sat Jul 10 22:12:30 2010 +0000
@@ -539,7 +539,7 @@
                         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));
--- a/electronicarts.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/electronicarts.c	Sat Jul 10 22:12:30 2010 +0000
@@ -301,7 +301,7 @@
         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:
--- a/mov.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/mov.c	Sat Jul 10 22:12:30 2010 +0000
@@ -993,7 +993,7 @@
         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;
--- a/mpegtsenc.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/mpegtsenc.c	Sat Jul 10 22:12:30 2010 +0000
@@ -74,7 +74,7 @@
     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;
--- a/mtv.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/mtv.c	Sat Jul 10 22:12:30 2010 +0000
@@ -188,7 +188,7 @@
          */
 
         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;
     }
--- a/nutdec.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/nutdec.c	Sat Jul 10 22:12:30 2010 +0000
@@ -94,7 +94,7 @@
     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);
--- a/smacker.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/smacker.c	Sat Jul 10 22:12:30 2010 +0000
@@ -213,10 +213,10 @@
         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);
--- a/sol.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/sol.c	Sat Jul 10 22:12:30 2010 +0000
@@ -34,7 +34,7 @@
 {
     /* 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)
--- a/spdif.c	Sat Jul 10 22:09:01 2010 +0000
+++ b/spdif.c	Sat Jul 10 22:12:30 2010 +0000
@@ -90,17 +90,17 @@
     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)