• Andreas Rheinhardt's avatar
    avcodec/mips/aaccoder_mips: Remove MIPS-specific aaccoder · f1b08b8a
    Andreas Rheinhardt authored
    ff_aac_coder_init_mips() modifies a static const structure of
    function pointers. This will crash if the binary uses relro
    and is a data race in any case.
    
    Furthermore it points to a maintainability issue: The
    AACCoefficientsEncoder structures have been constified
    in commit fd9212f2,
    a Libav commit merged in 318778de.
    Libav did not have the MIPS-specific AAC code and so this was
    fine for them; yet FFmpeg had them, but this was not recognized.
    
    Commit 75a099fc points to another
    maintainability issue: Contrary to ordinary DSP code, this code
    here is way more complex and needs to be constantly kept in sync
    with the ordinary code which it mimicks and replaces. Said commit
    is the only commit actually changing aaccoder.c in the last few
    years and the same change has not been performed for the MIPS
    clone; before that, it even happened several times that the mips
    code was broken due to changes of the generic code (see commits
    97437bd1 and
    de262d01 or
    860dbe02 or
    933309a6 or
    b65ffa31). This might even lead
    to scenarios where someone changing non-dsp aacenc code would
    have to modify mips inline asm in order to keep them in sync.
    This is obviously a significant burden (if the AAC encoder were
    actively developed).
    
    Finally, the code does not even compile here due to errors like
    "Error: float register should be even, was 1".
    Reviewed-by: 's avatarLynne <dev@lynne.ee>
    Reviewed-by: 's avatarJean-Baptiste Kempf <jb@videolan.org>
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    f1b08b8a
aacenc.c 54.1 KB