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/ad_dk3adpcm.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/ad_dk3adpcm.c')
-rw-r--r-- | libmpcodecs/ad_dk3adpcm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libmpcodecs/ad_dk3adpcm.c b/libmpcodecs/ad_dk3adpcm.c index 9ee168dc45..d1792ee46b 100644 --- a/libmpcodecs/ad_dk3adpcm.c +++ b/libmpcodecs/ad_dk3adpcm.c @@ -33,7 +33,7 @@ #include <unistd.h> #include "config.h" -#include "mpbswap.h" +#include "ffmpeg_files/intreadwrite.h" #include "ad_internal.h" static const ad_info_t info = @@ -49,9 +49,6 @@ LIBAD_EXTERN(dk3adpcm) #define DK3_ADPCM_PREAMBLE_SIZE 16 -#define LE_16(x) (le2me_16(*(unsigned short *)(x))) -#define LE_32(x) (le2me_32(*(unsigned int *)(x))) - // useful macros // clamp a number between 0 and 88 #define CLAMP_0_TO_88(x) if (x < 0) x = 0; else if (x > 88) x = 88; @@ -154,8 +151,8 @@ static int dk3_adpcm_decode_block(unsigned short *output, unsigned char *input, int step; int diff; - sum_pred = LE_16(&input[10]); - diff_pred = LE_16(&input[12]); + sum_pred = AV_RL16(&input[10]); + diff_pred = AV_RL16(&input[12]); SE_16BIT(sum_pred); SE_16BIT(diff_pred); diff_channel = diff_pred; |