• Andreas Rheinhardt's avatar
    avcodec/mpeg_er: Simplify disabling IDCT · 7b539ca3
    Andreas Rheinhardt authored
    The error resilience code does not make up block coefficients
    and therefore zeroes them in order to disable the IDCT.
    But this can be done in a simpler manner, namely by setting
    block_last_index to a negative value. Doing so also has
    the advantage that the dct_unquantize functions are never even
    called for those codecs that do not use ff_mpv_reconstruct_mb()
    for ordinary decoding (namely RV-30/40 and the VC-1 family).
    
    This approach would not work for intra macroblocks (there is always
    at least one coefficient for them and therefore there is no check
    for block_last_index for them), but this does not happen at all.
    Add an assert for this.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    7b539ca3
mpeg_er.c 3.95 KB