[Ffmpeg-cvslog] r7587 - in trunk: libavcodec/adpcm.c libavcodec/alac.c libavcodec/avs.c libavcodec/bitstream_filter.c libavcodec/bytestream.h libavcodec/cinepak.c libavcodec/dpcm.c libavcodec/dsicinav.c libavcodec/dvbsubdec.c libavcodec/flicvideo.c libavcodec/fraps.c libavcodec/h264.c libavcodec/kmvc.c libavcodec/loco.c libavcodec/mjpeg.c libavcodec/mmvideo.c libavcodec/msvideo1.c libavcodec/nuv.c libavcodec/qdm2.c libavcodec/qdrw.c libavcodec/qtrle.c libavcodec/rpza.c libavcodec/rv10.c libavcodec/smacker.c libavcodec/smc.c libavcodec/svq3.c libavcodec/targa.c libavcodec/tiff.c libavcodec/truemotion1.c libavcodec/truemotion2.c libavcodec/truespeech.c libavcodec/tscc.c libavcodec/vc1.c libavcodec/vmdav.c libavcodec/vmnc.c libavcodec/vp6.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/ws-snd1.c libavcodec/xan.c libavcodec/xl.c libavcodec/zmbv.c libavformat/4xm.c libavformat/dsicin.c libavformat/electronicarts.c libavformat/flic.c libavformat/idcin.c libavformat/idroq.c libavformat/ipmovie.c libavformat/matroska.c libavformat/mm.c libavformat/mov.c libavformat/movenc.c libavformat/nuv.c libavformat/psxstr.c libavformat/rtp.c libavformat/rtp_h264.c libavformat/segafilm.c libavformat/sgi.c libavformat/sierravmd.c libavformat/smacker.c libavformat/swf.c libavformat/wc3movie.c libavformat/westwood.c libavformat/wv.c libavutil/intreadwrite.h

alex subversion
Fri Jan 19 23:13:18 CET 2007


Author: alex
Date: Fri Jan 19 23:12:59 2007
New Revision: 7587

Modified:
   trunk/libavcodec/adpcm.c
   trunk/libavcodec/alac.c
   trunk/libavcodec/avs.c
   trunk/libavcodec/bitstream_filter.c
   trunk/libavcodec/bytestream.h
   trunk/libavcodec/cinepak.c
   trunk/libavcodec/dpcm.c
   trunk/libavcodec/dsicinav.c
   trunk/libavcodec/dvbsubdec.c
   trunk/libavcodec/flicvideo.c
   trunk/libavcodec/fraps.c
   trunk/libavcodec/h264.c
   trunk/libavcodec/kmvc.c
   trunk/libavcodec/loco.c
   trunk/libavcodec/mjpeg.c
   trunk/libavcodec/mmvideo.c
   trunk/libavcodec/msvideo1.c
   trunk/libavcodec/nuv.c
   trunk/libavcodec/qdm2.c
   trunk/libavcodec/qdrw.c
   trunk/libavcodec/qtrle.c
   trunk/libavcodec/rpza.c
   trunk/libavcodec/rv10.c
   trunk/libavcodec/smacker.c
   trunk/libavcodec/smc.c
   trunk/libavcodec/svq3.c
   trunk/libavcodec/targa.c
   trunk/libavcodec/tiff.c
   trunk/libavcodec/truemotion1.c
   trunk/libavcodec/truemotion2.c
   trunk/libavcodec/truespeech.c
   trunk/libavcodec/tscc.c
   trunk/libavcodec/vc1.c
   trunk/libavcodec/vmdav.c
   trunk/libavcodec/vmnc.c
   trunk/libavcodec/vp6.c
   trunk/libavcodec/vqavideo.c
   trunk/libavcodec/wavpack.c
   trunk/libavcodec/ws-snd1.c
   trunk/libavcodec/xan.c
   trunk/libavcodec/xl.c
   trunk/libavcodec/zmbv.c
   trunk/libavformat/4xm.c
   trunk/libavformat/dsicin.c
   trunk/libavformat/electronicarts.c
   trunk/libavformat/flic.c
   trunk/libavformat/idcin.c
   trunk/libavformat/idroq.c
   trunk/libavformat/ipmovie.c
   trunk/libavformat/matroska.c
   trunk/libavformat/mm.c
   trunk/libavformat/mov.c
   trunk/libavformat/movenc.c
   trunk/libavformat/nuv.c
   trunk/libavformat/psxstr.c
   trunk/libavformat/rtp.c
   trunk/libavformat/rtp_h264.c
   trunk/libavformat/segafilm.c
   trunk/libavformat/sgi.c
   trunk/libavformat/sierravmd.c
   trunk/libavformat/smacker.c
   trunk/libavformat/swf.c
   trunk/libavformat/wc3movie.c
   trunk/libavformat/westwood.c
   trunk/libavformat/wv.c
   trunk/libavutil/intreadwrite.h

Log:
rename BE/LE_8/16/32 to AV_RL/B_8/16/32

Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c	(original)
+++ trunk/libavcodec/adpcm.c	Fri Jan 19 23:12:59 2007
@@ -1100,19 +1100,19 @@
         }
         break;
     case CODEC_ID_ADPCM_EA:
-        samples_in_chunk = LE_32(src);
+        samples_in_chunk = AV_RL32(src);
         if (samples_in_chunk >= ((buf_size - 12) * 2)) {
             src += buf_size;
             break;
         }
         src += 4;
-        current_left_sample = (int16_t)LE_16(src);
+        current_left_sample = (int16_t)AV_RL16(src);
         src += 2;
-        previous_left_sample = (int16_t)LE_16(src);
+        previous_left_sample = (int16_t)AV_RL16(src);
         src += 2;
-        current_right_sample = (int16_t)LE_16(src);
+        current_right_sample = (int16_t)AV_RL16(src);
         src += 2;
-        previous_right_sample = (int16_t)LE_16(src);
+        previous_right_sample = (int16_t)AV_RL16(src);
         src += 2;
 
         for (count1 = 0; count1 < samples_in_chunk/28;count1++) {

Modified: trunk/libavcodec/alac.c
==============================================================================
--- trunk/libavcodec/alac.c	(original)
+++ trunk/libavcodec/alac.c	Fri Jan 19 23:12:59 2007
@@ -110,11 +110,11 @@
     ptr += 4; /* alac */
     ptr += 4; /* 0 ? */
 
-    if(BE_32(ptr) >= UINT_MAX/4){
+    if(AV_RB32(ptr) >= UINT_MAX/4){
         av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n");
         return -1;
     }
-    alac->setinfo_max_samples_per_frame = BE_32(ptr); /* buffer size / 2 ? */
+    alac->setinfo_max_samples_per_frame = AV_RB32(ptr); /* buffer size / 2 ? */
     ptr += 4;
     alac->setinfo_7a = *ptr++;
     alac->setinfo_sample_size = *ptr++;
@@ -122,13 +122,13 @@
     alac->setinfo_rice_initialhistory = *ptr++;
     alac->setinfo_rice_kmodifier = *ptr++;
     alac->setinfo_7f = *ptr++; // channels?
-    alac->setinfo_80 = BE_16(ptr);
+    alac->setinfo_80 = AV_RB16(ptr);
     ptr += 2;
-    alac->setinfo_82 = BE_32(ptr); // max coded frame size
+    alac->setinfo_82 = AV_RB32(ptr); // max coded frame size
     ptr += 4;
-    alac->setinfo_86 = BE_32(ptr); // bitrate ?
+    alac->setinfo_86 = AV_RB32(ptr); // bitrate ?
     ptr += 4;
-    alac->setinfo_8a_rate = BE_32(ptr); // samplerate
+    alac->setinfo_8a_rate = AV_RB32(ptr); // samplerate
     ptr += 4;
 
     allocate_buffers(alac);

Modified: trunk/libavcodec/avs.c
==============================================================================
--- trunk/libavcodec/avs.c	(original)
+++ trunk/libavcodec/avs.c	Fri Jan 19 23:12:59 2007
@@ -74,8 +74,8 @@
         int first, last;
         uint32_t *pal = (uint32_t *) avs->picture.data[1];
 
-        first = LE_16(buf);
-        last = first + LE_16(buf + 2);
+        first = AV_RL16(buf);
+        last = first + AV_RL16(buf + 2);
         buf += 4;
         for (i=first; i<last; i++, buf+=3)
             pal[i] = (buf[0] << 18) | (buf[1] << 10) | (buf[2] << 2);

Modified: trunk/libavcodec/bitstream_filter.c
==============================================================================
--- trunk/libavcodec/bitstream_filter.c	(original)
+++ trunk/libavcodec/bitstream_filter.c	Fri Jan 19 23:12:59 2007
@@ -138,7 +138,7 @@
         return -1;
     }
 
-    header = BE_32(buf);
+    header = AV_RB32(buf);
     mode_extension= (header>>4)&3;
 
     if(ff_mpa_check_header(header) < 0 || (header&0x60000) != 0x20000){
@@ -160,7 +160,7 @@
         av_log(avctx, AV_LOG_ERROR, "Extradata invalid\n");
         return -1;
     }
-    extraheader = BE_32(avctx->extradata+11);
+    extraheader = AV_RB32(avctx->extradata+11);
     if((extraheader&MP3_MASK) != (header&MP3_MASK))
         goto output_unchanged;
 
@@ -192,7 +192,7 @@
     int sample_rate_index=0;
     int lsf, mpeg25, bitrate_index, frame_size;
 
-    header = BE_32(buf);
+    header = AV_RB32(buf);
     if(ff_mpa_check_header(header) >= 0){
         *poutbuf= (uint8_t *) buf;
         *poutbuf_size= buf_size;
@@ -205,7 +205,7 @@
         return -1;
     }
 
-    header= BE_32(avctx->extradata+11) & MP3_MASK;
+    header= AV_RB32(avctx->extradata+11) & MP3_MASK;
 
     lsf     = sample_rate < (24000+32000)/2;
     mpeg25  = sample_rate < (12000+16000)/2;

Modified: trunk/libavcodec/bytestream.h
==============================================================================
--- trunk/libavcodec/bytestream.h	(original)
+++ trunk/libavcodec/bytestream.h	Fri Jan 19 23:12:59 2007
@@ -25,13 +25,13 @@
 static av_always_inline unsigned int bytestream_get_le32(uint8_t **b)
 {
     (*b) += 4;
-    return LE_32(*b - 4);
+    return AV_RL32(*b - 4);
 }
 
 static av_always_inline unsigned int bytestream_get_le16(uint8_t **b)
 {
     (*b) += 2;
-    return LE_16(*b - 2);
+    return AV_RL16(*b - 2);
 }
 
 static av_always_inline unsigned int bytestream_get_byte(uint8_t **b)

Modified: trunk/libavcodec/cinepak.c
==============================================================================
--- trunk/libavcodec/cinepak.c	(original)
+++ trunk/libavcodec/cinepak.c	Fri Jan 19 23:12:59 2007
@@ -90,7 +90,7 @@
             if ((data + 4) > eod)
                 break;
 
-            flag  = BE_32 (data);
+            flag  = AV_RB32 (data);
             data += 4;
             mask  = 0x80000000;
         }
@@ -152,7 +152,7 @@
                 if ((data + 4) > eod)
                     return -1;
 
-                flag  = BE_32 (data);
+                flag  = AV_RB32 (data);
                 data += 4;
                 mask  = 0x80000000;
             }
@@ -162,7 +162,7 @@
                     if ((data + 4) > eod)
                         return -1;
 
-                    flag  = BE_32 (data);
+                    flag  = AV_RB32 (data);
                     data += 4;
                     mask  = 0x80000000;
                 }
