On Mon, Jan 25, 2016 at 12:56:11PM -0500, Vittorio Giovara wrote:
> This allows untangling the eatqi decoder from the MPEG-1 decoder.
> 
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
>  libavcodec/eatqi.c     |   9 ++++-
>  libavcodec/mpeg12.c    |  89 +++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/mpeg12.h    |   6 ++-
>  libavcodec/mpeg12dec.c | 101 
> +++++++------------------------------------------
>  4 files changed, 114 insertions(+), 91 deletions(-)

The moved code has lots of cosmetic changes mixed in.  It's a PITA to
review.  Please refrain from cosmetic changes or do them separately.

> +    ff_dlog(NULL, "dc=%d diff=%d\n", dc, diff);
> -    ff_dlog(s->avctx, "dc=%d diff=%d\n", dc, diff);

Just throw it away IMO.

> +        CLOSE_READER(re, gb);
> +    }
> +
> +    if (i > 63)
> +        i = AVERROR_INVALIDDATA;
> +
> +    return i;
> +}
> --- a/libavcodec/mpeg12dec.c
> +++ b/libavcodec/mpeg12dec.c
> @@ -137,92 +137,6 @@ static int mpeg_decode_motion(MpegEncContext *s, int 
> fcode, int pred)
> -        CLOSE_READER(re, &s->gb);
> -    }
> -
> -    check_scantable_index(s, i);
> -
> -    s->block_last_index[n] = i;
> -    return 0;
> -}
> @@ -839,9 +753,20 @@ FF_ENABLE_DEPRECATION_WARNINGS
>                          return ret;
>              }
>          } else {
> -            for (i = 0; i < 6; i++)
> -                if ((ret = mpeg1_decode_block_intra(s, *s->pblocks[i], i)) < 
> 0)
> +            for (i = 0; i < 6; i++) {
> +                ret = ff_mpeg1_decode_block_intra(&s->gb,
> +                                                  s->intra_matrix,
> +                                                  
> s->intra_scantable.permutated,
> +                                                  s->last_dc, *s->pblocks[i],
> +                                                  i, s->qscale);
> +                if (ret < 0) {
> +                    av_log(s->avctx, AV_LOG_ERROR, "ac-tex damaged at %d 
> %d\n",
> +                           s->mb_x, s->mb_y);
>                      return ret;
> +                }
> +
> +                s->block_last_index[i] = ret;
> +            }
>          }
>      } else {
>          if (mb_type & MB_TYPE_ZERO_MV) {

Why is block_last_index suddenly only set in one place?  Looks suspicious
and unrelated to me.

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

Reply via email to