Commit 5886153d authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Paul B Mahol

avcodec/pcm: Cosmetics

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 69473bec
...@@ -300,23 +300,23 @@ static av_cold int pcm_decode_close(AVCodecContext *avctx) ...@@ -300,23 +300,23 @@ static av_cold int pcm_decode_close(AVCodecContext *avctx)
* @param shift Bitshift (bits) * @param shift Bitshift (bits)
* @param offset Sample value offset * @param offset Sample value offset
*/ */
#define DECODE(size, endian, src, dst, n, shift, offset) \ #define DECODE(size, endian, src, dst, n, shift, offset) \
for (; n > 0; n--) { \ for (; n > 0; n--) { \
uint ## size ## _t v = bytestream_get_ ## endian(&src); \ uint ## size ## _t v = bytestream_get_ ## endian(&src); \
AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \ AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \
dst += size / 8; \ dst += size / 8; \
} }
#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \ #define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \
n /= avctx->channels; \ n /= avctx->channels; \
for (c = 0; c < avctx->channels; c++) { \ for (c = 0; c < avctx->channels; c++) { \
int i; \ int i; \
dst = frame->extended_data[c]; \ dst = frame->extended_data[c]; \
for (i = n; i > 0; i--) { \ for (i = n; i > 0; i--) { \
uint ## size ## _t v = bytestream_get_ ## endian(&src); \ uint ## size ## _t v = bytestream_get_ ## endian(&src); \
AV_WN ## size ## A(dst, (uint ## size ##_t)(v - offset) << shift); \ AV_WN ## size ## A(dst, (uint ## size ##_t)(v - offset) << shift); \
dst += size / 8; \ dst += size / 8; \
} \ } \
} }
static int pcm_decode_frame(AVCodecContext *avctx, void *data, static int pcm_decode_frame(AVCodecContext *avctx, void *data,
......
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