On Thu, Feb 23, 2012 at 12:08:37PM +0530, Aneesh Dogra wrote:
> ---
> libavcodec/pcm.c | 104
> +++++++++++++++++++++++++++---------------------------
> 1 files changed, 52 insertions(+), 52 deletions(-)
>
> --- a/libavcodec/pcm.c
> +++ b/libavcodec/pcm.c
> @@ -46,10 +46,10 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx)
>
> - avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
> + avctx->block_align = avctx->channels *
> avctx->bits_per_coded_sample/8;
spaces around operators
> @@ -246,11 +246,11 @@ static av_cold int pcm_decode_init(AVCodecContext *
> avctx)
pcm_decode_init(AVCodecContext *avctx)
> -#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, (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, (v - offset) << shift); \
> + dst += size / 8; \
Move the backslashes to column 72 while you're at it.
> @@ -417,10 +417,10 @@ static int pcm_decode_frame(AVCodecContext *avctx, void
> *data,
> while (c--) {
> - *dst_int32_t++ = (bytestream_get_be16(&src) << 16) +
> ((*src8 &0xf0) << 8);
> - *dst_int32_t++ = (bytestream_get_be16(&src) << 16) +
> ((*src8++ &0x0f) << 12);
> + *dst_int32_t++ = (bytestream_get_be16(&src) << 16) +
> ((*src8 & 0xf0) << 8);
> + *dst_int32_t++ = (bytestream_get_be16(&src) << 16) +
> ((*src8++ & 0x0f) << 12);
You can right-align the 8 and 12 here while you're at it.
> @@ -445,16 +445,16 @@ static int pcm_decode_frame(AVCodecContext *avctx, void
> *data,
> n /= avctx->channels;
> - //unpack and de-planerize
> + // unpack and de-planerize
planArize
> *dst_int32_t++ = (src8[2] << 28) | (src8[1] << 20) |
> (src8[0] << 12) |
> ((src8[2] & 0xF) << 8) | src8[1];
> *dst_int32_t++ = (src8[4] << 24) | (src8[3] << 16) |
> ((src8[2] & 0xF0) << 8) | (src8[4] << 4) |
> (src8[3] >> 4);
Breaking these lines at the | would make this more readable.
Why did you skip the macros at the bottom of the file?
Also please align the Doxygen parameter descriptions.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel