Michael Niedermayer
796b20fa1c
avcodec/gif: use the whole allocated buffer
...
Fixes some gif encoding failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5dd5985e05
avcodec/gif: move BITSTREAM_WRITER_LE up
...
This prevents issues in case any header #includes put_bits.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
ec4e042f33
gif: remove unused AVFrame from encoder private context
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
bd03f99d05
gif: do not set avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
53efb2fa09
gif: Fix little endian specific code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
f5ede48fbb
lavc/gif: miscellaneous cosmetics.
12 years ago
Clément Bœsch
e1b35bdde2
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
12 years ago
Clément Bœsch
0f1250b7e5
lavc/gif: make possible to disable offsetting.
12 years ago
Clément Bœsch
13478b270a
gif: use only one graphic control extension block per image.
...
The encoder now doesn't produce any extra graphic control extension
block anymore. Only the image is encoded, and the muxer writing
its own GCE containing notably the timing information now includes the
optional palette transmitted through packet side data.
This commit avoid setting clashes between the two GCE, and reduce the
size of the generated file with pal8 output.
12 years ago
Clément Bœsch
90a56ebbe5
lavc/gif: avoid encoding 0x0 images.
...
It seems browsers don't like it very much.
12 years ago
Clément Bœsch
91a5b4d480
gif: remove outdated comments.
12 years ago
Clément Bœsch
8694e87127
lavc/gif: return more meaningful error code.
12 years ago
Clément Bœsch
71411b69a2
lavc/gif: merge two allocation checks.
12 years ago
Clément Bœsch
7b972d82b6
gif: reindent after previous commits.
12 years ago
Clément Bœsch
e065e8a4ea
lavc/gif: crop image when possible.
...
Increase compression when pictures are similar.
-f lavfi testsrc=300: 61M -> 21M
12 years ago
Clément Bœsch
635389ccfa
Cleanse GIF muxer and encoder.
...
This commit removes the badly duplicated code between the encoder and
the muxer. That may sound surprising, but the encoder is now responsible
from the encoding of the picture when muxing to a .gif file. It also
does not require anymore a manual user intervention such as a -pix_fmt
rgb24 to work properly. To summarize, output gif are now easier to
generate, code is saner and simpler, and files are smaller (thanks to
the lzw encoding which was unused so far with the default .gif output).
We can certainly make things even better, but this is the first step.
FATE is updated because of the output being produced by the encoder and
not the muxer (no lzw in the muxer), and in the seek test only the size
mismatches.
Fixes Ticket #2262
12 years ago
Diego Biurrun
ac9362c5d9
Move misplaced file author information where it belongs
12 years ago
Paul B Mahol
9648e1495b
lavc/gif: remove some obsolete/irrelevant chunks
...
Some code was copy pasted from muxer, which still
have same comments but unlike encoder they are still
relevant to muxer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Piotr Bandurski
e03ddbcd91
gifenc: support resolutions up to 65535x65535
...
Maybe someone can add a check in the second gif encoder (rgb24), because I'm not sure where it should be added.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
5dadfaa9f5
gifenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Anton Khirnov
577fed3b7c
gifenc: switch to encode2().
13 years ago
Carl Eugen Hoyos
0cc9949ead
Mark one colour as transparent in the gif image encoder
...
if the input palette contains at least one colour
that is more than 50% transparent.
Fixes ticket #715 .
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
13 years ago
Stefano Sabatini
ce5e49b0c2
replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*
14 years ago
Stefano Sabatini
975a1447f7
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Clément Bœsch
c56e71309e
In gif encoder, fix uninitialized value, patch by Clément Bœsch, ubitux at gmail dot com
...
Originally committed as revision 26303 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
2874c81cc8
Replace all remaining occurrences of AVERROR_NOMEM with
...
AVERROR(ENOMEM).
AVERROR_NOMEM is deprecated and will be dropped at the next libavutil
major bump.
Originally committed as revision 22791 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
f38e450746
use lzw compression in gif encoder
...
Originally committed as revision 20723 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
ab3faa8bf1
pass avctx as argument instead of width and height
...
Originally committed as revision 20710 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
af7436ae1d
remove useless params
...
Originally committed as revision 20709 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
cc26bf0d06
remove useless params
...
Originally committed as revision 20708 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Baptiste Coudurier
e4e8632aaf
move private context declaration at the top
...
Originally committed as revision 20707 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Reimar Döffinger
2ba8301769
Mark all pix_fmts and supported_framerates compound literals as const.
...
Makes no difference for gcc but at least icc can put them in .rodata then.
Originally committed as revision 19789 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
fb53b4a035
Rename pbBufPtr() to put_bits_ptr().
...
The new name is more readable and consistent with the FFmpeg naming
style.
Originally committed as revision 18497 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Stefano Sabatini
b275500706
Split bitstream.h, put the bitstream writer stuff in the new file
...
put_bits.h.
Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Daniel Verkamp
c385c0da22
remove no more needed fields in GIFContext, patch by Daniel Verkamp, daniel at drv dot nu
...
Originally committed as revision 17096 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Daniel Verkamp
dacfaf2373
remove dead rgb24 code, gif encoder now directly takes palette, patch by Daniel Verkamp, daniel at drv dot nu
...
Originally committed as revision 17095 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Daniel Verkamp
c33030bd7b
remove dead netscape loop header code in gif encoder, patch by Daniel Verkamp, daniel at drv dot nu
...
Originally committed as revision 17094 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Michael Niedermayer
271e6ddd4a
Fix list of input pix_fmts supported by GIF. This makes it work with swscale.
...
It also allows encoding GIF with a 4-bit palette and with a graycale one as a
side effect.
Originally committed as revision 17019 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
406792e7b0
cosmetics: Remove pointless period after copyright statement non-sentences.
...
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Baptiste Coudurier
6d32ec6ce9
cleanup gif, use BISTREAM_WRITER_LE
...
Originally committed as revision 16591 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago