diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-10 22:24:31 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:43 +0200 |
commit | d12c624ea8c58be40181cfbd7816f50e9e6c00ce (patch) | |
tree | 2c5706c559e3897f40e7912d72562440c5328a86 /libmpcodecs/vd_sgi.c | |
parent | 1663d97a112261c10f989b70547545048f9e31c3 (diff) | |
download | mpv-d12c624ea8c58be40181cfbd7816f50e9e6c00ce.tar.bz2 mpv-d12c624ea8c58be40181cfbd7816f50e9e6c00ce.tar.xz |
Use AV_RL* macros instead of typecasts where appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31680 b3059339-0415-0410-9bf9-f77b7e298cf2
100l compialtion fix and use AV_RB32.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31683 b3059339-0415-0410-9bf9-f77b7e298cf2
Current FFmpeg installs intreadwrite.h, but keep using the internal
version for now to keep the possibility of compiling against older
FFmpeg lib versions.
Diffstat (limited to 'libmpcodecs/vd_sgi.c')
-rw-r--r-- | libmpcodecs/vd_sgi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libmpcodecs/vd_sgi.c b/libmpcodecs/vd_sgi.c index e951542a8b..fff6d6f60b 100644 --- a/libmpcodecs/vd_sgi.c +++ b/libmpcodecs/vd_sgi.c @@ -23,7 +23,7 @@ #include "config.h" #include "mp_msg.h" -#include "libavutil/common.h" +#include "ffmpeg_files/intreadwrite.h" #include "mpbswap.h" #include "vd_internal.h" @@ -194,7 +194,7 @@ decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi) dest_row = mpi->planes[0] + mpi->stride[0] * (ysize - 1 - y); /* set start of next run (offsets are from start of header) */ - start_offset = be2me_32(*(uint32_t*) &starttab[y + z * ysize]); + start_offset = AV_RB32(&starttab[y + z * ysize]); rle_data = &data[start_offset]; @@ -261,13 +261,13 @@ static void read_sgi_header(unsigned char *buf, SGIInfo *info) { /* sgi data is always stored in big endian byte order */ - info->magic = be2me_16(*(unsigned short *) &buf[0]); + info->magic = AV_RB16(&buf[0]); info->rle = buf[2]; info->bytes_per_channel = buf[3]; - info->dimension = be2me_16(*(unsigned short *) &buf[4]); - info->xsize = be2me_16(*(unsigned short *) &buf[6]); - info->ysize = be2me_16(*(unsigned short *) &buf[8]); - info->zsize = be2me_16(*(unsigned short *) &buf[10]); + info->dimension = AV_RB16(&buf[4]); + info->xsize = AV_RB16(&buf[6]); + info->ysize = AV_RB16(&buf[8]); + info->zsize = AV_RB16(&buf[10]); } |