@@ -278,8 +278,8 @@
         return -1;
 
     while ((data + 4) <= eod) {
-        chunk_id   = BE_16 (&data[0]);
-        chunk_size = BE_16 (&data[2]) - 4;
+        chunk_id   = AV_RB16 (&data[0]);
+        chunk_size = AV_RB16 (&data[2]) - 4;
         if(chunk_size < 0)
             return -1;
 
@@ -328,8 +328,8 @@
         return -1;
 
     frame_flags = s->data[0];
-    num_strips  = BE_16 (&s->data[8]);
-    encoded_buf_size = ((s->data[1] << 16) | BE_16 (&s->data[2]));
+    num_strips  = AV_RB16 (&s->data[8]);
+    encoded_buf_size = ((s->data[1] << 16) | AV_RB16 (&s->data[2]));
 
     /* if this is the first frame, check for deviant Sega FILM data */
     if (s->sega_film_skip_bytes == -1) {
@@ -361,13 +361,13 @@
         if ((s->data + 12) > eod)
             return -1;
 
-        s->strips[i].id = BE_16 (s->data);
+        s->strips[i].id = AV_RB16 (s->data);
         s->strips[i].y1 = y0;
         s->strips[i].x1 = 0;
-        s->strips[i].y2 = y0 + BE_16 (&s->data[8]);
+        s->strips[i].y2 = y0 + AV_RB16 (&s->data[8]);
         s->strips[i].x2 = s->avctx->width;
 
-        strip_size = BE_16 (&s->data[2]) - 12;
+        strip_size = AV_RB16 (&s->data[2]) - 12;
         s->data   += 12;
         strip_size = ((s->data + strip_size) > eod) ? (eod - s->data) : strip_size;
 

Modified: trunk/libavcodec/dpcm.c
==============================================================================
--- trunk/libavcodec/dpcm.c	(original)
+++ trunk/libavcodec/dpcm.c	Fri Jan 19 23:12:59 2007
@@ -179,7 +179,7 @@
 
     case CODEC_ID_ROQ_DPCM:
         if (s->channels == 1)
-            predictor[0] = LE_16(&buf[6]);
+            predictor[0] = AV_RL16(&buf[6]);
         else {
             predictor[0] = buf[7] << 8;
             predictor[1] = buf[6] << 8;
@@ -200,12 +200,12 @@
 
     case CODEC_ID_INTERPLAY_DPCM:
         in = 6;  /* skip over the stream mask and stream length */
-        predictor[0] = LE_16(&buf[in]);
+        predictor[0] = AV_RL16(&buf[in]);
         in += 2;
         SE_16BIT(predictor[0])
         output_samples[out++] = predictor[0];
         if (s->channels == 2) {
-            predictor[1] = LE_16(&buf[in]);
+            predictor[1] = AV_RL16(&buf[in]);
             in += 2;
             SE_16BIT(predictor[1])
             output_samples[out++] = predictor[1];
@@ -225,11 +225,11 @@
     case CODEC_ID_XAN_DPCM:
         in = 0;
         shift[0] = shift[1] = 4;
-        predictor[0] = LE_16(&buf[in]);
+        predictor[0] = AV_RL16(&buf[in]);
         in += 2;
         SE_16BIT(predictor[0]);
         if (s->channels == 2) {
-            predictor[1] = LE_16(&buf[in]);
+            predictor[1] = AV_RL16(&buf[in]);
             in += 2;
             SE_16BIT(predictor[1]);
         }

Modified: trunk/libavcodec/dsicinav.c
==============================================================================
--- trunk/libavcodec/dsicinav.c	(original)
+++ trunk/libavcodec/dsicinav.c	Fri Jan 19 23:12:59 2007
@@ -159,7 +159,7 @@
             if (code & (1 << i)) {
                 *dst++ = *src++;
             } else {
-                cmd = LE_16(src); src += 2;
+                cmd = AV_RL16(src); src += 2;
                 offset = cmd >> 4;
                 sz = (cmd & 0xF) + 2;
                 /* don't use memcpy/memmove here as the decoding routine (ab)uses */
@@ -321,7 +321,7 @@
 
     if (cin->initial_decode_frame) {
         cin->initial_decode_frame = 0;
-        cin->delta = (int16_t)LE_16(src); src += 2;
+        cin->delta = (int16_t)AV_RL16(src); src += 2;
         *samples++ = cin->delta;
         buf_size -= 2;
     }

Modified: trunk/libavcodec/dvbsubdec.c
==============================================================================
--- trunk/libavcodec/dvbsubdec.c	(original)
+++ trunk/libavcodec/dvbsubdec.c	Fri Jan 19 23:12:59 2007
@@ -851,7 +851,7 @@
 
     int coding_method, non_modifying_colour;
 
-    object_id = BE_16(buf);
+    object_id = AV_RB16(buf);
     buf += 2;
 
     object = get_object(ctx, object_id);
@@ -863,9 +863,9 @@
     non_modifying_colour = ((*buf++) >> 1) & 1;
 
     if (coding_method == 0) {
-        top_field_len = BE_16(buf);
+        top_field_len = AV_RB16(buf);
         buf += 2;
-        bottom_field_len = BE_16(buf);
+        bottom_field_len = AV_RB16(buf);
         buf += 2;
 
         if (buf + top_field_len + bottom_field_len > buf_end) {
@@ -1042,9 +1042,9 @@
 
     fill = ((*buf++) >> 3) & 1;
 
-    region->width = BE_16(buf);
+    region->width = AV_RB16(buf);
     buf += 2;
-    region->height = BE_16(buf);
+    region->height = AV_RB16(buf);
     buf += 2;
 
     if (region->width * region->height != region->buf_size) {
@@ -1086,7 +1086,7 @@
     delete_region_display_list(ctx, region);
 
     while (buf + 5 < buf_end) {
-        object_id = BE_16(buf);
+        object_id = AV_RB16(buf);
         buf += 2;
 
         object = get_object(ctx, object_id);
@@ -1106,9 +1106,9 @@
         display->object_id = object_id;
         display->region_id = region_id;
 
-        display->x_pos = BE_16(buf) & 0xfff;
+        display->x_pos = AV_RB16(buf) & 0xfff;
         buf += 2;
-        display->y_pos = BE_16(buf) & 0xfff;
+        display->y_pos = AV_RB16(buf) & 0xfff;
         buf += 2;
 
         if ((object->type == 1 || object->type == 2) && buf+1 < buf_end) {
@@ -1171,9 +1171,9 @@
 
         display->region_id = region_id;
 
-        display->x_pos = BE_16(buf);
+        display->x_pos = AV_RB16(buf);
         buf += 2;
-        display->y_pos = BE_16(buf);
+        display->y_pos = AV_RB16(buf);
         buf += 2;
 
         *tmp_ptr = display->next;
@@ -1405,9 +1405,9 @@
     {
         p += 1;
         segment_type = *p++;
-        page_id = BE_16(p);
+        page_id = AV_RB16(p);
         p += 2;
-        segment_length = BE_16(p);
+        segment_length = AV_RB16(p);
         p += 2;
 
         if (page_id == ctx->composition_id || page_id == ctx->ancillary_id) {
@@ -1576,7 +1576,7 @@
         {
             if (p + 6 <= p_end)
             {
-                len = BE_16(p + 4);
+                len = AV_RB16(p + 4);
 
                 if (p + len + 6 <= p_end)
                 {

Modified: trunk/libavcodec/flicvideo.c
==============================================================================
--- trunk/libavcodec/flicvideo.c	(original)
+++ trunk/libavcodec/flicvideo.c	Fri Jan 19 23:12:59 2007
@@ -87,8 +87,8 @@
     s->avctx = avctx;
     avctx->has_b_frames = 0;
 
-    s->fli_type = LE_16(&fli_header[4]); /* Might be overridden if a Magic Carpet FLC */
-    depth       = LE_16(&fli_header[12]);
+    s->fli_type = AV_RL16(&fli_header[4]); /* Might be overridden if a Magic Carpet FLC */
+    depth       = AV_RL16(&fli_header[12]);
 
     if (depth == 0) {
       depth = 8; /* Some FLC generators set depth to zero, when they mean 8Bpp. Fix up here */
@@ -172,18 +172,18 @@
     pixels = s->frame.data[0];
     pixel_limit = s->avctx->height * s->frame.linesize[0];
 
-    frame_size = LE_32(&buf[stream_ptr]);
+    frame_size = AV_RL32(&buf[stream_ptr]);
     stream_ptr += 6;  /* skip the magic number */
-    num_chunks = LE_16(&buf[stream_ptr]);
+    num_chunks = AV_RL16(&buf[stream_ptr]);
     stream_ptr += 10;  /* skip padding */
 
     frame_size -= 16;
 
     /* iterate through the chunks */
     while ((frame_size > 0) && (num_chunks > 0)) {
-        chunk_size = LE_32(&buf[stream_ptr]);
+        chunk_size = AV_RL32(&buf[stream_ptr]);
         stream_ptr += 4;
-        chunk_type = LE_16(&buf[stream_ptr]);
+        chunk_type = AV_RL16(&buf[stream_ptr]);
         stream_ptr += 2;
 
         switch (chunk_type) {
@@ -200,7 +200,7 @@
             else
                 color_shift = 2;
             /* set up the palette */
-            color_packets = LE_16(&buf[stream_ptr]);
+            color_packets = AV_RL16(&buf[stream_ptr]);
             stream_ptr += 2;
             palette_ptr = 0;
             for (i = 0; i < color_packets; i++) {
@@ -241,10 +241,10 @@
 
         case FLI_DELTA:
             y_ptr = 0;
-            compressed_lines = LE_16(&buf[stream_ptr]);
+            compressed_lines = AV_RL16(&buf[stream_ptr]);
             stream_ptr += 2;
             while (compressed_lines > 0) {
-                line_packets = LE_16(&buf[stream_ptr]);
+                line_packets = AV_RL16(&buf[stream_ptr]);
                 stream_ptr += 2;
                 if ((line_packets & 0xC000) == 0xC000) {
                     // line skip opcode
@@ -290,12 +290,12 @@
 
         case FLI_LC:
             /* line compressed */
-            starting_line = LE_16(&buf[stream_ptr]);
+            starting_line = AV_RL16(&buf[stream_ptr]);
             stream_ptr += 2;
             y_ptr = 0;
             y_ptr += starting_line * s->frame.linesize[0];
 
-            compressed_lines = LE_16(&buf[stream_ptr]);
+            compressed_lines = AV_RL16(&buf[stream_ptr]);
             stream_ptr += 2;
             while (compressed_lines > 0) {
                 pixel_ptr = y_ptr;
@@ -466,18 +466,18 @@
     pixels = s->frame.data[0];
     pixel_limit = s->avctx->height * s->frame.linesize[0];
 
-    frame_size = LE_32(&buf[stream_ptr]);
+    frame_size = AV_RL32(&buf[stream_ptr]);
     stream_ptr += 6;  /* skip the magic number */
-    num_chunks = LE_16(&buf[stream_ptr]);
+    num_chunks = AV_RL16(&buf[stream_ptr]);
     stream_ptr += 10;  /* skip padding */
 
     frame_size -= 16;
 
     /* iterate through the chunks */
     while ((frame_size > 0) && (num_chunks > 0)) {
-        chunk_size = LE_32(&buf[stream_ptr]);
+        chunk_size = AV_RL32(&buf[stream_ptr]);
         stream_ptr += 4;
-        chunk_type = LE_16(&buf[stream_ptr]);
+        chunk_type = AV_RL16(&buf[stream_ptr]);
         stream_ptr += 2;
 
         switch (chunk_type) {
@@ -492,10 +492,10 @@
         case FLI_DELTA:
         case FLI_DTA_LC:
             y_ptr = 0;
-            compressed_lines = LE_16(&buf[stream_ptr]);
+            compressed_lines = AV_RL16(&buf[stream_ptr]);
             stream_ptr += 2;
             while (compressed_lines > 0) {
-                line_packets = LE_16(&buf[stream_ptr]);
+                line_packets = AV_RL16(&buf[stream_ptr]);
                 stream_ptr += 2;
                 if (line_packets < 0) {
                     line_packets = -line_packets;
@@ -512,7 +512,7 @@
                         byte_run = (signed char)(buf[stream_ptr++]);
                         if (byte_run < 0) {
                             byte_run = -byte_run;
-                            pixel    = LE_16(&buf[stream_ptr]);
+                            pixel    = AV_RL16(&buf[stream_ptr]);
                             stream_ptr += 2;
                             CHECK_PIXEL_PTR(byte_run);
                             for (j = 0; j < byte_run; j++, pixel_countdown -= 2) {
@@ -522,7 +522,7 @@
                         } else {
                             CHECK_PIXEL_PTR(byte_run);
                             for (j = 0; j < byte_run; j++, pixel_countdown--) {
-                                *((signed short*)(&pixels[pixel_ptr])) = LE_16(&buf[stream_ptr]);
+                                *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]);
                                 stream_ptr += 2;
                                 pixel_ptr += 2;
                             }
@@ -586,12 +586,12 @@
                  * a second pass over the line here, swapping the bytes.
                  */
                 pixel = 0xFF00;
-                if (0xFF00 != LE_16(&pixel)) /* Check if its not an LE Target */
+                if (0xFF00 != AV_RL16(&pixel)) /* Check if its not an LE Target */
                 {
                   pixel_ptr = y_ptr;
                   pixel_countdown = s->avctx->width;
                   while (pixel_countdown > 0) {
-                    *((signed short*)(&pixels[pixel_ptr])) = LE_16(&buf[pixel_ptr]);
+                    *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[pixel_ptr]);
                     pixel_ptr += 2;
                   }
                 }
@@ -611,7 +611,7 @@
                 while (pixel_countdown > 0) {
                     byte_run = (signed char)(buf[stream_ptr++]);
                     if (byte_run > 0) {
-                        pixel    = LE_16(&buf[stream_ptr]);
+                        pixel    = AV_RL16(&buf[stream_ptr]);
                         stream_ptr += 2;
                         CHECK_PIXEL_PTR(byte_run);
                         for (j = 0; j < byte_run; j++) {
@@ -626,7 +626,7 @@
                         byte_run = -byte_run;
                         CHECK_PIXEL_PTR(byte_run);
                         for (j = 0; j < byte_run; j++) {
-                            *((signed short*)(&pixels[pixel_ptr])) = LE_16(&buf[stream_ptr]);
+                            *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[stream_ptr]);
                             stream_ptr += 2;
                             pixel_ptr  += 2;
                             pixel_countdown--;
@@ -656,7 +656,7 @@
                     pixel_countdown = s->avctx->width;
                     pixel_ptr = 0;
                     while (pixel_countdown > 0) {
-                      *((signed short*)(&pixels[y_ptr + pixel_ptr])) = LE_16(&buf[stream_ptr+pixel_ptr]);
+                      *((signed short*)(&pixels[y_ptr + pixel_ptr])) = AV_RL16(&buf[stream_ptr+pixel_ptr]);
                       pixel_ptr += 2;
                       pixel_countdown--;
                     }

Modified: trunk/libavcodec/fraps.c
==============================================================================
--- trunk/libavcodec/fraps.c	(original)
+++ trunk/libavcodec/fraps.c	Fri Jan 19 23:12:59 2007
@@ -138,7 +138,7 @@
 
     for(i = 0; i < 256; i++){
         s->nodes[i].sym = i;
-        s->nodes[i].count = LE_32(src);
+        s->nodes[i].count = AV_RL32(src);
         s->nodes[i].n0 = -2;
         if(s->nodes[i].count < 0) {
             av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n");
@@ -215,7 +215,7 @@
     int i, is_chroma, planes;
 
 
-    header = LE_32(buf);
+    header = AV_RL32(buf);
     version = header & 0xff;
     header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */
 
@@ -337,12 +337,12 @@
         }
         f->pict_type = FF_I_TYPE;
         f->key_frame = 1;
-        if ((LE_32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
+        if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
             av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
             return -1;
         }
         for(i = 0; i < planes; i++) {
-            offs[i] = LE_32(buf + 4 + i * 4);
+            offs[i] = AV_RL32(buf + 4 + i * 4);
             if(offs[i] >= buf_size || (i && offs[i] <= offs[i - 1] + 1024)) {
                 av_log(avctx, AV_LOG_ERROR, "Fraps: plane %i offset is out of bounds\n", i);
                 return -1;

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Fri Jan 19 23:12:59 2007
@@ -8215,7 +8215,7 @@
         cnt = *(p+5) & 0x1f; // Number of sps
         p += 6;
         for (i = 0; i < cnt; i++) {
-            nalsize = BE_16(p) + 2;
+            nalsize = AV_RB16(p) + 2;
             if(decode_nal_units(h, p, nalsize) < 0) {
                 av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i);
                 return -1;
@@ -8225,7 +8225,7 @@
         // Decode pps from avcC
         cnt = *(p++); // Number of pps
         for (i = 0; i < cnt; i++) {
-            nalsize = BE_16(p) + 2;
+            nalsize = AV_RB16(p) + 2;
             if(decode_nal_units(h, p, nalsize)  != nalsize) {
                 av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i);
                 return -1;

Modified: trunk/libavcodec/kmvc.c
==============================================================================
--- trunk/libavcodec/kmvc.c	(original)
+++ trunk/libavcodec/kmvc.c	Fri Jan 19 23:12:59 2007
@@ -368,13 +368,13 @@
         av_log(NULL, 0, "Extradata missing, decoding may not work properly...\n");
         c->palsize = 127;
     } else {
-        c->palsize = LE_16(avctx->extradata + 10);
+        c->palsize = AV_RL16(avctx->extradata + 10);
     }
 
     if (avctx->extradata_size == 1036) {        // palette in extradata
         uint8_t *src = avctx->extradata + 12;
         for (i = 0; i < 256; i++) {
-            c->pal[i] = LE_32(src);
+            c->pal[i] = AV_RL32(src);
             src += 4;
         }
         c->setpal = 1;

Modified: trunk/libavcodec/loco.c
==============================================================================
--- trunk/libavcodec/loco.c	(original)
+++ trunk/libavcodec/loco.c	Fri Jan 19 23:12:59 2007
@@ -237,20 +237,20 @@
                avctx->extradata_size);
         return -1;
     }
-    version = LE_32(avctx->extradata);
+    version = AV_RL32(avctx->extradata);
     switch(version) {
     case 1:
         l->lossy = 0;
         break;
     case 2:
-        l->lossy = LE_32(avctx->extradata + 8);
+        l->lossy = AV_RL32(avctx->extradata + 8);
         break;
     default:
-        l->lossy = LE_32(avctx->extradata + 8);
+        l->lossy = AV_RL32(avctx->extradata + 8);
         av_log(avctx, AV_LOG_INFO, "This is LOCO codec version %i, please upload file for study\n", version);
     }
 
-    l->mode = LE_32(avctx->extradata + 4);
+    l->mode = AV_RL32(avctx->extradata + 4);
     switch(l->mode) {
     case LOCO_CYUY2: case LOCO_YUY2: case LOCO_UYVY:
         avctx->pix_fmt = PIX_FMT_YUV422P;

Modified: trunk/libavcodec/mjpeg.c
==============================================================================
--- trunk/libavcodec/mjpeg.c	(original)
+++ trunk/libavcodec/mjpeg.c	Fri Jan 19 23:12:59 2007
@@ -2540,12 +2540,12 @@
                 break;
             case SOS:
                 bytestream_put_be32(&poutbufp, i + 46); /* scan off */
-                bytestream_put_be32(&poutbufp, i + 46 + BE_16(buf + i + 2)); /* data off */
+                bytestream_put_be32(&poutbufp, i + 46 + AV_RB16(buf + i + 2)); /* data off */
                 bytestream_put_buffer(&poutbufp, buf + 2, buf_size - 2); /* skip already written SOI */
                 *poutbuf_size = poutbufp - *poutbuf;
                 return 1;
             case APP1:
-                if (i + 8 < buf_size && LE_32(buf + i + 8) == ff_get_fourcc("mjpg")) {
+                if (i + 8 < buf_size && AV_RL32(buf + i + 8) == ff_get_fourcc("mjpg")) {
                     av_log(avctx, AV_LOG_ERROR, "bitstream already formatted\n");
                     memcpy(*poutbuf, buf, buf_size);
                     *poutbuf_size = buf_size;

Modified: trunk/libavcodec/mmvideo.c
==============================================================================
--- trunk/libavcodec/mmvideo.c	(original)
+++ trunk/libavcodec/mmvideo.c	Fri Jan 19 23:12:59 2007
@@ -110,7 +110,7 @@
 
 static void mm_decode_inter(MmContext * s, int half_horiz, int half_vert, const uint8_t *buf, int buf_size)
 {
-    const int data_ptr = 2 + LE_16(&buf[0]);
+    const int data_ptr = 2 + AV_RL16(&buf[0]);
     int d, r, y;
     d = data_ptr; r = 2; y = 0;
 
@@ -162,7 +162,7 @@
         palette_control->palette_changed = 0;
     }
 
-    type = LE_16(&buf[0]);
+    type = AV_RL16(&buf[0]);
     buf += MM_PREAMBLE_SIZE;
     buf_size -= MM_PREAMBLE_SIZE;
 

Modified: trunk/libavcodec/msvideo1.c
==============================================================================
--- trunk/libavcodec/msvideo1.c	(original)
+++ trunk/libavcodec/msvideo1.c	Fri Jan 19 23:12:59 2007
@@ -245,25 +245,25 @@
                 flags = (byte_b << 8) | byte_a;
 
                 CHECK_STREAM_PTR(4);
-                colors[0] = LE_16(&s->buf[stream_ptr]);
+                colors[0] = AV_RL16(&s->buf[stream_ptr]);
                 stream_ptr += 2;
-                colors[1] = LE_16(&s->buf[stream_ptr]);
+                colors[1] = AV_RL16(&s->buf[stream_ptr]);
                 stream_ptr += 2;
 
                 if (colors[0] & 0x8000) {
                     /* 8-color encoding */
                     CHECK_STREAM_PTR(12);
-                    colors[2] = LE_16(&s->buf[stream_ptr]);
+                    colors[2] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
-                    colors[3] = LE_16(&s->buf[stream_ptr]);
+                    colors[3] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
-                    colors[4] = LE_16(&s->buf[stream_ptr]);
+                    colors[4] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
-                    colors[5] = LE_16(&s->buf[stream_ptr]);
+                    colors[5] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
-                    colors[6] = LE_16(&s->buf[stream_ptr]);
+                    colors[6] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
-                    colors[7] = LE_16(&s->buf[stream_ptr]);
+                    colors[7] = AV_RL16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
 
                     for (pixel_y = 0; pixel_y < 4; pixel_y++) {

Modified: trunk/libavcodec/nuv.c
==============================================================================
--- trunk/libavcodec/nuv.c	(original)
+++ trunk/libavcodec/nuv.c	Fri Jan 19 23:12:59 2007
@@ -64,9 +64,9 @@
         return -1;
     }
     for (i = 0; i < 64; i++, buf += 4)
-        c->lq[i] = LE_32(buf);
+        c->lq[i] = AV_RL32(buf);
     for (i = 0; i < 64; i++, buf += 4)
-        c->cq[i] = LE_32(buf);
+        c->cq[i] = AV_RL32(buf);
     return 0;
 }
 

Modified: trunk/libavcodec/qdm2.c
==============================================================================
--- trunk/libavcodec/qdm2.c	(original)
+++ trunk/libavcodec/qdm2.c	Fri Jan 19 23:12:59 2007
@@ -1836,7 +1836,7 @@
     extradata += 8;
     extradata_size -= 8;
 
-    size = BE_32(extradata);
+    size = AV_RB32(extradata);
 
     if(size > extradata_size){
         av_log(avctx, AV_LOG_ERROR, "extradata size too small, %i < %i\n",
@@ -1846,29 +1846,29 @@
 
     extradata += 4;
     av_log(avctx, AV_LOG_DEBUG, "size: %d\n", size);
-    if (BE_32(extradata) != MKBETAG('Q','D','C','A')) {
+    if (AV_RB32(extradata) != MKBETAG('Q','D','C','A')) {
         av_log(avctx, AV_LOG_ERROR, "invalid extradata, expecting QDCA\n");
         return -1;
     }
 
     extradata += 8;
 
-    avctx->channels = s->nb_channels = s->channels = BE_32(extradata);
+    avctx->channels = s->nb_channels = s->channels = AV_RB32(extradata);
     extradata += 4;
 
-    avctx->sample_rate = BE_32(extradata);
+    avctx->sample_rate = AV_RB32(extradata);
     extradata += 4;
 
-    avctx->bit_rate = BE_32(extradata);
+    avctx->bit_rate = AV_RB32(extradata);
     extradata += 4;
 
-    s->group_size = BE_32(extradata);
+    s->group_size = AV_RB32(extradata);
     extradata += 4;
 
-    s->fft_size = BE_32(extradata);
+    s->fft_size = AV_RB32(extradata);
     extradata += 4;
 
-    s->checksum_size = BE_32(extradata);
+    s->checksum_size = AV_RB32(extradata);
     extradata += 4;
 
     s->fft_order = av_log2(s->fft_size) + 1;

Modified: trunk/libavcodec/qdrw.c
==============================================================================
--- trunk/libavcodec/qdrw.c	(original)
+++ trunk/libavcodec/qdrw.c	Fri Jan 19 23:12:59 2007
@@ -58,7 +58,7 @@
     outdata = a->pic.data[0];
 
     buf += 0x68; /* jump to palette */
-    colors = BE_32(buf);
+    colors = AV_RB32(buf);
     buf += 4;
 
     if(colors < 0 || colors > 256) {
@@ -68,7 +68,7 @@
 
     for (i = 0; i <= colors; i++) {
         unsigned int idx;
-        idx = BE_16(buf); /* color index */
+        idx = AV_RB16(buf); /* color index */
         buf += 2;
 
         if (idx > 255) {
@@ -93,7 +93,7 @@
 
         /* decode line */
         out = outdata;
-        size = BE_16(buf); /* size of packed line */
+        size = AV_RB16(buf); /* size of packed line */
         buf += 2;
         left = size;
         next = buf + size;

Modified: trunk/libavcodec/qtrle.c
==============================================================================
--- trunk/libavcodec/qtrle.c	(original)
+++ trunk/libavcodec/qtrle.c	Fri Jan 19 23:12:59 2007
@@ -96,15 +96,15 @@
 
     /* fetch the header */
     CHECK_STREAM_PTR(2);
-    header = BE_16(&s->buf[stream_ptr]);
+    header = AV_RB16(&s->buf[stream_ptr]);
     stream_ptr += 2;
 
     /* if a header is present, fetch additional decoding parameters */
     if (header & 0x0008) {
         CHECK_STREAM_PTR(8);
-        start_line = BE_16(&s->buf[stream_ptr]);
+        start_line = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
-        lines_to_change = BE_16(&s->buf[stream_ptr]);
+        lines_to_change = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
     } else {
         start_line = 0;
@@ -187,15 +187,15 @@
 
     /* fetch the header */
     CHECK_STREAM_PTR(2);
-    header = BE_16(&s->buf[stream_ptr]);
+    header = AV_RB16(&s->buf[stream_ptr]);
     stream_ptr += 2;
 
     /* if a header is present, fetch additional decoding parameters */
     if (header & 0x0008) {
         CHECK_STREAM_PTR(8);
-        start_line = BE_16(&s->buf[stream_ptr]);
+        start_line = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
-        lines_to_change = BE_16(&s->buf[stream_ptr]);
+        lines_to_change = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
     } else {
         start_line = 0;
@@ -269,15 +269,15 @@
 
     /* fetch the header */
     CHECK_STREAM_PTR(2);
-    header = BE_16(&s->buf[stream_ptr]);
+    header = AV_RB16(&s->buf[stream_ptr]);
     stream_ptr += 2;
 
     /* if a header is present, fetch additional decoding parameters */
     if (header & 0x0008) {
         CHECK_STREAM_PTR(8);
-        start_line = BE_16(&s->buf[stream_ptr]);
+        start_line = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
-        lines_to_change = BE_16(&s->buf[stream_ptr]);
+        lines_to_change = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
     } else {
         start_line = 0;
@@ -299,7 +299,7 @@
                 /* decode the run length code */
                 rle_code = -rle_code;
                 CHECK_STREAM_PTR(2);
-                rgb16 = BE_16(&s->buf[stream_ptr]);
+                rgb16 = AV_RB16(&s->buf[stream_ptr]);
                 stream_ptr += 2;
 
                 CHECK_PIXEL_PTR(rle_code * 2);
@@ -314,7 +314,7 @@
 
                 /* copy pixels directly to output */
                 while (rle_code--) {
-                    rgb16 = BE_16(&s->buf[stream_ptr]);
+                    rgb16 = AV_RB16(&s->buf[stream_ptr]);
                     stream_ptr += 2;
                     *(unsigned short *)(&rgb[pixel_ptr]) = rgb16;
                     pixel_ptr += 2;
@@ -347,15 +347,15 @@
 
     /* fetch the header */
     CHECK_STREAM_PTR(2);
-    header = BE_16(&s->buf[stream_ptr]);
+    header = AV_RB16(&s->buf[stream_ptr]);
     stream_ptr += 2;
 
     /* if a header is present, fetch additional decoding parameters */
     if (header & 0x0008) {
         CHECK_STREAM_PTR(8);
-        start_line = BE_16(&s->buf[stream_ptr]);
+        start_line = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
-        lines_to_change = BE_16(&s->buf[stream_ptr]);
+        lines_to_change = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
     } else {
         start_line = 0;
@@ -427,15 +427,15 @@
 
     /* fetch the header */
     CHECK_STREAM_PTR(2);
-    header = BE_16(&s->buf[stream_ptr]);
+    header = AV_RB16(&s->buf[stream_ptr]);
     stream_ptr += 2;
 
     /* if a header is present, fetch additional decoding parameters */
     if (header & 0x0008) {
         CHECK_STREAM_PTR(8);
-        start_line = BE_16(&s->buf[stream_ptr]);
+        start_line = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
-        lines_to_change = BE_16(&s->buf[stream_ptr]);
+        lines_to_change = AV_RB16(&s->buf[stream_ptr]);
         stream_ptr += 4;
     } else {
         start_line = 0;

Modified: trunk/libavcodec/rpza.c
==============================================================================
--- trunk/libavcodec/rpza.c	(original)
+++ trunk/libavcodec/rpza.c	Fri Jan 19 23:12:59 2007
@@ -98,7 +98,7 @@
             s->buf[stream_ptr]);
 
     /* Get chunk size, ingnoring first byte */
-    chunk_size = BE_32(&s->buf[stream_ptr]) & 0x00FFFFFF;
+    chunk_size = AV_RB32(&s->buf[stream_ptr]) & 0x00FFFFFF;
     stream_ptr += 4;
 
     /* If length mismatch use size from MOV file and try to decode anyway */
@@ -140,7 +140,7 @@
 
         /* Fill blocks with one color */
         case 0xa0:
-            colorA = BE_16 (&s->buf[stream_ptr]);
+            colorA = AV_RB16 (&s->buf[stream_ptr]);
             stream_ptr += 2;
             while (n_blocks--) {
                 block_ptr = row_ptr + pixel_ptr;
@@ -157,10 +157,10 @@
 
         /* Fill blocks with 4 colors */
         case 0xc0:
-            colorA = BE_16 (&s->buf[stream_ptr]);
+            colorA = AV_RB16 (&s->buf[stream_ptr]);
             stream_ptr += 2;
         case 0x20:
-            colorB = BE_16 (&s->buf[stream_ptr]);
+            colorB = AV_RB16 (&s->buf[stream_ptr]);
             stream_ptr += 2;
 
             /* sort out the colors */
@@ -209,7 +209,7 @@
                 for (pixel_x = 0; pixel_x < 4; pixel_x++){
                     /* We already have color of upper left pixel */
                     if ((pixel_y != 0) || (pixel_x !=0)) {
-                        colorA = BE_16 (&s->buf[stream_ptr]);
+                        colorA = AV_RB16 (&s->buf[stream_ptr]);
                         stream_ptr += 2;
                     }
                     pixels[block_ptr] = colorA;

Modified: trunk/libavcodec/rv10.c
==============================================================================
--- trunk/libavcodec/rv10.c	(original)
+++ trunk/libavcodec/rv10.c	Fri Jan 19 23:12:59 2007
@@ -535,7 +535,7 @@
     s->height = avctx->height;
 
     s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1;
-    avctx->sub_id= BE_32((uint8_t*)avctx->extradata + 4);
+    avctx->sub_id= AV_RB32((uint8_t*)avctx->extradata + 4);
 
     switch(avctx->sub_id){
     case 0x10000000:

Modified: trunk/libavcodec/smacker.c
==============================================================================
--- trunk/libavcodec/smacker.c	(original)
+++ trunk/libavcodec/smacker.c	Fri Jan 19 23:12:59 2007
@@ -277,10 +277,10 @@
     GetBitContext gb;
     int mmap_size, mclr_size, full_size, type_size;
 
-    mmap_size = LE_32(smk->avctx->extradata);
-    mclr_size = LE_32(smk->avctx->extradata + 4);
-    full_size = LE_32(smk->avctx->extradata + 8);
-    type_size = LE_32(smk->avctx->extradata + 12);
+    mmap_size = AV_RL32(smk->avctx->extradata);
+    mclr_size = AV_RL32(smk->avctx->extradata + 4);
+    full_size = AV_RL32(smk->avctx->extradata + 8);
+    type_size = AV_RL32(smk->avctx->extradata + 12);
 
     init_get_bits(&gb, smk->avctx->extradata + 16, (smk->avctx->extradata_size - 16) * 8);
 
@@ -584,7 +584,7 @@
     int bits, stereo;
     int pred[2] = {0, 0};
 
-    unp_size = LE_32(buf);
+    unp_size = AV_RL32(buf);
 
     init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);
 

Modified: trunk/libavcodec/smc.c
==============================================================================
--- trunk/libavcodec/smc.c	(original)
+++ trunk/libavcodec/smc.c	Fri Jan 19 23:12:59 2007
@@ -120,7 +120,7 @@
         s->avctx->palctrl->palette_changed = 0;
     }
 
-    chunk_size = BE_32(&s->buf[stream_ptr]) & 0x00FFFFFF;
+    chunk_size = AV_RB32(&s->buf[stream_ptr]) & 0x00FFFFFF;
     stream_ptr += 4;
     if (chunk_size != s->size)
         av_log(s->avctx, AV_LOG_INFO, "warning: MOV chunk size != encoded chunk size (%d != %d); using MOV chunk size\n",
@@ -278,7 +278,7 @@
                 color_table_index = CPAIR * s->buf[stream_ptr++];
 
             while (n_blocks--) {
-                color_flags = BE_16(&s->buf[stream_ptr]);
+                color_flags = AV_RB16(&s->buf[stream_ptr]);
                 stream_ptr += 2;
                 flag_mask = 0x8000;
                 block_ptr = row_ptr + pixel_ptr;
@@ -321,7 +321,7 @@
                 color_table_index = CQUAD * s->buf[stream_ptr++];
 
             while (n_blocks--) {
-                color_flags = BE_32(&s->buf[stream_ptr]);
+                color_flags = AV_RB32(&s->buf[stream_ptr]);
                 stream_ptr += 4;
                 /* flag mask actually acts as a bit shift count here */
                 flag_mask = 30;

Modified: trunk/libavcodec/svq3.c
==============================================================================
--- trunk/libavcodec/svq3.c	(original)
+++ trunk/libavcodec/svq3.c	Fri Jan 19 23:12:59 2007
@@ -830,7 +830,7 @@
 
       GetBitContext gb;
 
-      size = BE_32(&extradata[4]);
+      size = AV_RB32(&extradata[4]);
       init_get_bits (&gb, extradata + 8, size*8);
 
       /* 'frame size code' and optional 'width, height' */

Modified: trunk/libavcodec/targa.c
==============================================================================
--- trunk/libavcodec/targa.c	(original)
+++ trunk/libavcodec/targa.c	Fri Jan 19 23:12:59 2007
@@ -61,7 +61,7 @@
                 *dst = *src;
                 break;
             case 2:
-                *((uint16_t*)dst) = LE_16(src);
+                *((uint16_t*)dst) = AV_RL16(src);
                 break;
             case 3:
                 dst[0] = src[0];
@@ -69,7 +69,7 @@
                 dst[2] = src[2];
                 break;
             case 4:
-                *((uint32_t*)dst) = LE_32(src);
+                *((uint32_t*)dst) = AV_RL32(src);
                 break;
             }
             dst += depth;
@@ -104,13 +104,13 @@
     idlen = *buf++;
     pal = *buf++;
     compr = *buf++;
-    first_clr = LE_16(buf); buf += 2;
-    colors = LE_16(buf); buf += 2;
+    first_clr = AV_RL16(buf); buf += 2;
+    colors = AV_RL16(buf); buf += 2;
     csize = *buf++;
-    x = LE_16(buf); buf += 2;
-    y = LE_16(buf); buf += 2;
-    w = LE_16(buf); buf += 2;
-    h = LE_16(buf); buf += 2;
+    x = AV_RL16(buf); buf += 2;
+    y = AV_RL16(buf); buf += 2;
+    w = AV_RL16(buf); buf += 2;
+    h = AV_RL16(buf); buf += 2;
     bpp = *buf++;
     flags = *buf++;
     //skip identifier if any
@@ -200,11 +200,11 @@
                 if((s->bpp + 1) >> 3 == 2){
                     uint16_t *dst16 = (uint16_t*)dst;
                     for(x = 0; x < s->width; x++)
-                        dst16[x] = LE_16(buf + x * 2);
+                        dst16[x] = AV_RL16(buf + x * 2);
                 }else if((s->bpp + 1) >> 3 == 4){
                     uint32_t *dst32 = (uint32_t*)dst;
                     for(x = 0; x < s->width; x++)
-                        dst32[x] = LE_32(buf + x * 4);
+                        dst32[x] = AV_RL32(buf + x * 4);
                 }else
 #endif
                     memcpy(dst, buf, s->width * ((s->bpp + 1) >> 3));

Modified: trunk/libavcodec/tiff.c
==============================================================================
--- trunk/libavcodec/tiff.c	(original)
+++ trunk/libavcodec/tiff.c	Fri Jan 19 23:12:59 2007
@@ -87,13 +87,13 @@
 } TiffContext;
 
 static int tget_short(uint8_t **p, int le){
-    int v = le ? LE_16(*p) : BE_16(*p);
+    int v = le ? AV_RL16(*p) : AV_RB16(*p);
     *p += 2;
     return v;
 }
 
 static int tget_long(uint8_t **p, int le){
-    int v = le ? LE_32(*p) : BE_32(*p);
+    int v = le ? AV_RL32(*p) : AV_RB32(*p);
     *p += 4;
     return v;
 }
@@ -447,7 +447,7 @@
     int i, entries;
 
     //parse image header
-    id = LE_16(buf); buf += 2;
+    id = AV_RL16(buf); buf += 2;
     if(id == 0x4949) le = 1;
     else if(id == 0x4D4D) le = 0;
     else{

Modified: trunk/libavcodec/truemotion1.c
==============================================================================
--- trunk/libavcodec/truemotion1.c	(original)
+++ trunk/libavcodec/truemotion1.c	Fri Jan 19 23:12:59 2007
@@ -348,9 +348,9 @@
     header.compression = header_buffer[0];
     header.deltaset = header_buffer[1];
     header.vectable = header_buffer[2];
-    header.ysize = LE_16(&header_buffer[3]);
-    header.xsize = LE_16(&header_buffer[5]);
-    header.checksum = LE_16(&header_buffer[7]);
+    header.ysize = AV_RL16(&header_buffer[3]);
+    header.xsize = AV_RL16(&header_buffer[5]);
+    header.checksum = AV_RL16(&header_buffer[7]);
     header.version = header_buffer[9];
     header.header_type = header_buffer[10];
     header.flags = header_buffer[11];

Modified: trunk/libavcodec/truemotion2.c
==============================================================================
--- trunk/libavcodec/truemotion2.c	(original)
+++ trunk/libavcodec/truemotion2.c	Fri Jan 19 23:12:59 2007
@@ -208,7 +208,7 @@
 
     obuf = buf;
 
-    magic = LE_32(buf);
+    magic = AV_RL32(buf);
     buf += 4;
 
     if(magic == 0x00000100) { /* old header */
@@ -217,7 +217,7 @@
     } else if(magic == 0x00000101) { /* new header */
         int w, h, size, flags, xr, yr;
 
-        length = LE_32(buf);
+        length = AV_RL32(buf);
         buf += 4;
 
         init_get_bits(&ctx->gb, buf, 32 * 8);
@@ -270,17 +270,17 @@
     TM2Codes codes;
 
     /* get stream length in dwords */
-    len = BE_32(buf); buf += 4; cur += 4;
+    len = AV_RB32(buf); buf += 4; cur += 4;
     skip = len * 4 + 4;
 
     if(len == 0)
         return 4;
 
-    toks = BE_32(buf); buf += 4; cur += 4;
+    toks = AV_RB32(buf); buf += 4; cur += 4;
     if(toks & 1) {
-        len = BE_32(buf); buf += 4; cur += 4;
+        len = AV_RB32(buf); buf += 4; cur += 4;
         if(len == TM2_ESCAPE) {
-            len = BE_32(buf); buf += 4; cur += 4;
+            len = AV_RB32(buf); buf += 4; cur += 4;
         }
         if(len > 0) {
             init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
@@ -291,7 +291,7 @@
         }
     }
     /* skip unused fields */
-    if(BE_32(buf) == TM2_ESCAPE) {
+    if(AV_RB32(buf) == TM2_ESCAPE) {
         buf += 4; cur += 4; /* some unknown length - could be escaped too */
     }
     buf += 4; cur += 4;
@@ -312,7 +312,7 @@
     }
     ctx->tokens[stream_id] = av_realloc(ctx->tokens[stream_id], toks * sizeof(int));
     ctx->tok_lens[stream_id] = toks;
-    len = BE_32(buf); buf += 4; cur += 4;
+    len = AV_RB32(buf); buf += 4; cur += 4;
     if(len > 0) {
         init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
         for(i = 0; i < toks; i++)

Modified: trunk/libavcodec/truespeech.c
==============================================================================
--- trunk/libavcodec/truespeech.c	(original)
+++ trunk/libavcodec/truespeech.c	Fri Jan 19 23:12:59 2007
@@ -62,7 +62,7 @@
     uint32_t t;
 
     /* first dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->flag = t & 1;
@@ -77,7 +77,7 @@
     dec->vector[7] = ts_codebook[7][(t >> 29) &  0x7];
 
     /* second dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->offset2[0] = (t >>  0) & 0x7F;
@@ -88,7 +88,7 @@
     dec->offset1[0] = ((t >> 28) & 0xF) << 4;
 
     /* third dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulseval[0] = (t >>  0) & 0x3FFF;
@@ -97,7 +97,7 @@
     dec->offset1[1] = (t >> 28) & 0x0F;
 
     /* fourth dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulseval[2] = (t >>  0) & 0x3FFF;
@@ -106,7 +106,7 @@
     dec->offset1[1] |= ((t >> 28) & 0x0F) << 4;
 
     /* fifth dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulsepos[0] = (t >> 4) & 0x7FFFFFF;
@@ -116,7 +116,7 @@
     dec->offset1[0] |= (t >> 31) & 1;
 
     /* sixth dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulsepos[1] = (t >> 4) & 0x7FFFFFF;
@@ -126,7 +126,7 @@
     dec->offset1[0] |= ((t >> 31) & 1) << 1;
 
     /* seventh dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulsepos[2] = (t >> 4) & 0x7FFFFFF;
@@ -136,7 +136,7 @@
     dec->offset1[0] |= ((t >> 31) & 1) << 2;
 
     /* eighth dword */
-    t = LE_32(input);
+    t = AV_RL32(input);
     input += 4;
 
     dec->pulsepos[3] = (t >> 4) & 0x7FFFFFF;

Modified: trunk/libavcodec/tscc.c
==============================================================================
--- trunk/libavcodec/tscc.c	(original)
+++ trunk/libavcodec/tscc.c	Fri Jan 19 23:12:59 2007
@@ -121,14 +121,14 @@
                 }
             } else if (c->bpp == 16) {
                 for(i = 0; i < p2; i++) {
-                    pix16 = LE_16(src);
+                    pix16 = AV_RL16(src);
                     src += 2;
                     *(uint16_t*)output = pix16;
                     output += 2;
                 }
             } else if (c->bpp == 32) {
                 for(i = 0; i < p2; i++) {
-                    pix32 = LE_32(src);
+                    pix32 = AV_RL32(src);
                     src += 4;
                     *(uint32_t*)output = pix32;
                     output += 4;
@@ -140,7 +140,7 @@
             switch(c->bpp){
             case  8: pix[0] = *src++;
                      break;
-            case 16: pix16 = LE_16(src);
+            case 16: pix16 = AV_RL16(src);
                      src += 2;
                      *(uint16_t*)pix = pix16;
                      break;
@@ -148,7 +148,7 @@
                      pix[1] = *src++;
                      pix[2] = *src++;
                      break;
-            case 32: pix32 = LE_32(src);
+            case 32: pix32 = AV_RL32(src);
                      src += 4;
                      *(uint32_t*)pix = pix32;
                      break;

Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c	(original)
+++ trunk/libavcodec/vc1.c	Fri Jan 19 23:12:59 2007
@@ -4128,7 +4128,7 @@
         }
         while(edata_size > 8) {
             // test if we've found header
-            if(BE_32(edata) == 0x0000010F) {
+            if(AV_RB32(edata) == 0x0000010F) {
                 edata += 4;
                 edata_size -= 4;
                 break;
@@ -4144,7 +4144,7 @@
 
         while(edata_size > 8) {
             // test if we've found entry point
-            if(BE_32(edata) == 0x0000010E) {
+            if(AV_RB32(edata) == 0x0000010E) {
                 edata += 4;
                 edata_size -= 4;
                 break;

Modified: trunk/libavcodec/vmdav.c
==============================================================================
--- trunk/libavcodec/vmdav.c	(original)
+++ trunk/libavcodec/vmdav.c	Fri Jan 19 23:12:59 2007
@@ -92,10 +92,10 @@
     s = src;
     d = dest;
     d_end = d + dest_len;
-    dataleft = LE_32(s);
+    dataleft = AV_RL32(s);
     s += 4;
     memset(queue, 0x20, QUEUE_SIZE);
-    if (LE_32(s) == 0x56781234) {
+    if (AV_RL32(s) == 0x56781234) {
         s += 4;
         qpos = 0x111;
         speclen = 0xF + 3;
@@ -204,10 +204,10 @@
     int frame_width, frame_height;
     int dp_size;
 
-    frame_x = LE_16(&s->buf[6]);
-    frame_y = LE_16(&s->buf[8]);
-    frame_width = LE_16(&s->buf[10]) - frame_x + 1;
-    frame_height = LE_16(&s->buf[12]) - frame_y + 1;
+    frame_x = AV_RL16(&s->buf[6]);
+    frame_y = AV_RL16(&s->buf[8]);
+    frame_width = AV_RL16(&s->buf[10]) - frame_x + 1;
+    frame_height = AV_RL16(&s->buf[12]) - frame_y + 1;
 
     /* if only a certain region will be updated, copy the entire previous
      * frame before the decode */
@@ -339,7 +339,7 @@
     }
     vmd_header = (unsigned char *)avctx->extradata;
 
-    s->unpack_buffer_size = LE_32(&vmd_header[800]);
+    s->unpack_buffer_size = AV_RL32(&vmd_header[800]);
     s->unpack_buffer = av_malloc(s->unpack_buffer_size);
     if (!s->unpack_buffer)
         return -1;

Modified: trunk/libavcodec/vmnc.c
==============================================================================
--- trunk/libavcodec/vmnc.c	(original)
+++ trunk/libavcodec/vmnc.c	Fri Jan 19 23:12:59 2007
@@ -76,10 +76,10 @@
     switch(bpp * 2 + be) {
     case 2:
     case 3: return *buf;
-    case 4: return LE_16(buf);
-    case 5: return BE_16(buf);
-    case 8: return LE_32(buf);
-    case 9: return BE_32(buf);
+    case 4: return AV_RL16(buf);
+    case 5: return AV_RB16(buf);
+    case 8: return AV_RL32(buf);
+    case 9: return AV_RB32(buf);
     default: return 0;
     }
 }
@@ -328,13 +328,13 @@
         }
     }
     src += 2;
-    chunks = BE_16(src); src += 2;
+    chunks = AV_RB16(src); src += 2;
     while(chunks--) {
-        dx = BE_16(src); src += 2;
-        dy = BE_16(src); src += 2;
-        w  = BE_16(src); src += 2;
-        h  = BE_16(src); src += 2;
-        enc = BE_32(src); src += 4;
+        dx = AV_RB16(src); src += 2;
+        dy = AV_RB16(src); src += 2;
+        w  = AV_RB16(src); src += 2;
+        h  = AV_RB16(src); src += 2;
+        enc = AV_RB32(src); src += 4;
         outptr = c->pic.data[0] + dx * c->bpp2 + dy * c->pic.linesize[0];
         size_left = buf_size - (src - buf);
         switch(enc) {

Modified: trunk/libavcodec/vp6.c
==============================================================================
--- trunk/libavcodec/vp6.c	(original)
+++ trunk/libavcodec/vp6.c	Fri Jan 19 23:12:59 2007
@@ -63,7 +63,7 @@
             return 0;
         }
         if (separated_coeff || !s->filter_header) {
-            coeff_offset = BE_16(buf+2) - 2;
+            coeff_offset = AV_RB16(buf+2) - 2;
             buf += 2;
             buf_size -= 2;
         }
@@ -95,7 +95,7 @@
             return 0;
 
         if (separated_coeff || !s->filter_header) {
-            coeff_offset = BE_16(buf+1) - 2;
+            coeff_offset = AV_RB16(buf+1) - 2;
             buf += 2;
             buf_size -= 2;
         }

Modified: trunk/libavcodec/vqavideo.c
==============================================================================
--- trunk/libavcodec/vqavideo.c	(original)
+++ trunk/libavcodec/vqavideo.c	Fri Jan 19 23:12:59 2007
@@ -151,8 +151,8 @@
     /* load up the VQA parameters from the header */
     vqa_header = (unsigned char *)s->avctx->extradata;
     s->vqa_version = vqa_header[0];
-    s->width = LE_16(&vqa_header[6]);
-    s->height = LE_16(&vqa_header[8]);
+    s->width = AV_RL16(&vqa_header[6]);
+    s->height = AV_RL16(&vqa_header[8]);
     if(avcodec_check_dimensions(avctx, s->width, s->height)){
         s->width= s->height= 0;
         return -1;
@@ -232,9 +232,9 @@
         if (src[src_index] == 0xFF) {
 
             src_index++;
-            count = LE_16(&src[src_index]);
+            count = AV_RL16(&src[src_index]);
             src_index += 2;
-            src_pos = LE_16(&src[src_index]);
+            src_pos = AV_RL16(&src[src_index]);
             src_index += 2;
             vqa_debug("(1) copy %X bytes from absolute pos %X\n", count, src_pos);
             CHECK_COUNT();
@@ -245,7 +245,7 @@
         } else if (src[src_index] == 0xFE) {
 
             src_index++;
-            count = LE_16(&src[src_index]);
+            count = AV_RL16(&src[src_index]);
             src_index += 2;
             color = src[src_index++];
             vqa_debug("(2) set %X bytes to %02X\n", count, color);
@@ -256,7 +256,7 @@
         } else if ((src[src_index] & 0xC0) == 0xC0) {
 
             count = (src[src_index++] & 0x3F) + 3;
-            src_pos = LE_16(&src[src_index]);
+            src_pos = AV_RL16(&src[src_index]);
             src_index += 2;
             vqa_debug("(3) copy %X bytes from absolute pos %X\n", count, src_pos);
             CHECK_COUNT();
@@ -276,7 +276,7 @@
         } else {
 
             count = ((src[src_index] & 0x70) >> 4) + 3;
-            src_pos = BE_16(&src[src_index]) & 0x0FFF;
+            src_pos = AV_RB16(&src[src_index]) & 0x0FFF;
             src_index += 2;
             vqa_debug("(5) copy %X bytes from relpos %X\n", count, src_pos);
             CHECK_COUNT();
@@ -326,8 +326,8 @@
     /* first, traverse through the frame and find the subchunks */
     while (index < s->size) {
 
-        chunk_type = BE_32(&s->buf[index]);
-        chunk_size = BE_32(&s->buf[index + 4]);
+        chunk_type = AV_RB32(&s->buf[index]);
+        chunk_size = AV_RB32(&s->buf[index + 4]);
 
         switch (chunk_type) {
 
@@ -391,7 +391,7 @@
     /* convert the RGB palette into the machine's endian format */
     if (cpl0_chunk != -1) {
 
-        chunk_size = BE_32(&s->buf[cpl0_chunk + 4]);
+        chunk_size = AV_RB32(&s->buf[cpl0_chunk + 4]);
         /* sanity check the palette size */
         if (chunk_size / 3 > 256) {
             av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: found a palette chunk with %d colors\n",
@@ -419,7 +419,7 @@
     /* decompress the full codebook chunk */
     if (cbfz_chunk != -1) {
 
-        chunk_size = BE_32(&s->buf[cbfz_chunk + 4]);
+        chunk_size = AV_RB32(&s->buf[cbfz_chunk + 4]);
         cbfz_chunk += CHUNK_PREAMBLE_SIZE;
         decode_format80(&s->buf[cbfz_chunk], chunk_size,
             s->codebook, s->codebook_size, 0);
@@ -428,7 +428,7 @@
     /* copy a full codebook */
     if (cbf0_chunk != -1) {
 
-        chunk_size = BE_32(&s->buf[cbf0_chunk + 4]);
+        chunk_size = AV_RB32(&s->buf[cbf0_chunk + 4]);
         /* sanity check the full codebook size */
         if (chunk_size > MAX_CODEBOOK_SIZE) {
             av_log(s->avctx, AV_LOG_ERROR, "  VQA video: problem: CBF0 chunk too large (0x%X bytes)\n",
@@ -448,7 +448,7 @@
         return;
     }
 
-    chunk_size = BE_32(&s->buf[vptz_chunk + 4]);
+    chunk_size = AV_RB32(&s->buf[vptz_chunk + 4]);
     vptz_chunk += CHUNK_PREAMBLE_SIZE;
     decode_format80(&s->buf[vptz_chunk], chunk_size,
         s->decode_buffer, s->decode_buffer_size, 1);
@@ -522,7 +522,7 @@
 
     if (cbp0_chunk != -1) {
 
-        chunk_size = BE_32(&s->buf[cbp0_chunk + 4]);
+        chunk_size = AV_RB32(&s->buf[cbp0_chunk + 4]);
         cbp0_chunk += CHUNK_PREAMBLE_SIZE;
 
         /* accumulate partial codebook */
@@ -545,7 +545,7 @@
 
     if (cbpz_chunk != -1) {
 
-        chunk_size = BE_32(&s->buf[cbpz_chunk + 4]);
+        chunk_size = AV_RB32(&s->buf[cbpz_chunk + 4]);
         cbpz_chunk += CHUNK_PREAMBLE_SIZE;
 
         /* accumulate partial codebook */

Modified: trunk/libavcodec/wavpack.c
==============================================================================
--- trunk/libavcodec/wavpack.c	(original)
+++ trunk/libavcodec/wavpack.c	Fri Jan 19 23:12:59 2007
@@ -387,15 +387,15 @@
 
     memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr));
 
-    s->samples = LE_32(buf); buf += 4;
+    s->samples = AV_RL32(buf); buf += 4;
     if(!s->samples) return buf_size;
     /* should not happen but who knows */
     if(s->samples * 2 * avctx->channels > AVCODEC_MAX_AUDIO_FRAME_SIZE){
         av_log(avctx, AV_LOG_ERROR, "Packet size is too big to be handled in lavc!\n");
         return -1;
     }
-    s->joint = LE_32(buf) & WV_JOINT; buf += 4;
-    s->CRC = LE_32(buf); buf += 4;
+    s->joint = AV_RL32(buf) & WV_JOINT; buf += 4;
+    s->CRC = AV_RL32(buf); buf += 4;
     // parse metadata blocks
     while(buf < buf_end){
         id = *buf++;
@@ -467,23 +467,23 @@
             t = 0;
             for(i = s->terms - 1; (i >= 0) && (t < size); i--) {
                 if(s->decorr[i].value > 8){
-                    s->decorr[i].samplesA[0] = wp_exp2(LE_16(buf)); buf += 2;
-                    s->decorr[i].samplesA[1] = wp_exp2(LE_16(buf)); buf += 2;
+                    s->decorr[i].samplesA[0] = wp_exp2(AV_RL16(buf)); buf += 2;
+                    s->decorr[i].samplesA[1] = wp_exp2(AV_RL16(buf)); buf += 2;
                     if(s->stereo){
-                        s->decorr[i].samplesB[0] = wp_exp2(LE_16(buf)); buf += 2;
-                        s->decorr[i].samplesB[1] = wp_exp2(LE_16(buf)); buf += 2;
+                        s->decorr[i].samplesB[0] = wp_exp2(AV_RL16(buf)); buf += 2;
+                        s->decorr[i].samplesB[1] = wp_exp2(AV_RL16(buf)); buf += 2;
                         t += 4;
                     }
                     t += 4;
                 }else if(s->decorr[i].value < 0){
-                    s->decorr[i].samplesA[0] = wp_exp2(LE_16(buf)); buf += 2;
-                    s->decorr[i].samplesB[0] = wp_exp2(LE_16(buf)); buf += 2;
+                    s->decorr[i].samplesA[0] = wp_exp2(AV_RL16(buf)); buf += 2;
+                    s->decorr[i].samplesB[0] = wp_exp2(AV_RL16(buf)); buf += 2;
                     t += 4;
                 }else{
                     for(j = 0; j < s->decorr[i].value; j++){
-                        s->decorr[i].samplesA[j] = wp_exp2(LE_16(buf)); buf += 2;
+                        s->decorr[i].samplesA[j] = wp_exp2(AV_RL16(buf)); buf += 2;
                         if(s->stereo){
-                            s->decorr[i].samplesB[j] = wp_exp2(LE_16(buf)); buf += 2;
+                            s->decorr[i].samplesB[j] = wp_exp2(AV_RL16(buf)); buf += 2;
                         }
                     }
                     t += s->decorr[i].value * 2 * avctx->channels;
@@ -498,7 +498,7 @@
                 continue;
             }
             for(i = 0; i < 3 * avctx->channels; i++){
-                s->median[i] = wp_exp2(LE_16(buf));
+                s->median[i] = wp_exp2(AV_RL16(buf));
                 buf += 2;
             }
             got_entropy = 1;

Modified: trunk/libavcodec/ws-snd1.c
==============================================================================
--- trunk/libavcodec/ws-snd1.c	(original)
+++ trunk/libavcodec/ws-snd1.c	Fri Jan 19 23:12:59 2007
@@ -57,9 +57,9 @@
     if (!buf_size)
         return 0;
 
-    out_size = LE_16(&buf[0]);
+    out_size = AV_RL16(&buf[0]);
     *data_size = out_size * 2;
-    in_size = LE_16(&buf[2]);
+    in_size = AV_RL16(&buf[2]);
     buf += 4;
 
     if (in_size == out_size) {

Modified: trunk/libavcodec/xan.c
==============================================================================
--- trunk/libavcodec/xan.c	(original)
+++ trunk/libavcodec/xan.c	Fri Jan 19 23:12:59 2007
@@ -296,10 +296,10 @@
     unsigned char *vector_segment;
     unsigned char *imagedata_segment;
 
-    huffman_segment =   s->buf + LE_16(&s->buf[0]);
-    size_segment =      s->buf + LE_16(&s->buf[2]);
-    vector_segment =    s->buf + LE_16(&s->buf[4]);
-    imagedata_segment = s->buf + LE_16(&s->buf[6]);
+    huffman_segment =   s->buf + AV_RL16(&s->buf[0]);
+    size_segment =      s->buf + AV_RL16(&s->buf[2]);
+    vector_segment =    s->buf + AV_RL16(&s->buf[4]);
+    imagedata_segment = s->buf + AV_RL16(&s->buf[6]);
 
     xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size);
 
@@ -350,7 +350,7 @@
 
         case 10:
         case 20:
-            size = BE_16(&size_segment[0]);
+            size = AV_RB16(&size_segment[0]);
             size_segment += 2;
             break;
 

Modified: trunk/libavcodec/xl.c
==============================================================================
--- trunk/libavcodec/xl.c	(original)
+++ trunk/libavcodec/xl.c	Fri Jan 19 23:12:59 2007
@@ -73,7 +73,7 @@
 
         for (j = 0; j < avctx->width; j += 4) {
             /* value is stored in LE dword with word swapped */
-            val = LE_32(buf);
+            val = AV_RL32(buf);
             buf -= 4;
             val = ((val >> 16) & 0xFFFF) | ((val & 0xFFFF) << 16);
 

Modified: trunk/libavcodec/zmbv.c
==============================================================================
--- trunk/libavcodec/zmbv.c	(original)
+++ trunk/libavcodec/zmbv.c	Fri Jan 19 23:12:59 2007
@@ -545,7 +545,7 @@
         case ZMBV_FMT_15BPP:
             for(j = 0; j < c->height; j++) {
                 for(i = 0; i < c->width; i++) {
-                    uint16_t tmp = LE_16(src);
+                    uint16_t tmp = AV_RL16(src);
                     src += 2;
                     out[i * 3 + 0] = (tmp & 0x7C00) >> 7;
                     out[i * 3 + 1] = (tmp & 0x03E0) >> 2;
@@ -557,7 +557,7 @@
         case ZMBV_FMT_16BPP:
             for(j = 0; j < c->height; j++) {
                 for(i = 0; i < c->width; i++) {
-                    uint16_t tmp = LE_16(src);
+                    uint16_t tmp = AV_RL16(src);
                     src += 2;
                     out[i * 3 + 0] = (tmp & 0xF800) >> 8;
                     out[i * 3 + 1] = (tmp & 0x07E0) >> 3;
@@ -578,7 +578,7 @@
         case ZMBV_FMT_32BPP:
             for(j = 0; j < c->height; j++) {
                 for(i = 0; i < c->width; i++) {
-                    uint32_t tmp = LE_32(src);
+                    uint32_t tmp = AV_RL32(src);
                     src += 4;
                     out[i * 3 + 0] = tmp >> 16;
                     out[i * 3 + 1] = tmp >> 8;

Modified: trunk/libavformat/4xm.c
==============================================================================
--- trunk/libavformat/4xm.c	(original)
+++ trunk/libavformat/4xm.c	Fri Jan 19 23:12:59 2007
@@ -82,8 +82,8 @@
     if (p->buf_size < 12)
         return 0;
 
-    if ((LE_32(&p->buf[0]) != RIFF_TAG) ||
-        (LE_32(&p->buf[8]) != _4XMV_TAG))
+    if ((AV_RL32(&p->buf[0]) != RIFF_TAG) ||
+        (AV_RL32(&p->buf[8]) != _4XMV_TAG))
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -125,19 +125,19 @@
 
     /* take the lazy approach and search for any and all vtrk and strk chunks */
     for (i = 0; i < header_size - 8; i++) {
-        fourcc_tag = LE_32(&header[i]);
-        size = LE_32(&header[i + 4]);
+        fourcc_tag = AV_RL32(&header[i]);
+        size = AV_RL32(&header[i + 4]);
 
         if (fourcc_tag == std__TAG) {
-            fourxm->fps = av_int2flt(LE_32(&header[i + 12]));
+            fourxm->fps = av_int2flt(AV_RL32(&header[i + 12]));
         } else if (fourcc_tag == vtrk_TAG) {
             /* check that there is enough data */
             if (size != vtrk_SIZE) {
                 av_free(header);
                 return AVERROR_INVALIDDATA;
             }
-            fourxm->width = LE_32(&header[i + 36]);
-            fourxm->height = LE_32(&header[i + 40]);
+            fourxm->width = AV_RL32(&header[i + 36]);
+            fourxm->height = AV_RL32(&header[i + 40]);
             i += 8 + size;
 
             /* allocate a new AVStream */
@@ -160,7 +160,7 @@
                 av_free(header);
                 return AVERROR_INVALIDDATA;
             }
-            current_track = LE_32(&header[i + 8]);
+            current_track = AV_RL32(&header[i + 8]);
             if (current_track + 1 > fourxm->track_count) {
                 fourxm->track_count = current_track + 1;
                 if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
@@ -172,10 +172,10 @@
                     return AVERROR_NOMEM;
                 }
             }
-            fourxm->tracks[current_track].adpcm = LE_32(&header[i + 12]);
-            fourxm->tracks[current_track].channels = LE_32(&header[i + 36]);
-            fourxm->tracks[current_track].sample_rate = LE_32(&header[i + 40]);
-            fourxm->tracks[current_track].bits = LE_32(&header[i + 44]);
+            fourxm->tracks[current_track].adpcm = AV_RL32(&header[i + 12]);
+            fourxm->tracks[current_track].channels = AV_RL32(&header[i + 36]);
+            fourxm->tracks[current_track].sample_rate = AV_RL32(&header[i + 40]);
+            fourxm->tracks[current_track].bits = AV_RL32(&header[i + 44]);
             i += 8 + size;
 
             /* allocate a new AVStream */
@@ -235,8 +235,8 @@
 
         if ((ret = get_buffer(&s->pb, header, 8)) < 0)
             return ret;
-        fourcc_tag = LE_32(&header[0]);
-        size = LE_32(&header[4]);
+        fourcc_tag = AV_RL32(&header[0]);
+        size = AV_RL32(&header[4]);
         if (url_feof(pb))
             return AVERROR_IO;
         switch (fourcc_tag) {

Modified: trunk/libavformat/dsicin.c
==============================================================================
--- trunk/libavformat/dsicin.c	(original)
+++ trunk/libavformat/dsicin.c	Fri Jan 19 23:12:59 2007
@@ -62,11 +62,11 @@
         return 0;
 
     /* header starts with this special marker */
-    if (LE_32(&p->buf[0]) != 0x55AA0000)
+    if (AV_RL32(&p->buf[0]) != 0x55AA0000)
         return 0;
 
     /* for accuracy, check some header field values */
-    if (LE_32(&p->buf[12]) != 22050 || p->buf[16] != 16 || p->buf[17] != 0)
+    if (AV_RL32(&p->buf[12]) != 22050 || p->buf[16] != 16 || p->buf[17] != 0)
         return 0;
 
     return AVPROBE_SCORE_MAX;

Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c	(original)
+++ trunk/libavformat/electronicarts.c	Fri Jan 19 23:12:59 2007
@@ -168,7 +168,7 @@
     if (p->buf_size < 4)
         return 0;
 
-    if (LE_32(&p->buf[0]) != SCHl_TAG)
+    if (AV_RL32(&p->buf[0]) != SCHl_TAG)
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -230,8 +230,8 @@
 
         if (get_buffer(pb, preamble, EA_PREAMBLE_SIZE) != EA_PREAMBLE_SIZE)
             return AVERROR_IO;
-        chunk_type = LE_32(&preamble[0]);
-        chunk_size = LE_32(&preamble[4]) - EA_PREAMBLE_SIZE;
+        chunk_type = AV_RL32(&preamble[0]);
+        chunk_size = AV_RL32(&preamble[4]) - EA_PREAMBLE_SIZE;
 
         switch (chunk_type) {
         /* audio data */

Modified: trunk/libavformat/flic.c
==============================================================================
--- trunk/libavformat/flic.c	(original)
+++ trunk/libavformat/flic.c	Fri Jan 19 23:12:59 2007
@@ -58,7 +58,7 @@
     if (p->buf_size < 6)
         return 0;
 
-    magic_number = LE_16(&p->buf[4]);
+    magic_number = AV_RL16(&p->buf[4]);
     if ((magic_number != FLIC_FILE_MAGIC_1) &&
         (magic_number != FLIC_FILE_MAGIC_2) &&
         (magic_number != FLIC_FILE_MAGIC_3))
@@ -83,8 +83,8 @@
     if (get_buffer(pb, header, FLIC_HEADER_SIZE) != FLIC_HEADER_SIZE)
         return AVERROR_IO;
 
-    magic_number = LE_16(&header[4]);
-    speed = LE_32(&header[0x10]);
+    magic_number = AV_RL16(&header[4]);
+    speed = AV_RL32(&header[0x10]);
 
     /* initialize the decoder streams */
     st = av_new_stream(s, 0);
@@ -94,8 +94,8 @@
     st->codec->codec_type = CODEC_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_FLIC;
     st->codec->codec_tag = 0;  /* no fourcc */
-    st->codec->width = LE_16(&header[0x08]);
-    st->codec->height = LE_16(&header[0x0A]);
+    st->codec->width = AV_RL16(&header[0x08]);
+    st->codec->height = AV_RL16(&header[0x0A]);
 
     if (!st->codec->width || !st->codec->height)
         return AVERROR_INVALIDDATA;
@@ -110,7 +110,7 @@
     /* Time to figure out the framerate: If there is a FLIC chunk magic
      * number at offset 0x10, assume this is from the Bullfrog game,
      * Magic Carpet. */
-    if (LE_16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) {
+    if (AV_RL16(&header[0x10]) == FLIC_CHUNK_MAGIC_1) {
 
         flic->frame_pts_inc = FLIC_MC_PTS_INC;
 
@@ -174,8 +174,8 @@
             break;
         }
 
-        size = LE_32(&preamble[0]);
-        magic = LE_16(&preamble[4]);
+        size = AV_RL32(&preamble[0]);
+        magic = AV_RL16(&preamble[4]);
 
         if (((magic == FLIC_CHUNK_MAGIC_1) || (magic == FLIC_CHUNK_MAGIC_2)) && size > FLIC_PREAMBLE_SIZE) {
             if (av_new_packet(pkt, size)) {

Modified: trunk/libavformat/idcin.c
==============================================================================
--- trunk/libavformat/idcin.c	(original)
+++ trunk/libavformat/idcin.c	Fri Jan 19 23:12:59 2007
@@ -109,27 +109,27 @@
         return 0;
 
     /* check the video width */
-    number = LE_32(&p->buf[0]);
+    number = AV_RL32(&p->buf[0]);
     if ((number == 0) || (number > 1024))
        return 0;
 
     /* check the video height */
-    number = LE_32(&p->buf[4]);
+    number = AV_RL32(&p->buf[4]);
     if ((number == 0) || (number > 1024))
        return 0;
 
     /* check the audio sample rate */
-    number = LE_32(&p->buf[8]);
+    number = AV_RL32(&p->buf[8]);
     if ((number != 0) && ((number < 8000) | (number > 48000)))
         return 0;
 
     /* check the audio bytes/sample */
-    number = LE_32(&p->buf[12]);
+    number = AV_RL32(&p->buf[12]);
     if (number > 2)
         return 0;
 
     /* check the audio channels */
-    number = LE_32(&p->buf[16]);
+    number = AV_RL32(&p->buf[16]);
     if (number > 2)
         return 0;
 

Modified: trunk/libavformat/idroq.c
==============================================================================
--- trunk/libavformat/idroq.c	(original)
+++ trunk/libavformat/idroq.c	Fri Jan 19 23:12:59 2007
@@ -61,8 +61,8 @@
     if (p->buf_size < 6)
         return 0;
 
-    if ((LE_16(&p->buf[0]) != RoQ_MAGIC_NUMBER) ||
-        (LE_32(&p->buf[2]) != 0xFFFFFFFF))
+    if ((AV_RL16(&p->buf[0]) != RoQ_MAGIC_NUMBER) ||
+        (AV_RL32(&p->buf[2]) != 0xFFFFFFFF))
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -83,7 +83,7 @@
     if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
         RoQ_CHUNK_PREAMBLE_SIZE)
         return AVERROR_IO;
-    roq->framerate = LE_16(&preamble[6]);
+    roq->framerate = AV_RL16(&preamble[6]);
     roq->frame_pts_inc = 90000 / roq->framerate;
 
     /* init private context parameters */
@@ -96,8 +96,8 @@
             RoQ_CHUNK_PREAMBLE_SIZE)
             return AVERROR_IO;
 
-        chunk_type = LE_16(&preamble[0]);
-        chunk_size = LE_32(&preamble[2]);
+        chunk_type = AV_RL16(&preamble[0]);
+        chunk_size = AV_RL32(&preamble[2]);
 
         switch (chunk_type) {
 
@@ -106,8 +106,8 @@
             if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
                 RoQ_CHUNK_PREAMBLE_SIZE)
                 return AVERROR_IO;
-            roq->width = LE_16(&preamble[0]);
-            roq->height = LE_16(&preamble[2]);
+            roq->width = AV_RL16(&preamble[0]);
+            roq->height = AV_RL16(&preamble[2]);
             break;
 
         case RoQ_QUAD_CODEBOOK:
@@ -127,7 +127,7 @@
             break;
 
         default:
-            av_log(s, AV_LOG_ERROR, " unknown RoQ chunk type (%04X)\n", LE_16(&preamble[0]));
+            av_log(s, AV_LOG_ERROR, " unknown RoQ chunk type (%04X)\n", AV_RL16(&preamble[0]));
             return AVERROR_INVALIDDATA;
             break;
         }
@@ -196,8 +196,8 @@
             RoQ_CHUNK_PREAMBLE_SIZE)
             return AVERROR_IO;
 
-        chunk_type = LE_16(&preamble[0]);
-        chunk_size = LE_32(&preamble[2]);
+        chunk_type = AV_RL16(&preamble[0]);
+        chunk_size = AV_RL32(&preamble[2]);
         if(chunk_size > INT_MAX)
             return AVERROR_INVALIDDATA;
 
@@ -216,7 +216,7 @@
             if (get_buffer(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) !=
                 RoQ_CHUNK_PREAMBLE_SIZE)
                 return AVERROR_IO;
-            chunk_size = LE_32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
+            chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
                 codebook_size;
 
             /* rewind */

Modified: trunk/libavformat/ipmovie.c
==============================================================================
--- trunk/libavformat/ipmovie.c	(original)
+++ trunk/libavformat/ipmovie.c	Fri Jan 19 23:12:59 2007
@@ -236,8 +236,8 @@
     if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
         CHUNK_PREAMBLE_SIZE)
         return CHUNK_BAD;
-    chunk_size = LE_16(&chunk_preamble[0]);
-    chunk_type = LE_16(&chunk_preamble[2]);
+    chunk_size = AV_RL16(&chunk_preamble[0]);
+    chunk_type = AV_RL16(&chunk_preamble[2]);
 
     debug_ipmovie("chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);
 
@@ -287,7 +287,7 @@
             break;
         }
 
-        opcode_size = LE_16(&opcode_preamble[0]);
+        opcode_size = AV_RL16(&opcode_preamble[0]);
         opcode_type = opcode_preamble[2];
         opcode_version = opcode_preamble[3];
 
@@ -325,10 +325,10 @@
                 chunk_type = CHUNK_BAD;
                 break;
             }
-            s->fps = 1000000.0 / (LE_32(&scratch[0]) * LE_16(&scratch[4]));
+            s->fps = 1000000.0 / (AV_RL32(&scratch[0]) * AV_RL16(&scratch[4]));
             s->frame_pts_inc = 90000 / s->fps;
             debug_ipmovie("  %.2f frames/second (timer div = %d, subdiv = %d)\n",
-                s->fps, LE_32(&scratch[0]), LE_16(&scratch[4]));
+                s->fps, AV_RL32(&scratch[0]), AV_RL16(&scratch[4]));
             break;
 
         case OPCODE_INIT_AUDIO_BUFFERS:
@@ -343,8 +343,8 @@
                 chunk_type = CHUNK_BAD;
                 break;
             }
-            s->audio_sample_rate = LE_16(&scratch[4]);
-            audio_flags = LE_16(&scratch[2]);
+            s->audio_sample_rate = AV_RL16(&scratch[4]);
+            audio_flags = AV_RL16(&scratch[2]);
             /* bit 0 of the flags: 0 = mono, 1 = stereo */
             s->audio_channels = (audio_flags & 1) + 1;
             /* bit 1 of the flags: 0 = 8 bit, 1 = 16 bit */
@@ -381,8 +381,8 @@
                 chunk_type = CHUNK_BAD;
                 break;
             }
-            s->video_width = LE_16(&scratch[0]) * 8;
-            s->video_height = LE_16(&scratch[2]) * 8;
+            s->video_width = AV_RL16(&scratch[0]) * 8;
+            s->video_height = AV_RL16(&scratch[2]) * 8;
             debug_ipmovie("video resolution: %d x %d\n",
                 s->video_width, s->video_height);
             break;
@@ -442,8 +442,8 @@
             }
 
             /* load the palette into internal data structure */
-            first_color = LE_16(&scratch[0]);
-            last_color = first_color + LE_16(&scratch[2]) - 1;
+            first_color = AV_RL16(&scratch[0]);
+            last_color = first_color + AV_RL16(&scratch[2]) - 1;
             /* sanity check (since they are 16 bit values) */
             if ((first_color > 0xFF) || (last_color > 0xFF)) {
                 debug_ipmovie("demux_ipmovie: set_palette indices out of range (%d -> %d)\n",
@@ -542,7 +542,7 @@
     if (get_buffer(pb, chunk_preamble, CHUNK_PREAMBLE_SIZE) !=
         CHUNK_PREAMBLE_SIZE)
         return AVERROR_IO;
-    chunk_type = LE_16(&chunk_preamble[2]);
+    chunk_type = AV_RL16(&chunk_preamble[2]);
     url_fseek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
 
     if (chunk_type == CHUNK_VIDEO)

Modified: trunk/libavformat/matroska.c
==============================================================================
--- trunk/libavformat/matroska.c	(original)
+++ trunk/libavformat/matroska.c	Fri Jan 19 23:12:59 2007
@@ -2372,7 +2372,7 @@
 static inline int
 rv_offset(uint8_t *data, int slice, int slices)
 {
-    return LE_32(data+8*slice+4) + 8*slices;
+    return AV_RL32(data+8*slice+4) + 8*slices;
 }
 
 static int

Modified: trunk/libavformat/mm.c
==============================================================================
--- trunk/libavformat/mm.c	(original)
+++ trunk/libavformat/mm.c	Fri Jan 19 23:12:59 2007
@@ -61,9 +61,9 @@
     /* the first chunk is always the header */
     if (p->buf_size < MM_PREAMBLE_SIZE)
         return 0;
-    if (LE_16(&p->buf[0]) != MM_TYPE_HEADER)
+    if (AV_RL16(&p->buf[0]) != MM_TYPE_HEADER)
         return 0;
-    if (LE_32(&p->buf[2]) != MM_HEADER_LEN_V && LE_32(&p->buf[2]) != MM_HEADER_LEN_AV)
+    if (AV_RL32(&p->buf[2]) != MM_HEADER_LEN_V && AV_RL32(&p->buf[2]) != MM_HEADER_LEN_AV)
         return 0;
 
     /* only return half certainty since this check is a bit sketchy */
@@ -141,8 +141,8 @@
             return AVERROR_IO;
         }
 
-        type = LE_16(&preamble[0]);
-        length = LE_16(&preamble[2]);
+        type = AV_RL16(&preamble[0]);
+        length = AV_RL16(&preamble[2]);
 
         switch(type) {
         case MM_TYPE_PALETTE :

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Fri Jan 19 23:12:59 2007
@@ -1447,7 +1447,7 @@
         /* ignore invalid offset */
         if ((offset + 8) > (unsigned int)p->buf_size)
             return score;
-        tag = LE_32(p->buf + offset + 4);
+        tag = AV_RL32(p->buf + offset + 4);
         switch(tag) {
         /* check for obvious tags */
         case MKTAG( 'j', 'P', ' ', ' ' ): /* jpeg 2000 signature */
@@ -1465,7 +1465,7 @@
         case MKTAG( 'f', 't', 'y', 'p' ):
         case MKTAG( 's', 'k', 'i', 'p' ):
         case MKTAG( 'u', 'u', 'i', 'd' ):
-            offset = BE_32(p->buf+offset) + offset;
+            offset = AV_RB32(p->buf+offset) + offset;
             /* if we only find those cause probedata is too small at least rate them */
             score = AVPROBE_SCORE_MAX - 50;
             break;

Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c	(original)
+++ trunk/libavformat/movenc.c	Fri Jan 19 23:12:59 2007
@@ -480,7 +480,7 @@
     put_tag(pb, "avcC");
     if (track->vosLen > 6) {
         /* check for h264 start code */
-        if (BE_32(track->vosData) == 0x00000001) {
+        if (AV_RB32(track->vosData) == 0x00000001) {
             uint8_t *buf, *end;
             uint32_t sps_size=0, pps_size=0;
             uint8_t *sps=0, *pps=0;
@@ -493,7 +493,7 @@
             while (buf < end) {
                 unsigned int size;
                 uint8_t nal_type;
-                size = BE_32(buf);
+                size = AV_RB32(buf);
                 nal_type = buf[4] & 0x1f;
                 if (nal_type == 7) { /* SPS */
                     sps = buf + 4;

Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c	(original)
+++ trunk/libavformat/nuv.c	Fri Jan 19 23:12:59 2007
@@ -190,7 +190,7 @@
         if (ret <= 0)
             return ret ? ret : -1;
         frametype = hdr[0];
-        size = PKTSIZE(LE_32(&hdr[8]));
+        size = PKTSIZE(AV_RL32(&hdr[8]));
         switch (frametype) {
             case NUV_VIDEO:
             case NUV_EXTRADATA:
@@ -203,7 +203,7 @@
                 if (ret < 0)
                     return ret;
                 pkt->pos = url_ftell(pb);
-                pkt->pts = LE_32(&hdr[4]);
+                pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->v_id;
                 memcpy(pkt->data, hdr, HDRSIZE);
                 ret = get_buffer(pb, pkt->data + HDRSIZE, size);
@@ -215,7 +215,7 @@
                     break;
                 }
                 ret = av_get_packet(pb, pkt, size);
-                pkt->pts = LE_32(&hdr[4]);
+                pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->a_id;
                 return ret;
             case NUV_SEEKP:

Modified: trunk/libavformat/psxstr.c
==============================================================================
--- trunk/libavformat/psxstr.c	(original)
+++ trunk/libavformat/psxstr.c	Fri Jan 19 23:12:59 2007
@@ -92,8 +92,8 @@
     if (p->buf_size < 0x38)
         return 0;
 
-    if ((LE_32(&p->buf[0]) == RIFF_TAG) &&
-        (LE_32(&p->buf[8]) == CDXA_TAG)) {
+    if ((AV_RL32(&p->buf[0]) == RIFF_TAG) &&
+        (AV_RL32(&p->buf[8]) == CDXA_TAG)) {
 
         /* RIFF header seen; skip 0x2C bytes */
         start = RIFF_HEADER_SIZE;
@@ -143,7 +143,7 @@
     /* skip over any RIFF header */
     if (get_buffer(pb, sector, RIFF_HEADER_SIZE) != RIFF_HEADER_SIZE)
         return AVERROR_IO;
-    if (LE_32(&sector[0]) == RIFF_TAG)
+    if (AV_RL32(&sector[0]) == RIFF_TAG)
         start = RIFF_HEADER_SIZE;
     else
         start = 0;
@@ -168,12 +168,12 @@
             /* check if this channel gets to be the dominant video channel */
             if (str->video_channel == -1) {
                 /* qualify the magic number */
-                if (LE_32(&sector[0x18]) != STR_MAGIC)
+                if (AV_RL32(&sector[0x18]) != STR_MAGIC)
                     break;
                 str->video_channel = channel;
                 str->channels[channel].type = STR_VIDEO;
-                str->channels[channel].width = LE_16(&sector[0x28]);
-                str->channels[channel].height = LE_16(&sector[0x2A]);
+                str->channels[channel].width = AV_RL16(&sector[0x28]);
+                str->channels[channel].height = AV_RL16(&sector[0x2A]);
 
                 /* allocate a new AVStream */
                 st = av_new_stream(s, 0);
@@ -273,9 +273,9 @@
             /* check if this the video channel we care about */
             if (channel == str->video_channel) {
 
-                int current_sector = LE_16(&sector[0x1C]);
-                int sector_count   = LE_16(&sector[0x1E]);
-                int frame_size = LE_32(&sector[0x24]);
+                int current_sector = AV_RL16(&sector[0x1C]);
+                int sector_count   = AV_RL16(&sector[0x1E]);
+                int frame_size = AV_RL32(&sector[0x24]);
                 int bytes_to_copy;
 //        printf("%d %d %d\n",current_sector,sector_count,frame_size);
                 /* if this is the first sector of the frame, allocate a pkt */

Modified: trunk/libavformat/rtp.c
==============================================================================
--- trunk/libavformat/rtp.c	(original)
+++ trunk/libavformat/rtp.c	Fri Jan 19 23:12:59 2007
@@ -504,7 +504,7 @@
 
     /* decode the first 2 bytes where are stored the AUHeader sections
        length in bits */
-    au_headers_length = BE_16(buf);
+    au_headers_length = AV_RB16(buf);
 
     if (au_headers_length > RTP_MAX_PACKET_LENGTH)
       return -1;

Modified: trunk/libavformat/rtp_h264.c
==============================================================================
--- trunk/libavformat/rtp_h264.c	(original)
+++ trunk/libavformat/rtp_h264.c	Fri Jan 19 23:12:59 2007
@@ -209,7 +209,7 @@
                 int src_len= len;
 
                 do {
-                    uint16_t nal_size = BE_16(src); // this going to be a problem if unaligned (can it be?)
+                    uint16_t nal_size = AV_RB16(src); // this going to be a problem if unaligned (can it be?)
 
                     // consume the length of the aggregate...
                     src += 2;

Modified: trunk/libavformat/segafilm.c
==============================================================================
--- trunk/libavformat/segafilm.c	(original)
+++ trunk/libavformat/segafilm.c	Fri Jan 19 23:12:59 2007
@@ -69,7 +69,7 @@
     if (p->buf_size < 4)
         return 0;
 
-    if (BE_32(&p->buf[0]) != FILM_TAG)
+    if (AV_RB32(&p->buf[0]) != FILM_TAG)
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -93,8 +93,8 @@
     /* load the main FILM header */
     if (get_buffer(pb, scratch, 16) != 16)
         return AVERROR_IO;
-    data_offset = BE_32(&scratch[4]);
-    film->version = BE_32(&scratch[8]);
+    data_offset = AV_RB32(&scratch[4]);
+    film->version = AV_RB32(&scratch[8]);
 
     /* load the FDSC chunk */
     if (film->version == 0) {
@@ -110,7 +110,7 @@
         /* normal Saturn .cpk files; 32-byte header */
         if (get_buffer(pb, scratch, 32) != 32)
             return AVERROR_IO;
-        film->audio_samplerate = BE_16(&scratch[24]);;
+        film->audio_samplerate = AV_RB16(&scratch[24]);;
         film->audio_channels = scratch[21];
         film->audio_bits = scratch[22];
         if (film->audio_bits == 8)
@@ -121,10 +121,10 @@
             film->audio_type = 0;
     }
 
-    if (BE_32(&scratch[0]) != FDSC_TAG)
+    if (AV_RB32(&scratch[0]) != FDSC_TAG)
         return AVERROR_INVALIDDATA;
 
-    if (BE_32(&scratch[8]) == CVID_TAG) {
+    if (AV_RB32(&scratch[8]) == CVID_TAG) {
         film->video_type = CODEC_ID_CINEPAK;
     } else
         film->video_type = 0;
@@ -138,8 +138,8 @@
         st->codec->codec_type = CODEC_TYPE_VIDEO;
         st->codec->codec_id = film->video_type;
         st->codec->codec_tag = 0;  /* no fourcc */
-        st->codec->width = BE_32(&scratch[16]);
-        st->codec->height = BE_32(&scratch[12]);
+        st->codec->width = AV_RB32(&scratch[16]);
+        st->codec->height = AV_RB32(&scratch[12]);
     }
 
     if (film->audio_type) {
@@ -162,10 +162,10 @@
     /* load the sample table */
     if (get_buffer(pb, scratch, 16) != 16)
         return AVERROR_IO;
-    if (BE_32(&scratch[0]) != STAB_TAG)
+    if (AV_RB32(&scratch[0]) != STAB_TAG)
         return AVERROR_INVALIDDATA;
-    film->base_clock = BE_32(&scratch[8]);
-    film->sample_count = BE_32(&scratch[12]);
+    film->base_clock = AV_RB32(&scratch[8]);
+    film->sample_count = AV_RB32(&scratch[12]);
     if(film->sample_count >= UINT_MAX / sizeof(film_sample_t))
         return -1;
     film->sample_table = av_malloc(film->sample_count * sizeof(film_sample_t));
@@ -181,9 +181,9 @@
             return AVERROR_IO;
         }
         film->sample_table[i].sample_offset =
-            data_offset + BE_32(&scratch[0]);
-        film->sample_table[i].sample_size = BE_32(&scratch[4]);
-        if (BE_32(&scratch[8]) == 0xFFFFFFFF) {
+            data_offset + AV_RB32(&scratch[0]);
+        film->sample_table[i].sample_size = AV_RB32(&scratch[4]);
+        if (AV_RB32(&scratch[8]) == 0xFFFFFFFF) {
             film->sample_table[i].stream = film->audio_stream_index;
             film->sample_table[i].pts = audio_frame_counter;
             film->sample_table[i].pts *= film->base_clock;
@@ -193,7 +193,7 @@
                 (film->audio_channels * film->audio_bits / 8));
         } else {
             film->sample_table[i].stream = film->video_stream_index;
-            film->sample_table[i].pts = BE_32(&scratch[8]) & 0x7FFFFFFF;
+            film->sample_table[i].pts = AV_RB32(&scratch[8]) & 0x7FFFFFFF;
             film->sample_table[i].keyframe = (scratch[8] & 0x80) ? 0 : 1;
         }
     }

Modified: trunk/libavformat/sgi.c
==============================================================================
--- trunk/libavformat/sgi.c	(original)
+++ trunk/libavformat/sgi.c	Fri Jan 19 23:12:59 2007
@@ -50,7 +50,7 @@
 static int sgi_probe(AVProbeData *pd)
 {
     /* test for sgi magic */
-    if (pd->buf_size >= 2 && BE_16(&pd->buf[0]) == SGI_MAGIC) {
+    if (pd->buf_size >= 2 && AV_RB16(&pd->buf[0]) == SGI_MAGIC) {
         return AVPROBE_SCORE_MAX;
     } else {
         return 0;
@@ -197,7 +197,7 @@
         for (y = 0; y < ysize; y++) {
             dest_row = pict->data[0] + (ysize - 1 - y) * (xsize * zsize);
 
-            start_offset = BE_32(&start_table[y + z * ysize]);
+            start_offset = AV_RB32(&start_table[y + z * ysize]);
 
             /* don't seek if already at the next rle start offset */
             if (url_ftell(f) != start_offset) {

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	(original)
+++ trunk/libavformat/sierravmd.c	Fri Jan 19 23:12:59 2007
@@ -64,7 +64,7 @@
 
     /* check if the first 2 bytes of the file contain the appropriate size
      * of a VMD header chunk */
-    if (LE_16(&p->buf[0]) != VMD_HEADER_SIZE - 2)
+    if (AV_RL16(&p->buf[0]) != VMD_HEADER_SIZE - 2)
         return 0;
 
     /* only return half certainty since this check is a bit sketchy */
@@ -103,14 +103,14 @@
     vst->codec->codec_type = CODEC_TYPE_VIDEO;
     vst->codec->codec_id = CODEC_ID_VMDVIDEO;
     vst->codec->codec_tag = 0;  /* no fourcc */
-    vst->codec->width = LE_16(&vmd->vmd_header[12]);
-    vst->codec->height = LE_16(&vmd->vmd_header[14]);
+    vst->codec->width = AV_RL16(&vmd->vmd_header[12]);
+    vst->codec->height = AV_RL16(&vmd->vmd_header[14]);
     vst->codec->extradata_size = VMD_HEADER_SIZE;
     vst->codec->extradata = av_mallocz(VMD_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
     memcpy(vst->codec->extradata, vmd->vmd_header, VMD_HEADER_SIZE);
 
     /* if sample rate is 0, assume no audio */
-    vmd->sample_rate = LE_16(&vmd->vmd_header[804]);
+    vmd->sample_rate = AV_RL16(&vmd->vmd_header[804]);
     if (vmd->sample_rate) {
         st = av_new_stream(s, 0);
         if (!st)
@@ -121,7 +121,7 @@
         st->codec->codec_tag = 0;  /* no fourcc */
         st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;
         st->codec->sample_rate = vmd->sample_rate;
-        st->codec->block_align = LE_16(&vmd->vmd_header[806]);
+        st->codec->block_align = AV_RL16(&vmd->vmd_header[806]);
         if (st->codec->block_align & 0x8000) {
             st->codec->bits_per_sample = 16;
             st->codec->block_align = -(st->codec->block_align - 0x10000);
@@ -140,14 +140,14 @@
         pts_inc = num;
     }
 
-    toc_offset = LE_32(&vmd->vmd_header[812]);
-    vmd->frame_count = LE_16(&vmd->vmd_header[6]);
-    vmd->frames_per_block = LE_16(&vmd->vmd_header[18]);
+    toc_offset = AV_RL32(&vmd->vmd_header[812]);
+    vmd->frame_count = AV_RL16(&vmd->vmd_header[6]);
+    vmd->frames_per_block = AV_RL16(&vmd->vmd_header[18]);
     url_fseek(pb, toc_offset, SEEK_SET);
 
     raw_frame_table = NULL;
     vmd->frame_table = NULL;
-    sound_buffers = LE_16(&vmd->vmd_header[808]);
+    sound_buffers = AV_RL16(&vmd->vmd_header[808]);
     raw_frame_table_size = vmd->frame_count * 6;
     raw_frame_table = av_malloc(raw_frame_table_size);
     if(vmd->frame_count * vmd->frames_per_block  >= UINT_MAX / sizeof(vmd_frame_t)){
@@ -170,7 +170,7 @@
     total_frames = 0;
     for (i = 0; i < vmd->frame_count; i++) {
 
-        current_offset = LE_32(&raw_frame_table[6 * i + 2]);
+        current_offset = AV_RL32(&raw_frame_table[6 * i + 2]);
 
         /* handle each entry in index block */
         for (j = 0; j < vmd->frames_per_block; j++) {
@@ -179,7 +179,7 @@
 
             get_buffer(pb, chunk, BYTES_PER_FRAME_RECORD);
             type = chunk[0];
-            size = LE_32(&chunk[2]);
+            size = AV_RL32(&chunk[2]);
             if(!size)
                 continue;
             switch(type) {

Modified: trunk/libavformat/smacker.c
==============================================================================
--- trunk/libavformat/smacker.c	(original)
+++ trunk/libavformat/smacker.c	Fri Jan 19 23:12:59 2007
@@ -311,7 +311,7 @@
         pkt->size = smk->buf_sizes[smk->curstream];
         pkt->stream_index = smk->stream_id[smk->curstream];
         pkt->pts = smk->aud_pts[smk->curstream];
-        smk->aud_pts[smk->curstream] += LE_32(pkt->data);
+        smk->aud_pts[smk->curstream] += AV_RL32(pkt->data);
         smk->curstream--;
     }
 

Modified: trunk/libavformat/swf.c
==============================================================================
--- trunk/libavformat/swf.c	(original)
+++ trunk/libavformat/swf.c	Fri Jan 19 23:12:59 2007
@@ -878,7 +878,7 @@
                     get_le16(pb); /* BITMAP_ID */
                     av_new_packet(pkt, len-2);
                     get_buffer(pb, pkt->data, 4);
-                    if (BE_32(pkt->data) == 0xffd8ffd9) {
+                    if (AV_RB32(pkt->data) == 0xffd8ffd9) {
                         /* old SWF files containing SOI/EOI as data start */
                         pkt->size -= 4;
                         get_buffer(pb, pkt->data, pkt->size);

Modified: trunk/libavformat/wc3movie.c
==============================================================================
--- trunk/libavformat/wc3movie.c	(original)
+++ trunk/libavformat/wc3movie.c	Fri Jan 19 23:12:59 2007
@@ -115,8 +115,8 @@
     if (p->buf_size < 12)
         return 0;
 
-    if ((LE_32(&p->buf[0]) != FORM_TAG) ||
-        (LE_32(&p->buf[8]) != MOVE_TAG))
+    if ((AV_RL32(&p->buf[0]) != FORM_TAG) ||
+        (AV_RL32(&p->buf[8]) != MOVE_TAG))
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -153,8 +153,8 @@
     if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
         WC3_PREAMBLE_SIZE)
         return AVERROR_IO;
-    fourcc_tag = LE_32(&preamble[0]);
-    size = (BE_32(&preamble[4]) + 1) & (~1);
+    fourcc_tag = AV_RL32(&preamble[0]);
+    size = (AV_RB32(&preamble[4]) + 1) & (~1);
 
     do {
         switch (fourcc_tag) {
@@ -170,7 +170,7 @@
             url_fseek(pb, 8, SEEK_CUR);
             if ((ret = get_buffer(pb, preamble, 4)) != 4)
                 return AVERROR_IO;
-            wc3->palette_count = LE_32(&preamble[0]);
+            wc3->palette_count = AV_RL32(&preamble[0]);
             if((unsigned)wc3->palette_count >= UINT_MAX / PALETTE_SIZE){
                 wc3->palette_count= 0;
                 return -1;
@@ -193,8 +193,8 @@
             if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
                 WC3_PREAMBLE_SIZE)
                 return AVERROR_IO;
-            wc3->width = LE_32(&preamble[0]);
-            wc3->height = LE_32(&preamble[4]);
+            wc3->width = AV_RL32(&preamble[0]);
+            wc3->height = AV_RL32(&preamble[4]);
             break;
 
         case PALT_TAG:
@@ -229,9 +229,9 @@
         if ((ret = get_buffer(pb, preamble, WC3_PREAMBLE_SIZE)) !=
             WC3_PREAMBLE_SIZE)
             return AVERROR_IO;
-        fourcc_tag = LE_32(&preamble[0]);
+        fourcc_tag = AV_RL32(&preamble[0]);
         /* chunk sizes are 16-bit aligned */
-        size = (BE_32(&preamble[4]) + 1) & (~1);
+        size = (AV_RB32(&preamble[4]) + 1) & (~1);
 
     } while (fourcc_tag != BRCH_TAG);
 
@@ -291,9 +291,9 @@
             WC3_PREAMBLE_SIZE)
             ret = AVERROR_IO;
 
-        fourcc_tag = LE_32(&preamble[0]);
+        fourcc_tag = AV_RL32(&preamble[0]);
         /* chunk sizes are 16-bit aligned */
-        size = (BE_32(&preamble[4]) + 1) & (~1);
+        size = (AV_RB32(&preamble[4]) + 1) & (~1);
 
         switch (fourcc_tag) {
 
@@ -305,7 +305,7 @@
             /* load up new palette */
             if ((ret = get_buffer(pb, preamble, 4)) != 4)
                 return AVERROR_IO;
-            palette_number = LE_32(&preamble[0]);
+            palette_number = AV_RL32(&preamble[0]);
             if (palette_number >= wc3->palette_count)
                 return AVERROR_INVALIDDATA;
             base_palette_index = palette_number * PALETTE_COUNT * 3;

Modified: trunk/libavformat/westwood.c
==============================================================================
--- trunk/libavformat/westwood.c	(original)
+++ trunk/libavformat/westwood.c	Fri Jan 19 23:12:59 2007
@@ -101,7 +101,7 @@
         return 0;
 
     /* check sample rate */
-    field = LE_16(&p->buf[0]);
+    field = AV_RL16(&p->buf[0]);
     if ((field < 8000) || (field > 48000))
         return 0;
 
@@ -124,7 +124,7 @@
 
     if (get_buffer(pb, header, AUD_HEADER_SIZE) != AUD_HEADER_SIZE)
         return AVERROR_IO;
-    wsaud->audio_samplerate = LE_16(&header[0]);
+    wsaud->audio_samplerate = AV_RL16(&header[0]);
     if (header[11] == 99)
         wsaud->audio_type = CODEC_ID_ADPCM_IMA_WS;
     else
@@ -170,10 +170,10 @@
         return AVERROR_IO;
 
     /* validate the chunk */
-    if (LE_32(&preamble[4]) != AUD_CHUNK_SIGNATURE)
+    if (AV_RL32(&preamble[4]) != AUD_CHUNK_SIGNATURE)
         return AVERROR_INVALIDDATA;
 
-    chunk_size = LE_16(&preamble[0]);
+    chunk_size = AV_RL16(&preamble[0]);
     ret= av_get_packet(pb, pkt, chunk_size);
     if (ret != chunk_size)
         return AVERROR_IO;
@@ -202,8 +202,8 @@
         return 0;
 
     /* check for the VQA signatures */
-    if ((BE_32(&p->buf[0]) != FORM_TAG) ||
-        (BE_32(&p->buf[8]) != WVQA_TAG))
+    if ((AV_RB32(&p->buf[0]) != FORM_TAG) ||
+        (AV_RB32(&p->buf[8]) != WVQA_TAG))
         return 0;
 
     return AVPROBE_SCORE_MAX;
@@ -242,22 +242,22 @@
         av_free(st->codec->extradata);
         return AVERROR_IO;
     }
-    st->codec->width = LE_16(&header[6]);
-    st->codec->height = LE_16(&header[8]);
+    st->codec->width = AV_RL16(&header[6]);
+    st->codec->height = AV_RL16(&header[8]);
 
     /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */
-    if (LE_16(&header[24]) || (LE_16(&header[0]) == 1 && LE_16(&header[2]) == 1)) {
+    if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) {
         st = av_new_stream(s, 0);
         if (!st)
             return AVERROR_NOMEM;
         av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
         st->codec->codec_type = CODEC_TYPE_AUDIO;
-        if (LE_16(&header[0]) == 1)
+        if (AV_RL16(&header[0]) == 1)
             st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
         else
             st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
         st->codec->codec_tag = 0;  /* no tag */
-        st->codec->sample_rate = LE_16(&header[24]);
+        st->codec->sample_rate = AV_RL16(&header[24]);
         if (!st->codec->sample_rate)
             st->codec->sample_rate = 22050;
         st->codec->channels = header[26];
@@ -281,8 +281,8 @@
             av_free(st->codec->extradata);
             return AVERROR_IO;
         }
-        chunk_tag = BE_32(&scratch[0]);
-        chunk_size = BE_32(&scratch[4]);
+        chunk_tag = AV_RB32(&scratch[0]);
+        chunk_size = AV_RB32(&scratch[4]);
 
         /* catch any unknown header tags, for curiousity */
         switch (chunk_tag) {
@@ -323,8 +323,8 @@
     int skip_byte;
 
     while (get_buffer(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
-        chunk_type = BE_32(&preamble[0]);
-        chunk_size = BE_32(&preamble[4]);
+        chunk_type = AV_RB32(&preamble[0]);
+        chunk_size = AV_RB32(&preamble[4]);
         skip_byte = chunk_size & 0x01;
 
         if ((chunk_type == SND1_TAG) || (chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) {
@@ -344,7 +344,7 @@
             } else if(chunk_type == SND1_TAG) {
                 pkt->stream_index = wsvqa->audio_stream_index;
                 /* unpacked size is stored in header */
-                wsvqa->audio_frame_counter += LE_16(pkt->data) / wsvqa->audio_channels;
+                wsvqa->audio_frame_counter += AV_RL16(pkt->data) / wsvqa->audio_channels;
             } else {
                 pkt->stream_index = wsvqa->video_stream_index;
                 wsvqa->video_pts += VQA_VIDEO_PTS_INC;

Modified: trunk/libavformat/wv.c
==============================================================================
--- trunk/libavformat/wv.c	(original)
+++ trunk/libavformat/wv.c	Fri Jan 19 23:12:59 2007
@@ -92,7 +92,7 @@
     get_le32(pb); // total samples in file
     get_le32(pb); // offset in samples of current block
     get_buffer(pb, wc->extra, WV_EXTRA_SIZE);
-    wc->flags = LE_32(wc->extra + 4);
+    wc->flags = AV_RL32(wc->extra + 4);
     //parse flags
     if(wc->flags & WV_FLOAT){
         av_log(ctx, AV_LOG_ERROR, "Floating point data is not supported\n");

Modified: trunk/libavutil/intreadwrite.h
==============================================================================
--- trunk/libavutil/intreadwrite.h	(original)
+++ trunk/libavutil/intreadwrite.h	Fri Jan 19 23:12:59 2007
@@ -26,14 +26,14 @@
 #endif /* !__GNUC__ */
 
 /* endian macros */
-#if !defined(BE_16) || !defined(BE_32) || !defined(LE_16) || !defined(LE_32)
-#define BE_16(x)  ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
-#define BE_32(x)  ((((uint8_t*)(x))[0] << 24) | \
+#if !defined(AV_RB16) || !defined(AV_RB32) || !defined(AV_RL16) || !defined(AV_RL32)
+#define AV_RB16(x)  ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
+#define AV_RB32(x)  ((((uint8_t*)(x))[0] << 24) | \
                    (((uint8_t*)(x))[1] << 16) | \
                    (((uint8_t*)(x))[2] << 8) | \
                     ((uint8_t*)(x))[3])
-#define LE_16(x)  ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
-#define LE_32(x)  ((((uint8_t*)(x))[3] << 24) | \
+#define AV_RL16(x)  ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
+#define AV_RL32(x)  ((((uint8_t*)(x))[3] << 24) | \
                    (((uint8_t*)(x))[2] << 16) | \
                    (((uint8_t*)(x))[1] << 8) | \
                     ((uint8_t*)(x))[0])




More information about the ffmpeg-cvslog mailing list