Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (87)

Sur d’autres sites (15971)

  • avcodec/mpegvideo_enc : Reduce stack usage

    18 mai, par Andreas Rheinhardt
    avcodec/mpegvideo_enc : Reduce stack usage
    

    Multiple PutBitContexts are used when encoding partitioned
    frames. When there are multiple candidates for macroblock types,
    multiple states (namely the state before encoding the current MB,
    the best state among the ones already tried and the current one)
    need to be kept ; duplicates of the PutBitContexts are among this
    state. The temporary buffers for them are kept on the stack
    in encode_thread() and their size is quite generous (MAX_MB_SIZE
    - 3000 bytes). This commit uses tighter bounds, bringing the
    size of the pb2 buffer down to 15 bytes.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/mpeg4videoenc.h
    • [DH] libavcodec/mpegvideo_enc.c
  • avcodec/mpegvideo_enc : Don't use unnecessarily much stack

    25 mars, par Andreas Rheinhardt
    avcodec/mpegvideo_enc : Don't use unnecessarily much stack
    

    encode_thread() puts two MPVEncContexts (2*6516B here)
    on the stack and zeroes one of them in order to
    temporarily store the variables that get changed
    during encoding a macroblock (when there is more than
    one candidate type for a macroblock). This is wasteful
    and therefore this commit adds a small (328B here) structure
    to store exactly the fields that actually need to be backed
    up. Then one can extend MPVEncContext without fearing
    too use up to much stack.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/mpegvideo_enc.c
  • avcodec/ffv1enc : reduce stack usage

    24 mars, par James Almer
    avcodec/ffv1enc : reduce stack usage
    

    Fixes failures in some systems since 171060d5dc54d1526abde736a711ce234df632f2.
    This can be further improved by only allocating the arrays when needed.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/ffv1.h
    • [DH] libavcodec/ffv1enc.c