Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PIXIV SUMMER BOOT CAMP 2022 成果発表「GIFから12倍速くする」

Mutsuha Asada
September 28, 2022

PIXIV SUMMER BOOT CAMP 2022 成果発表「GIFから12倍速くする」

Mutsuha Asada

September 28, 2022
Tweet

More Decks by Mutsuha Asada

Other Decks in Technology

Transcript

  1. 2 自己紹介 • 筑波大学 情報学群 情報科学類 1年次 • Nim /

    FFmpeg • 趣味: インディーズバンドとお笑い ◦ 35.7とダウ90000が好きです • Twitter: @momeemt momeemt ImageFluxコース
  2. AVIOContext *allocIOContext(void *bridge) { int bufferSize = 4096; uint8_t *buffer

    = (uint8_t *)av_malloc(bufferSize); return avio_alloc_context( buffer, bufferSize, 1, bridge, 0, golibmp4BridgeWriterWrite, golibmp4BridgeSeek ); } void freeIOContextBuffer(AVIOContext *ctx) { av_free(ctx->buffer); } I/Oを繋ぎ合わせる C側から関数ポインタを渡す 17
  3. 28 • color.NRGBA 型が color.Color 型にBoxingされる際にメモリアロケーションがされまくっ ていた ◦ → image.NRGBA

    型にアサーションすることでアロケーションを回避 エンコード最適化