Message ID | 20190919221706.16529-8-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 5886153dc3d3cc3730379391024148b4f141e6fe |
Headers | show |
applied On 9/20/19, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/pcm.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c > index d9176732d9..83850cc793 100644 > --- a/libavcodec/pcm.c > +++ b/libavcodec/pcm.c > @@ -300,23 +300,23 @@ static av_cold int pcm_decode_close(AVCodecContext > *avctx) > * @param shift Bitshift (bits) > * @param offset Sample value offset > */ > -#define DECODE(size, endian, src, dst, n, shift, offset) \ > - for (; n > 0; n--) { \ > - uint ## size ## _t v = bytestream_get_ ## endian(&src); \ > - AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); > \ > - dst += size / 8; \ > +#define DECODE(size, endian, src, dst, n, shift, offset) > \ > + for (; n > 0; n--) { > \ > + uint ## size ## _t v = bytestream_get_ ## endian(&src); > \ > + AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); > \ > + dst += size / 8; > \ > } > > -#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \ > - n /= avctx->channels; \ > - for (c = 0; c < avctx->channels; c++) { \ > - int i; \ > - dst = frame->extended_data[c]; \ > - for (i = n; i > 0; i--) { \ > - uint ## size ## _t v = bytestream_get_ ## endian(&src); \ > +#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) > \ > + n /= avctx->channels; > \ > + for (c = 0; c < avctx->channels; c++) { > \ > + int i; > \ > + dst = frame->extended_data[c]; > \ > + for (i = n; i > 0; i--) { > \ > + uint ## size ## _t v = bytestream_get_ ## endian(&src); > \ > 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, > -- > 2.20.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index d9176732d9..83850cc793 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -300,23 +300,23 @@ static av_cold int pcm_decode_close(AVCodecContext *avctx) * @param shift Bitshift (bits) * @param offset Sample value offset */ -#define DECODE(size, endian, src, dst, n, shift, offset) \ - for (; n > 0; n--) { \ - uint ## size ## _t v = bytestream_get_ ## endian(&src); \ - AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \ - dst += size / 8; \ +#define DECODE(size, endian, src, dst, n, shift, offset) \ + for (; n > 0; n--) { \ + uint ## size ## _t v = bytestream_get_ ## endian(&src); \ + AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \ + dst += size / 8; \ } -#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \ - n /= avctx->channels; \ - for (c = 0; c < avctx->channels; c++) { \ - int i; \ - dst = frame->extended_data[c]; \ - for (i = n; i > 0; i--) { \ - uint ## size ## _t v = bytestream_get_ ## endian(&src); \ +#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \ + n /= avctx->channels; \ + for (c = 0; c < avctx->channels; c++) { \ + int i; \ + dst = frame->extended_data[c]; \ + for (i = n; i > 0; i--) { \ + uint ## size ## _t v = bytestream_get_ ## endian(&src); \ 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,
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/pcm.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)