This patch still contains stray changes, whoever pushes this, please
fix or wait for an updated iteration.

On Wed, Jan 18, 2012 at 05:58:07PM +0200, Laurentiu Cristian Ion wrote:
> --- a/libavcodec/dxa.c
> +++ b/libavcodec/dxa.c
> @@ -85,17 +102,16 @@ static int decode_13(AVCodecContext *avctx,
> DxaDecContext *c, uint8_t* dst, uint
>              case 13:
>              case 14:
>              case 15:
> -                if(type == 1){
> -                    mask = AV_RB16(msk);
> -                    msk += 2;
> -                }else{
> +                if (type == 1)
> +                    mask = bytestream2_get_be16(&msk);
> +                else{
> +                    tmp3 = bytestream2_get_byte(&msk);

else {

And you could alternatively just leave the spacing as-is in this block.

>                      type -= 10;
> -                    mask = ((msk[0] & 0xF0) << shift1[type]) |
> ((msk[0] & 0xF) << shift2[type]);
> -                    msk++;
> +                    mask = ((tmp3 & 0xF0) << shift1[type]) | ((tmp3 &
> 0xF) << shift2[type]);

Your mailer breaks long lines apparently and thus mangles patches.

> @@ -188,34 +204,26 @@ static int decode_13(AVCodecContext *avctx,
> DxaDecContext *c, uint8_t* dst, uint
>      return 0;
>  }
> 
> -static int decode_frame(AVCodecContext *avctx, void *data, int
> *data_size, AVPacket *avpkt)
> +static int decode_frame(AVCodecContext *avctx,
> +                        void *data, int *data_size, AVPacket *avpkt)

unrelated

> -    if(avctx->get_buffer(avctx, &c->pic) < 0){
> +    if (avctx->get_buffer(avctx, &c->pic) < 0) {

ditto

> @@ -223,25 +231,32 @@ static int decode_frame(AVCodecContext *avctx,
>      switch(compr){
>      case -1:
>          c->pic.key_frame = 0;
>          c->pic.pict_type = AV_PICTURE_TYPE_P;
> -        if(c->prev.data[0])
> +        if (c->prev.data[0])

more

> @@ -256,36 +271,35 @@ static int decode_frame(AVCodecContext *avctx,
>          c->pic.pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : 
> AV_PICTURE_TYPE_I;
>          for(j = 0; j < avctx->height; j++){
> -            if(compr & 1){
> +            if (compr & 1) {

more

>      FFSWAP(AVFrame, c->pic, c->prev);
> -    if(c->pic.data[0])
> +    if (c->pic.data[0])

ditto

> @@ -309,9 +323,9 @@ static av_cold int decode_end(AVCodecContext *avctx)
>      DxaDecContext * const c = avctx->priv_data;
> 
>      av_freep(&c->decomp_buf);
> -    if(c->prev.data[0])
> +    if (c->prev.data[0])
>          avctx->release_buffer(avctx, &c->prev);
> -    if(c->pic.data[0])
> +    if (c->pic.data[0])
>          avctx->release_buffer(avctx, &c->pic);

more

> @@ -328,4 +342,3 @@ AVCodec ff_dxa_decoder = {
>      .capabilities   = CODEC_CAP_DR1,
>      .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
>  };
> -

unrelated as well

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

Reply via email to