lavc/gif: add flag to enable transparency detection between frames.
authorClément Bœsch <ubitux@gmail.com>
Fri, 19 Apr 2013 17:01:37 +0000 (19:01 +0200)
committerClément Bœsch <ubitux@gmail.com>
Fri, 19 Apr 2013 21:59:21 +0000 (23:59 +0200)
commite1b35bdde2fc84de0435a1ab2d085452a0d5ad00
tree71702a6caf86ef6b82cd6d1de0a52641bb00d0ea
parent0f1250b7e52fc41abf4f050b41467639cb9fd7a3
lavc/gif: add flag to enable transparency detection between frames.

While this is not always optimal, in practice most of the common cases are.

  ffmpeg -i big_buck_bunny_1080p_h264.mov -ss 45 -vf scale=320:160 -gifflags -transdiff -frames:v 50 -y bbb-notrans.gif
  ffmpeg -i big_buck_bunny_1080p_h264.mov -ss 45 -vf scale=320:160 -gifflags +transdiff -frames:v 50 -y bbb-trans.gif

  -rw-r--r-- 1 ubitux ubitux 1.1M Apr 19 19:00 bbb-notrans.gif
  -rw-r--r-- 1 ubitux ubitux 378K Apr 19 19:00 bbb-trans.gif
libavcodec/gif.c
tests/ref/fate/gifenc-bgr4_byte
tests/ref/fate/gifenc-bgr8
tests/ref/fate/gifenc-gray
tests/ref/fate/gifenc-rgb4_byte
tests/ref/fate/gifenc-rgb8