On Sat, Apr 19, 2014 at 06:55:05PM -0400, Derek Buitenhuis wrote:
> Fixes artefacting.
> 
> Signed-off-by: Derek Buitenhuis <[email protected]>
> ---
>  libavcodec/fic.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/fic.c b/libavcodec/fic.c
> index 2d9da65..c56c57a 100644
> --- a/libavcodec/fic.c
> +++ b/libavcodec/fic.c
> @@ -146,7 +146,8 @@ static int fic_decode_block(FICContext *ctx, 
> GetBitContext *gb,
>          return AVERROR_INVALIDDATA;
>  
>      for (i = 0; i < num_coeff; i++)
> -        block[ff_zigzag_direct[i]] = get_se_golomb(gb) * ctx->qmat[i];
> +        block[ff_zigzag_direct[i]] = get_se_golomb(gb) *
> +                                     ctx->qmat[ff_zigzag_direct[i]];
>  
>      fic_idct_put(dst, stride, block);
>  
> -- 

alternatively one can write it as

   int j = ff_zigzag_direct[i];
   block[j] = get_se_golomb(gb) * ctx->qmat[j];


And the log message is a bit confusing, maybe this would be better:

use correct quantisation matrix index

Quantisation matrices are not zigzagged.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to