These macros are no longer needed after the s32 output was removed.
Change the relevant code to use av_clip_int16() instead of using
explicit limits.
Signed-off-by: Mans Rullgard <mans@mansr.com>
The size-32 DCT_II has a special implementation which doesn't use
the normal tables. Skipping allocation of these in this case saves
some memory.
Signed-off-by: Mans Rullgard <mans@mansr.com>
046f081b46 reorganized the CPPFLAGS to no
longer add -D_POSIX_C_SOURCE unconditionally, but only on systems (e.g.,
glibc based ones) that require it. As kFreeBSD uses glibc, it needs to
be treated similar.
Additionally, _BSD_SOURCE is turned on to enable some additional types
such as caddr_t, which are normally enabled on BSD but not with glibc.
Also remove code that overwrites the C versions of functions in
sws_init_swScale_altivec(), so that it uses the C functions of files
if no altivec-optimized version exists.
Surround memset and ff_vp8_dct_cat_prob by X() in order to fix iOS build
Includes patch by Luca Barbato <lu_zero@gentoo.org>.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Prefer parse_number_or_die() over atoi()/atol() parsing for the options:
-pass, -top, -vc, and -qscale.
Improve input validation.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
The later parsing of payload data depends on the configuration
being present. If it hasn't been configured properly yet,
parsing a data packet may lead to a crash.
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows the values to be used without changing C code and is closer to how
the other DEBUG flags work.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.
This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Yet another fix for the code originally designed for use without related_stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Calculate quality value once per stream in print_report().
Also fix segfault, as coded_frame can be NULL.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Format detection and internal frame initialization is moved to a
separate init_image() function, which is called when all the tags have
been read, and so both BitsPerSample and SamplesPerPixel information
has been collected.
This fixes decoding of the file 11.tiff from roundup issue #1925.
Based on a patch by Kostya Shishkov <kostya.shishkov@gmail.com>.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
This avoids the creation of a new AVStream instead of replacing it when
a stream reset occurs (track change with some webradios for example).
Signed-off-by: Diego Biurrun <diego@biurrun.de>
int/unsigned is the natural memory access type for CPUs, using sized types
for temporary variables, counters and similar just increases code size and
can possibly cause a slowdown.