On Tue, Dec 06, 2011 at 03:26:37AM +0000, Paul B. Mahol wrote:
> This patch implements CLJR encoder.

Nice to see somebody finish that vestigial encoder.

> --- a/libavcodec/cljr.c
> +++ b/libavcodec/cljr.c
> @@ -94,24 +90,35 @@ static int decode_frame(AVCodecContext *avctx,
> +    for (y = 0; y < avctx->height; y++) {
> +        uint8_t *luma = &p->data[0][y * p->linesize[0]];
> +        uint8_t *cb = &p->data[1][y * p->linesize[1]];
> +        uint8_t *cr = &p->data[2][y * p->linesize[2]];

Align the '='.

> +        for (x = 0; x < avctx->width; x+=4) {

spaces around '+='

> +            put_bits(&pb, 5, luma[3] >> 3);
> +            put_bits(&pb, 5, luma[2] >> 3);
> +            put_bits(&pb, 5, luma[1] >> 3);
> +            put_bits(&pb, 5, luma[0] >> 3);
> +            luma+=4;

ditto

> @@ -160,6 +167,9 @@ AVCodec ff_cljr_encoder = {
>      .init           = encode_init,
>      .encode         = encode_frame,
> +    .pix_fmts = (const enum PixelFormat[]){
> +        PIX_FMT_YUV411P,
> +        PIX_FMT_NONE},
>      .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),

Align the '='.

> --- a/libavformat/riff.c
> +++ b/libavformat/riff.c
> @@ -266,7 +266,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
>      { CODEC_ID_PNG,          MKTAG('M', 'P', 'N', 'G') },
>      { CODEC_ID_PNG,          MKTAG('P', 'N', 'G', '1') },
> -    { CODEC_ID_CLJR,         MKTAG('c', 'l', 'j', 'r') },
> +    { CODEC_ID_CLJR,         MKTAG('C', 'L', 'J', 'R') },
>      { CODEC_ID_DIRAC,        MKTAG('d', 'r', 'a', 'c') },

Won't this have unwanted sideeffects when decoding files with that
fourcc?

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to