On Mon, Jan 07, 2013 at 01:23:32PM +0100, Anton Khirnov wrote:
> --- a/libavcodec/mdec.c
> +++ b/libavcodec/mdec.c
> @@ -119,23 +119,25 @@ static inline int mdec_decode_block_intra(MDECContext 
> *a, DCTELEM *block, int n)
> -static inline void idct_put(MDECContext *a, int mb_x, int mb_y){
> -    DCTELEM (*block)[64]= a->block;
> -    int linesize= a->picture.linesize[0];
> +static inline void idct_put(MDECContext *a, int mb_x, int mb_y)
> +{
> +    DCTELEM (*block)[64] = a->block;
> +    int linesize = a->picture.linesize[0];
>  
>      uint8_t *dest_y  = a->picture.data[0] + (mb_y * 16* linesize             
>  ) + mb_x * 16;
>      uint8_t *dest_cb = a->picture.data[1] + (mb_y * 8 * 
> a->picture.linesize[1]) + mb_x * 8;

spaces around *

> @@ -146,7 +148,7 @@ static inline void idct_put(MDECContext *a, int mb_x, int 
> mb_y){
>      a->dsp.idct_put(dest_y + 8*linesize    , linesize, block[2]);
>      a->dsp.idct_put(dest_y + 8*linesize + 8, linesize, block[3]);

missing spaces around * and stray spaces before ,

> @@ -156,104 +158,105 @@ static int decode_frame(AVCodecContext *avctx,
>  
> -    a->qscale=  get_bits(&a->gb, 16);
> -    a->version= get_bits(&a->gb, 16);
> +    a->qscale  =  get_bits(&a->gb, 16);
> +    a->version = get_bits(&a->gb, 16);

stray double space

> -    a->last_dc[0]=
> -    a->last_dc[1]=
> -    a->last_dc[2]= 128;
> +    a->last_dc[0] = a->last_dc[1] = a->last_dc[2] = 128;

I think that was better before if you add a space before =.
Whatever you prefer ...

> -    p->qstride= 0;
> -    p->qscale_table= av_mallocz(a->mb_width);
> -    avctx->pix_fmt= AV_PIX_FMT_YUVJ420P;
> +    p->qstride      = 0;
> +    p->qscale_table = av_mallocz(a->mb_width);
> +    avctx->pix_fmt  = AV_PIX_FMT_YUVJ420P;

Oh, the poor kitten slain by the author of this unchecked malloc ...
(unrelated to the patch at hand of course, but oh, the poor kitten)

LGTM otherwise

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

Reply via email to