summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_dk3adpcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/ad_dk3adpcm.c')
-rw-r--r--libmpcodecs/ad_dk3adpcm.c9
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;