Similar to avcodec_find_best_pix_fmt(), but instead only compares two destination
pix fmts and selects one of these fmts as the best dest format when converting from
a given source format. Also, as opposed to avcodec_find_best_pix_fmt() which supports
only the first 64 defined pixel formats, this supports as input any of the defined
pixel formats.
Also replaces the old function to rely on the new function.
Signed-off-by: Matthew Einhorn <moiein2000@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Deprecate corresponding global option.
Ideally all x264 private options should be generated automatically, but
x264 doesn't provide the API for this yet.
The table is automatically generated from the definition of enum CodecID in
avcodec.h and contains the name of all known codecs, even those for which no
encoder nor decoder exists or is enabled.
The table is queried using the avcodec_get_name function.
If CONFIG_SMALL is true, the table is not compiled in; the avcodec_get_name
looks for names in the list of available decoders and encoders.
A pix_fmt_mask is obtained by bitwise or-ing two pixel format bits,
rather than doing a logical or.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
This fixed the problem where if there's more than 64 pixel formats
defined avcodec_find_best_pix_fmt() returns the wrong pixel format.
Signed-off-by: Matthew Einhorn <moiein2000@gmail.com>
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Use AV_PKT_FLAG_CORRUPT flag to mark packets that might be incomplete
or have errors. Formats that have a mean to validate their packets
should use this flag to deliver such information instead of silently
dropping the packets.
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
Before this, almost all module groups have been used for grouping functions
and fields in structures semantically. This causes them to not appear
properly in the file documentation and needlessly clutters up the "Modules"
index.
Additionally, this commit streamlines some spelling and appearances.
This helps catching cases where the format string doesn't
match what is passed in, or injection bugs where user data
is passed in as format string.
Signed-off-by: Martin Storsjö <martin@martin.st>
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet, move stereo interleaving from the iff demuxer to the
decoder, and introduce an 8svx_raw decoder which performs
stereo interleaving.
This is required for handling stereo data correctly, indeed samples
are stored like:
LLLLLL....RRRRRR
that is all left samples are at the beginning of the chunk, all right
samples at the end, so it is necessary to store and process the whole
buffer in order to decode each frame. Thus the decoder needs all the
audio chunk before it can return interleaved data.
Fix decoding of files 8svx_exp.iff and 8svx_fib.iff, fix trac issue #169.