Reinhard Tartler [Sun, 6 Nov 2011 10:12:04 +0000 (11:12 +0100)]
Prepare for 0.8_beta1 snapshot release
Janne Grunau [Fri, 23 Dec 2011 10:10:37 +0000 (11:10 +0100)]
threads: check defines before using them in automatic thread detection
Janne Grunau [Fri, 23 Dec 2011 09:14:15 +0000 (10:14 +0100)]
pthread: include sys/types.h before sys/sysctl.h
Fixes compilation on FreeBSD with clang 3.
Anton Khirnov [Thu, 22 Dec 2011 14:40:26 +0000 (15:40 +0100)]
4xm: remove unused variables.
Alexander Strange [Mon, 12 Dec 2011 23:13:39 +0000 (18:13 -0500)]
h264: Fix a possible overread in decode_nal_units()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Anton Khirnov [Thu, 22 Dec 2011 16:32:29 +0000 (17:32 +0100)]
allfilters: fix type of avfilter_vsrc_buffer.
Sergey Radionov [Fri, 23 Dec 2011 03:37:48 +0000 (10:37 +0700)]
w32thread: call ResetEvent() in pthread_cond_broadcast().
Also add "volatile" to broadcast flag (since it is used from
multiple threads).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diego Biurrun [Thu, 22 Dec 2011 20:10:38 +0000 (21:10 +0100)]
build: fix standalone compilation of OMA muxer
The muxer depends on the id3v2 writing code, so link against it.
Diego Biurrun [Thu, 22 Dec 2011 20:09:23 +0000 (21:09 +0100)]
build: fix standalone compilation of Microsoft XMV demuxer
The demuxer depends on the RIFF codec tags code, so link against it.
Diego Biurrun [Thu, 22 Dec 2011 20:05:26 +0000 (21:05 +0100)]
build: fix standalone compilation of Core Audio Format demuxer
The demuxer depends on code from mov.c, which in turn depends on
code from mov_chan.c, so link against it.
Gaurav Narula [Mon, 12 Dec 2011 14:54:54 +0000 (20:24 +0530)]
kvmc: fix invalid reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Shitiz Garg [Wed, 14 Dec 2011 12:59:21 +0000 (18:29 +0530)]
4xm: Add a check in decode_i_frame to prevent buffer overreads
Fixes bugzilla #135
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Paul B Mahol [Wed, 21 Dec 2011 19:27:53 +0000 (19:27 +0000)]
adpcm: fix IMA SMJPEG decoding
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Janne Grunau [Wed, 21 Dec 2011 00:37:44 +0000 (01:37 +0100)]
options: set minimum for "threads" to zero
A negative number of threads does not make sense and 0 is used for
autodetection. Adds a symbolic name for autodetection.
Janne Grunau [Thu, 22 Dec 2011 20:10:07 +0000 (21:10 +0100)]
bsd: use number of logical CPUs as automatic thread count
Janne Grunau [Wed, 21 Dec 2011 00:26:19 +0000 (01:26 +0100)]
windows: use number of CPUs as automatic thread count
Janne Grunau [Wed, 21 Dec 2011 00:18:01 +0000 (01:18 +0100)]
linux: use number of CPUs as automatic thread count
Use sched_getaffinity to determine the number of logical CPUs.
Limits the number of threads to 16 since slice threading of H.264
seems to be buggy with more than 16 threads.
Janne Grunau [Wed, 21 Dec 2011 12:07:54 +0000 (13:07 +0100)]
pthreads: reset active_thread_type when slice thread_init returrns early
Paul B. Mahol [Wed, 21 Dec 2011 00:19:12 +0000 (00:19 +0000)]
v410dec: include correct headers
This file does not use anything from get_bits.h but needs
intreadwrite.h.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diego Biurrun [Thu, 22 Dec 2011 15:33:31 +0000 (16:33 +0100)]
Drop ALT_ prefix from BITSTREAM_READER_LE name.
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
Anton Khirnov [Wed, 21 Dec 2011 19:47:52 +0000 (20:47 +0100)]
lavfi: always build vsrc_buffer.
It's a part of public API.
Justin Ruggles [Wed, 21 Dec 2011 21:09:11 +0000 (16:09 -0500)]
ra144enc: zero the reflection coeffs if the filter is unstable
fixes use of uninitialized values if the filter is still unstable after using
the previous frame lpc coefficients.
Anton Khirnov [Wed, 21 Dec 2011 05:41:57 +0000 (06:41 +0100)]
sws: readd PAL8 to isPacked()
Fixes PAL8 to YUV conversion.
Alex Converse [Wed, 14 Dec 2011 02:49:06 +0000 (18:49 -0800)]
mov: Don't stick the QuickTime field ordering atom in extradata.
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.
Justin Ruggles [Wed, 21 Dec 2011 23:13:06 +0000 (18:13 -0500)]
truespeech: fix invalid reads in truespeech_apply_twopoint_filter()
fixes Bug 171
Justin Ruggles [Tue, 20 Dec 2011 04:16:51 +0000 (23:16 -0500)]
asfdec: add side data to ASFStream packet instead of output packet.
fixes memleak of side data
Justin Ruggles [Tue, 20 Dec 2011 04:53:04 +0000 (23:53 -0500)]
idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
This fixes demuxing of file where the first packet is not audio. Such files
are generated by our idroq muxer. It also fixes demuxing of audio only
idroq files.
Martin Storsjö [Fri, 16 Dec 2011 14:10:02 +0000 (16:10 +0200)]
nellymoserdec: Indicate that the decoder can handle changed parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Fri, 16 Dec 2011 10:59:26 +0000 (12:59 +0200)]
libavcodec: Apply parameter change side data when decoding audio
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Fri, 16 Dec 2011 10:48:24 +0000 (12:48 +0200)]
flvdec: Add param change side data if the sample rate or channels have changed
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Fri, 16 Dec 2011 10:48:09 +0000 (12:48 +0200)]
libavformat: Add a utility function for adding parameter change side data
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Thu, 15 Dec 2011 16:30:03 +0000 (18:30 +0200)]
libavcodec: Define a side data type for parameter changes
Also define a codec capability for codecs that can handle
parameters changed externally between decoded packets.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Thu, 15 Dec 2011 14:53:19 +0000 (16:53 +0200)]
aacdec: Handle new extradata passed as side data
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Thu, 15 Dec 2011 14:29:55 +0000 (16:29 +0200)]
flvdec: Export new AAC/H.264 extradata as side data on the next packet
Compared to just overwriting the old extradata, this has the
advantage of letting the decoder know exactly when the
extradata changed (otherwise it is changed immediately when the
new extradata packet is demuxed, even if there's old queued packets
awaiting to be decoded). This makes it easier for decoders to
actually react to the change, so they won't have to inspect
the extradata for each packet to see if it might have changed.
This works when sequentially playing a file with sample rate
changes, but if seeking past a new extradata packet in the
file, it obviously doesn't work properly. That case doesn't
work in flash player either, so it's probably ok not to handle
it.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Thu, 15 Dec 2011 14:11:49 +0000 (16:11 +0200)]
libavcodec: Define a side data type for new extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
Paul B Mahol [Sat, 10 Dec 2011 19:42:46 +0000 (14:42 -0500)]
flacdec: skip all track indices at once instead of looping.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Tomas Härdin [Mon, 26 Sep 2011 09:24:11 +0000 (11:24 +0200)]
mxf: Add PictureEssenceCoding UL for V210.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Tomas Härdin [Tue, 27 Sep 2011 09:14:59 +0000 (11:14 +0200)]
mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
This fixes playback of BRD38772509.mxf.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Daniel Kristjansson [Fri, 16 Sep 2011 16:16:30 +0000 (18:16 +0200)]
mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
Support Main Profile at High 1440 Level in MXF container,
using essence coding label from SMPTE RDD 9, table 6.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Baptiste Coudurier [Sun, 14 Aug 2011 22:40:54 +0000 (00:40 +0200)]
mxf: H.264/MPEG-4 AVC Intra support
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Martin Storsjö [Wed, 21 Dec 2011 13:32:39 +0000 (15:32 +0200)]
configure: Show whether the safe bitstream reader is enabled
Signed-off-by: Martin Storsjö <martin@martin.st>
Diego Biurrun [Wed, 21 Dec 2011 10:39:39 +0000 (11:39 +0100)]
x86: Tighten register constraints for decode_significance*_x86.
On 32-bit OS X with gcc 4.0/4.2 and shared libraries enabled, the ebx register
is not available, but required to assemble the functions.
This reverts commit 8742a4f to a simplified version of the original constraints.
Diego Biurrun [Tue, 20 Dec 2011 22:51:55 +0000 (23:51 +0100)]
Replace Subversion revisions in comments by Git hashes.
Diego Biurrun [Tue, 20 Dec 2011 17:57:30 +0000 (18:57 +0100)]
h264_cabac: synchronize decode_significance_*_x86 conditionals
The definition and the call site where under different #ifdefs.
Sergey Radionov [Wed, 21 Dec 2011 02:08:56 +0000 (09:08 +0700)]
w32threads: wait for the waked thread in pthread_cond_signal.
This fixes a deadlock VLC triggered with multithreaded decoding. The
wait forces one of the current waiters to wake and not the thread
which calls pthread_cond_signal() itself.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Alex Converse [Tue, 20 Dec 2011 18:36:27 +0000 (10:36 -0800)]
aacdec: Cleanup decode_ics_info.
Remove unused function argument.
Return an AVERROR.
Don't zero out ICS on failure.
Sergey Radionov [Wed, 21 Dec 2011 02:19:10 +0000 (09:19 +0700)]
network: properly declare WSADATA in windows
Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Wed, 21 Dec 2011 01:50:57 +0000 (02:50 +0100)]
fate: account for NUT 10bit support
Some libavifilter tests use NUT as output even if the produced
files were not decodable. The support for 10bit introduced in
432f0e5b7d and
91b1e6f0c changed the hashes.
Mans Rullgard [Tue, 20 Dec 2011 16:32:06 +0000 (16:32 +0000)]
build: error on mixed declarations and code
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 20 Dec 2011 19:07:49 +0000 (19:07 +0000)]
postproc: altivec: fix remaining mixed declarations and code
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 20 Dec 2011 19:03:25 +0000 (19:03 +0000)]
postproc: altivec: untemplate some variable names
These variables are now in separate scopes and thus do not
need unique names.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 20 Dec 2011 18:31:43 +0000 (18:31 +0000)]
postproc: altivec: fix trivial cases of mixed declarations and code
This moves declarations without initialisers or with constant
initialisers to the start of a block, and adds do {} while(0)
around some macros, thus allowing declarations within them.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Rafaël Carré [Tue, 13 Dec 2011 14:32:34 +0000 (15:32 +0100)]
lavc: always align height by 32 pixel
Interlaced content for most codec requires it.
This patch is a stop-gap pending a serious rework to support
codecs with non 16 pixel macroblocks.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Sun, 4 Dec 2011 14:56:40 +0000 (15:56 +0100)]
raw: add 10bit YUV definitions
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Luca Barbato [Sun, 4 Dec 2011 14:56:39 +0000 (15:56 +0100)]
nut: support 10bit YUV
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diego Biurrun [Tue, 20 Dec 2011 09:06:49 +0000 (10:06 +0100)]
mpegvideo_enc: separate declarations and statements
libavcodec/mpegvideo_enc.c:1209: warning: ISO C90 forbids mixed declarations and code
Diego Biurrun [Tue, 20 Dec 2011 14:38:18 +0000 (15:38 +0100)]
oma: make header compile standalone
Diego Biurrun [Tue, 20 Dec 2011 13:42:54 +0000 (14:42 +0100)]
vp3: Reorder some functions to fix VP3 build with Theora disabled.
Diego Biurrun [Tue, 20 Dec 2011 17:26:54 +0000 (18:26 +0100)]
build: fix standalone compilation of ADX encoder
The encoder depends on the common code, so link against it.
Diego Biurrun [Tue, 20 Dec 2011 10:37:56 +0000 (11:37 +0100)]
build: fix standalone compilation of ADPCM decoders
The generic ADPCM codes depends on the ADPCM data tables.
Diego Biurrun [Tue, 20 Dec 2011 10:34:05 +0000 (11:34 +0100)]
build: fix standalone compilation of mpc7/mpc8 decoders
These decoders depend on the mpegaudio DSP code.
Aneesh Dogra [Mon, 19 Dec 2011 22:24:50 +0000 (03:54 +0530)]
4xm: Use bytestream2 functions to prevent overreads
Fixes Bug 110.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Aneesh Dogra [Mon, 19 Dec 2011 22:24:50 +0000 (03:54 +0530)]
bytestream: add a new set of bytestream functions with overread checking
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Alex Converse [Mon, 19 Dec 2011 18:48:57 +0000 (10:48 -0800)]
mpegts: Suppress invalid timebase warnings on DMB streams.
timestamp_len and timestamp_res intialize to zero.
Alex Converse [Mon, 19 Dec 2011 18:41:22 +0000 (10:41 -0800)]
mpegts: Fix typo in handling sections in the PMT.
This was an error rebasing
4682a1dc3aa2554ad7077f5db32d0f2d598d018e for
commit. The "pes" variable guaranteed to be NULL in that block.
Martin Storsjö [Tue, 20 Dec 2011 08:53:18 +0000 (10:53 +0200)]
vc1dec: Use the right pointer type for the tmp pointer
This fixes warnings about assignment from incompatible
pointer type.
Signed-off-by: Martin Storsjö <martin@martin.st>
Janne Grunau [Mon, 19 Dec 2011 17:11:44 +0000 (18:11 +0100)]
h264: clear trailing bits in partially parsed NAL units
Trailing bits are likely to be non-zero if the NAL unit is truncated.
Clearing the bits make overreads of the bitstream less likely in this
case. Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which
has a forbidden byte sequence of 0x00 0x00 0x00 in it SPS.
Aneesh Dogra [Mon, 19 Dec 2011 20:08:19 +0000 (01:38 +0530)]
vc1: Handle WVC1 interlaced stream
Signed-off-by: Martin Storsjö <martin@martin.st>
Aneesh Dogra [Mon, 19 Dec 2011 18:30:30 +0000 (00:00 +0530)]
xl: Fix overreads
Signed-off-by: Martin Storsjö <martin@martin.st>
Luca Barbato [Sat, 17 Dec 2011 13:08:11 +0000 (14:08 +0100)]
mpegts: rename payload_index to payload_size
It holds the size of the current payload.
Luca Barbato [Sun, 2 Oct 2011 21:05:29 +0000 (23:05 +0200)]
segment: introduce segmented chain muxer
It behaves similarly to image2 muxer
Luca Barbato [Wed, 14 Dec 2011 19:27:11 +0000 (20:27 +0100)]
lavu: add AVERROR_BUG error value
It should be used to mark codepath that can be reached only through
programming error.
Michael Niedermayer [Tue, 13 Dec 2011 23:38:23 +0000 (00:38 +0100)]
avplay: clear pkt_temp when pkt is freed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Asen Lekov [Sun, 18 Dec 2011 23:32:54 +0000 (01:32 +0200)]
qcelpdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diego Biurrun [Mon, 19 Dec 2011 13:54:58 +0000 (14:54 +0100)]
qcelpdec: cosmetics: drop some pointless parentheses
Diego Biurrun [Sun, 18 Dec 2011 12:13:02 +0000 (13:13 +0100)]
x86: conditionally compile dnxhd encoder optimizations
Janne Grunau [Mon, 19 Dec 2011 02:00:36 +0000 (03:00 +0100)]
Revert "h264: skip start code search if the size of the nal unit is known"
This reverts commit
87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.
Nathan Adil Maxson [Sun, 18 Dec 2011 16:11:27 +0000 (08:11 -0800)]
swscale: fix formatting and indentation of unscaled conversion routines.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Janne Grunau [Sun, 18 Dec 2011 21:42:36 +0000 (22:42 +0100)]
h264: skip start code search if the size of the nal unit is known
Start code emulation prevention is only required in Annex B bytestream
packed NAL units. For other coding formats the size is already known.
Looking for a start code prefix can result in false positives like in
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4
which has a false positive in the SPS.
Paul B. Mahol [Sat, 17 Dec 2011 17:58:06 +0000 (17:58 +0000)]
cljr: fix buf_size sanity check
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Shitiz Garg [Thu, 15 Dec 2011 22:20:21 +0000 (22:20 +0000)]
cljr: Check if width and height are positive integers
Width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Mans Rullgard [Sun, 18 Dec 2011 22:15:04 +0000 (22:15 +0000)]
APIchanges: fill in revision for AVFrame.age deprecation
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sun, 18 Dec 2011 20:41:42 +0000 (20:41 +0000)]
avcodec: deprecate AVFrame.age
This was intended as an optimisation for skipped blocks in MPEG2
P-frames and never used elsewhere. Removing this "optimisation"
speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9).
Signed-off-by: Mans Rullgard <mans@mansr.com>
Justin Ruggles [Sun, 18 Dec 2011 18:21:27 +0000 (13:21 -0500)]
4xm: remove unneeded check for remaining unused data.
This is unnecessary complication that only prints a message and does not
affect decoding.
Anton Khirnov [Tue, 6 Dec 2011 06:51:54 +0000 (07:51 +0100)]
lavf: force threads to 1 in avformat_find_stream_info()
Fixes avformat_find_stream_info() on streams with number of frames <
thread count.
Ronald S. Bultje [Sun, 18 Dec 2011 16:27:43 +0000 (08:27 -0800)]
swscale: fix overflows in vertical scaling at top/bottom edges.
This fixes integer multiplication overflows in RGB48 output
(vertical) scaling as detected by IOC. What happens is that for
certain types of filters (lanczos, spline, bicubic), the
intermediate sum of coefficients in the middle of a filter can
be larger than the fixed-point equivalent of 1.0, even if the
final sum is 1.0. This is fine and we support that.
However, at frame edges, initFilter() will merge the coefficients
for the off-screen pixels into the top or bottom pixel, such as
to emulate edge extension. This means that suddenly, a single
coefficient can be larger than the fixed-point equivalent of
1.0, which the vertical scaling routines do not support.
Therefore, remove the merging of coefficients for edges for
the vertical scaling filter, and instead add edge detection
to the scaler itself so that it copies the pointers (not data)
for the edges (i.e. it uses line[0] for line[-1] as well), so
that a single coefficient is never larger than the fixed-point
equivalent of 1.0.
Michael Karcher [Fri, 21 Oct 2011 21:32:33 +0000 (23:32 +0200)]
lavf: add OpenMG audio muxer.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Anton Khirnov [Sat, 17 Dec 2011 14:23:13 +0000 (15:23 +0100)]
omadec: split data that will be used in the muxer to a separate file.
Anton Khirnov [Sat, 17 Dec 2011 14:00:04 +0000 (15:00 +0100)]
lavf: rename oma.c -> omadec.c
Uoti Urpala [Sun, 18 Dec 2011 14:17:07 +0000 (16:17 +0200)]
tmv decoder: set correct pix_fmt
Previously the decoder only worked if the user had set avctx->pix_fmt
manually. For some reason the libavformat tmv demuxer sets this, so
the problem was not visible in avplay etc.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Mans Rullgard [Sat, 17 Dec 2011 15:05:24 +0000 (15:05 +0000)]
build: link test programs with static libraries
Many of the test programs directly access internal symbols not
exported from the shared libraries. This allows tests to run
when configured with shared libraries.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 17 Dec 2011 21:35:50 +0000 (21:35 +0000)]
dct-test: remove unused variable cropTbl
Signed-off-by: Mans Rullgard <mans@mansr.com>
Ronald S. Bultje [Sat, 17 Dec 2011 19:56:40 +0000 (19:56 +0000)]
swscale: fix overflow in gray16 vertical scaling.
This fixes the same overflow as in the RGB48/16-bit YUV scaling;
some filters can overflow both negatively and positively (e.g.
spline/lanczos), so we bias a signed integer so it's "half signed"
and "half unsigned", and can cover overflows in both directions
while maintaining full 31-bit depth.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 17 Dec 2011 19:40:16 +0000 (19:40 +0000)]
get_bits: remove LAST_SKIP_CACHE macro
This macro is empty since the removal of the A32 bitstream reader.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 17 Dec 2011 18:45:46 +0000 (18:45 +0000)]
swscale: fix integer overflows in RGB pixel writing.
We're shifting individual components (8-bit, unsigned) left by 24,
so making them unsigned should give the same results without the
overflow.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Janne Grunau [Fri, 16 Dec 2011 22:04:30 +0000 (23:04 +0100)]
swscale: add endian conversion for RGB555 and RGB444 pixel formats
Add a macro to shorten the if condition.
Ronald S. Bultje [Fri, 16 Dec 2011 00:03:54 +0000 (00:03 +0000)]
swscale: fix overflows in output of RGB48 pixels.
For certain types of filters where the intermediate sum of coefficients
can go above the fixed-point equivalent of 1.0 in the middle of a filter,
the sum of a 31-bit calculation can overflow in both directions and can
thus not be represented in a 32-bit signed or unsigned integer. To work
around this, we subtract 0x40000000 from a signed integer base, so that
we're halfway signed/unsigned, which makes it fit even if it overflows.
After the filter finishes, we add the scaled bias back after a shift.
We use the same trick for 16-bit bpc YUV output routines.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 17 Dec 2011 01:07:32 +0000 (01:07 +0000)]
get_bits: remove strange/obsolete comments
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 17 Dec 2011 01:05:35 +0000 (01:05 +0000)]
get_bits: whitespace (mostly) cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
Janne Grunau [Fri, 16 Dec 2011 18:38:53 +0000 (19:38 +0100)]
swscale: add rgb565 endianess conversion