On 12/7/11, Diego Biurrun <[email protected]> wrote:
> 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 '='.
Done.
>
>> +        for (x = 0; x < avctx->width; x+=4) {
>
> spaces around '+='
>
Done.
>> +            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
>
Done.
>> @@ -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 '='.
>
Done.
>> --- 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?

Nope, that is incorrect fourcc (according to multimedia.cx wiki).
That line with that fourcc is apparently only used when encoding.
With this change mplayer can play avconv encoded stuff.

Attachment: cljr.diff
Description: Binary data

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

Reply via email to