Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
e36db49b7b
avcodec: Add a min size parameter to ff_alloc_packet2()
...
This parameter can be used to inform the allocation code about how much
downsizing might occur, and can be used to optimize how to allocate the
packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
40cf1bbacc
Deprecate avctx.coded_frame
...
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.
There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.
The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
d6604b29ef
Gather all coded_frame allocations and free functions to a single place
...
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().
This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
91767360d8
a64multienc: Do not entangle coded_frame
...
This change (and the following ones of the same kind) is mainly to
simplify wrapping this section with an #if FF_API block later on.
No functional changes are applied, the fields of the context coded_frame
fields are directly initialized, instead of keeping a reference to the
coded_frame itself.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
29bbc1be48
avcodec/a64multienc: Assert that the Packet size does not grow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4da351ff0c
avcodec/a64multienc: simplify frame handling code
...
This also fixes a memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
87513d6545
avcodec/a64multienc: fix use of uninitialized values in to_meta_with_crop
...
Averaging over 2 pixels doesn't work correctly for the last pixel, because the
rest of the buffer is not initialized.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
ab759f8f4a
avcodec/a64multienc: initialize mc_meta_charset to zero
...
This fixes the use of uninitialized values in avpriv_do_elbg.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d96142e9af
avcodec/a64multienc: don't set incorrect packet size
...
This fixes invalid reads of the packet buffer in av_dup_packet
Based on patch by Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
39e4ed7c1d
avcodec/a64multienc: use av_frame_ref instead of copying the frame
...
This fixes freeing the frame buffer twice on cleanup leading to a crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
c63dd3f0a4
a64multi: check elbg return values
10 years ago
Michael Niedermayer
d5ba19e611
avcodec/a64multienc use av_freep()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Timothy Gu
cd3c85ac5c
a64multienc: remove dead assignment
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e4c180c05a
avcodec/a64multienc: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
984e339866
avcodec: Consistently name encoder init functions foo_encode_init
11 years ago
Anton Khirnov
13e9cc9ce0
a64multienc: use the AVFrame API properly.
11 years ago
Stefano Sabatini
fe55c31976
lavc/elbg: rename ff_ symbols to avpriv_, so they can be used in shared libs
...
In particular, allows the use of elbg in other FFmpeg libraries, required
by the pending elbg filter.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Clément Bœsch
3313b9cc2d
lavc: remove unecessary a64enc include.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Paul B Mahol
137e80817d
lavc: build some codecs only if they are actually enabled
...
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
55cc80dc29
a64multienc: 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
Michael Niedermayer
3d3b603f7f
a64multienc: fix "warning: buf may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
7340008f18
a64multienc: switch to encode2().
...
We have no decoder, so cannot test if the output is decodable.
13 years ago
Anton Khirnov
cfc6ab3199
a64multienc: don't write into output buffer when there's no output.
13 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Clément Bœsch
adba9c6352
Fix various unused variable warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 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
Mans Rullgard
a6e5d231e9
a64enc: make PixelFormat arrays const
14 years ago
Tobias Bindhammer
2a26520a97
Cosmetics, lots of.
...
Originally committed as revision 25348 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
bbc26bae11
Skip unnecessary calculations in 4col-mode.
...
Originally committed as revision 25347 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
90a3ffe276
Add possibility to crop screens inside of encoded frames.
...
Originally committed as revision 25346 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
93ee7f9c41
Add check for height when cropping.
...
Originally committed as revision 25345 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
a4d2690309
Introduce palette with dynamic size.
...
Originally committed as revision 25344 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
d1cacdb8dd
Checking return values of av_malloc(z) and report an error in case.
...
Originally committed as revision 25003 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
3156df450f
Clarify code/avoid possible bugs by using precalculated values that are used for extradata as well
...
Originally committed as revision 24941 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
6cd94998a4
enable a flexible lifetime
...
Originally committed as revision 24940 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
99d8166daf
Setting proper values in extradata for future use in muxer
...
Originally committed as revision 24939 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
d09c0a1666
cleanup a bit in a64multi_encode_frame()
...
Originally committed as revision 24914 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Tobias Bindhammer
9f63810491
added/extended some comments in a64multi_encode_frame()
...
Originally committed as revision 24913 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago