Commit 99212fac authored by ramiro's avatar ramiro

Use AV_XX16 macros

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8963 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 291a5274
...@@ -176,8 +176,8 @@ static inline void encode_from16(int bps, int le, int us, ...@@ -176,8 +176,8 @@ static inline void encode_from16(int bps, int le, int us,
for(;n>0;n--) { for(;n>0;n--) {
register int v = *(*samples)++; register int v = *(*samples)++;
v += usum; v += usum;
(*dst)[le] = v >> 8; if (le) AV_WL16(*dst, v);
(*dst)[1 - le] = v; else AV_WB16(*dst, v);
*dst += bps; *dst += bps;
} }
if (le) *dst -= bps - 2; if (le) *dst -= bps - 2;
...@@ -366,7 +366,11 @@ static inline void decode_to16(int bps, int le, int us, ...@@ -366,7 +366,11 @@ static inline void decode_to16(int bps, int le, int us,
register int n = src_len / bps; register int n = src_len / bps;
if (le) *src += bps - 2; if (le) *src += bps - 2;
for(;n>0;n--) { for(;n>0;n--) {
*(*samples)++ = ((*src)[le] << 8 | (*src)[1 - le]) + usum; register int v;
if (le) v = AV_RL16(*src);
else v = AV_RB16(*src);
v += usum;
*(*samples)++ = v;
*src += bps; *src += bps;
} }
if (le) *src -= bps - 2; if (le) *src -= bps - 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment