Diego Biurrun [Wed, 4 Apr 2012 12:53:25 +0000 (14:53 +0200)]
h264: Factorize declaration of mb_sizes array.
Anton Khirnov [Sun, 1 Apr 2012 13:18:00 +0000 (15:18 +0200)]
vsrc_buffer: when no frame is available, return an error instead of segfaulting.
Anton Khirnov [Sun, 1 Apr 2012 16:56:26 +0000 (18:56 +0200)]
configure: add dl to frei0r extralibs.
Christophe GISQUET [Wed, 21 Mar 2012 19:46:29 +0000 (20:46 +0100)]
dsputil x86: use SSE float instruction instead of SSE2 integer equivalent
All the more required since the users are pure SSE functions.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Christophe GISQUET [Mon, 19 Mar 2012 15:34:39 +0000 (16:34 +0100)]
dsputil x86: remove deprecated parameter from scalarproduct_int16 prototype
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Christophe GISQUET [Mon, 26 Mar 2012 00:29:09 +0000 (02:29 +0200)]
vp8dsp x86: perform rounding shift with a single instruction
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Ronald S. Bultje [Wed, 4 Apr 2012 18:16:23 +0000 (11:16 -0700)]
fate: add BMP tests.
Ronald S. Bultje [Wed, 4 Apr 2012 17:50:29 +0000 (10:50 -0700)]
swscale: handle complete dimensions for monoblack/white.
Fixes bug 269.
Diego Biurrun [Wed, 4 Apr 2012 08:06:58 +0000 (10:06 +0200)]
aacenc: Mark deinterleave_input_samples argument as const.
This fixes the warning:
libavcodec/aacenc.c:524: warning: passing argument 2 of ‘deinterleave_input_samples’ discards qualifiers from pointer target type
Diego Biurrun [Wed, 4 Apr 2012 08:08:37 +0000 (10:08 +0200)]
vf_unsharp: Mark readonly variable as const.
This fixes the following warning:
libavfilter/vf_unsharp.c:106: warning: initialization discards qualifiers from pointer target type
Anton Mitrofanov [Mon, 2 Apr 2012 16:25:19 +0000 (09:25 -0700)]
h264: fix 4:2:2 PCM-macroblocks decoding
Fixes bug 239.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Derek Buitenhuis [Tue, 3 Apr 2012 21:36:49 +0000 (17:36 -0400)]
w32threads: Make pthread_cond_wait follow POSIX
pthread_cond_wait is supposed to return an integer,
and indeed does sometimes. Fix its function declaration
to match its behavior and POSIX.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diego Biurrun [Fri, 30 Mar 2012 21:34:22 +0000 (23:34 +0200)]
cosmetics: Consistently place static, inline and av_cold attributes/keywords.
Diego Biurrun [Sat, 31 Mar 2012 11:41:16 +0000 (13:41 +0200)]
sbrdsp: Use standard multiple inclusion guards.
Aneesh Dogra [Fri, 30 Mar 2012 15:33:02 +0000 (21:03 +0530)]
pcm: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Piotr Bandurski [Wed, 28 Dec 2011 04:50:27 +0000 (04:50 +0000)]
rawdec: Support fourccs YV16 and YV24
Raffaele Sena [Wed, 7 Mar 2012 18:21:16 +0000 (10:21 -0800)]
rtmp: implement bandwidth notification
Improve compatibility with some servers.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Samuel Pitoiset [Mon, 2 Apr 2012 20:50:38 +0000 (22:50 +0200)]
rtmp: update supported audio codecs value
The audio codecs property is composed by all values except
SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are
unused.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Hans-Kristian Arntzen [Sun, 6 Nov 2011 09:43:47 +0000 (10:43 +0100)]
Unscaled Planar RGB -> RGB support in swscale.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sat, 31 Mar 2012 19:57:26 +0000 (15:57 -0400)]
FATE: Add RALF decoding test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Anton Khirnov [Thu, 29 Mar 2012 09:22:40 +0000 (11:22 +0200)]
vsrc_buffer: allow buffering arbitrary number of frames.
Anton Khirnov [Thu, 29 Mar 2012 05:02:27 +0000 (07:02 +0200)]
vf_scale: avoid a pointless memcpy in no-op conversion.
I.e. just pass the buffer along when src parameters == dst parameters.
Anton Khirnov [Fri, 23 Mar 2012 14:14:40 +0000 (15:14 +0100)]
avfiltergraph: try to reduce format conversions in filters.
Current code, with a filterchain such as
(input - yuv411) -> (scale - any) -> (sink - any)
will result in yuv420 being chosen for the second link, which is clearly
not right.
This commit attempts to improve in the following way:
repeat until convergence:
loop over all filters
find input link with exactly one format
force this format on all output links of the same type (if possible)
Anton Khirnov [Sun, 18 Mar 2012 10:27:38 +0000 (11:27 +0100)]
avfiltergraph: add an AVClass to AVFilterGraph on next major bump.
It will be used for logging, possibly also AVOptions.
Anton Khirnov [Sat, 31 Mar 2012 05:52:42 +0000 (07:52 +0200)]
id3v2: fix skipping extended header in id3v2.4
In v2.4, the length includes the length field itself.
Michael Niedermayer [Thu, 29 Mar 2012 17:52:21 +0000 (17:52 +0000)]
apedec: check bits <= 32.
Fixes a floating-point exception further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Aneesh Dogra [Fri, 30 Mar 2012 18:14:06 +0000 (23:44 +0530)]
cavs: Remove unused code.
The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Reimar Döffinger [Sat, 18 Feb 2012 20:21:20 +0000 (21:21 +0100)]
oggenc: fix condition when not to flush due to keyframe granule.
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Andres Gonzalez [Thu, 27 Jan 2011 09:14:21 +0000 (10:14 +0100)]
oggenc: add pagesize option to set preferred page size
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Justin Ruggles [Thu, 29 Mar 2012 16:01:42 +0000 (12:01 -0400)]
libspeexdec: set frame size in libspeex_decode_init()
This fixes speex decoding, which was broken in
85469f1c.
Franz Brauße [Fri, 30 Mar 2012 18:40:14 +0000 (14:40 -0400)]
smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diego Biurrun [Thu, 29 Mar 2012 12:15:16 +0000 (14:15 +0200)]
h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing()
Diego Biurrun [Thu, 29 Mar 2012 11:52:21 +0000 (13:52 +0200)]
h264: Make ff_h264_decode_end() static, it is not used externally.
Also drop the now unnecessary ff_ prefix from its name.
Diego Biurrun [Fri, 30 Mar 2012 00:27:05 +0000 (02:27 +0200)]
output-example: K&R formatting cosmetics, comment spelling fixes
Luca Barbato [Thu, 29 Mar 2012 22:28:00 +0000 (15:28 -0700)]
avf: make the example output the proper message
av_dump_format needs the codecs opened in order to print
them.
Luca Barbato [Thu, 29 Mar 2012 19:00:37 +0000 (12:00 -0700)]
avf: fix audio writing in the output-example
av_init_packet does not reset data and size fields in AVPacket,
avcodec_encode_audio2 can use preallocated AVPacket.
Ronald S. Bultje [Wed, 28 Mar 2012 19:56:07 +0000 (12:56 -0700)]
mov: don't overwrite existing indexes.
Prevents all kind of badness if files contain multiple
indexes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Ronald S. Bultje [Thu, 29 Mar 2012 03:00:38 +0000 (20:00 -0700)]
lzw: fix potential integer overflow.
Ronald S. Bultje [Thu, 29 Mar 2012 17:25:04 +0000 (10:25 -0700)]
truemotion: forbid invalid VLC bitsizes and token values.
SHOW_UBITS() is only defined up to n_bits is 25, therefore forbid
values larger than this in get_vlc2() (max_bits). tokens[][] can be
used as an index in deltas[], which has a size of 64, so ensure the
values are smaller than that.
This prevents crashes on corrupt bitstreams.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Ronald S. Bultje [Thu, 29 Mar 2012 16:29:03 +0000 (09:29 -0700)]
truemotion2: handle out-of-frame motion vectors through edge extension.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Martin Storsjö [Wed, 28 Mar 2012 17:37:13 +0000 (20:37 +0300)]
configure: Check for a different SDL function
This one is available both in SDL 1.2 and in 1.3 (which is the current
version available e.g. in macports), while 1.3 doesn't contain
SDL_Linked_Version().
The current check for SDL_Linked_Version() (available since SDL 1.2.13)
was added in
8f1b06c8, because including the headers for SDL_Init()
redirects the main() function, requiring the main function signature
to match the one of SDL_main (including argc/argv).
Signed-off-by: Martin Storsjö <martin@martin.st>
Kostya Shishkov [Thu, 29 Mar 2012 10:08:07 +0000 (12:08 +0200)]
mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
Kostya Shishkov [Thu, 29 Mar 2012 10:07:35 +0000 (12:07 +0200)]
id3v2: add another mimetype for JPEG image
Ronald S. Bultje [Thu, 29 Mar 2012 00:06:00 +0000 (17:06 -0700)]
lzw: prevent buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Mashiat Sarker Shakkhar [Wed, 28 Mar 2012 18:12:13 +0000 (11:12 -0700)]
WMAL: Remove inaccurate and unnecessary doxy
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Ronald S. Bultje [Wed, 28 Mar 2012 23:32:27 +0000 (16:32 -0700)]
h264: fix cabac-on-stack after safe cabac reader.
Ronald S. Bultje [Wed, 28 Mar 2012 18:53:13 +0000 (11:53 -0700)]
truemotion2: convert packet header reading to bytestream2.
Also use correct buffer sizes in calls to tm2_read_stream(). Together,
this prevents overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Ronald S. Bultje [Wed, 28 Mar 2012 17:22:25 +0000 (10:22 -0700)]
asf: only set index_read if the index contained entries.
This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
Ronald S. Bultje [Sat, 17 Mar 2012 16:09:41 +0000 (09:09 -0700)]
cabac: add overread protection to BRANCHLESS_GET_CABAC().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Ronald S. Bultje [Sat, 17 Mar 2012 16:04:32 +0000 (09:04 -0700)]
cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
Ronald S. Bultje [Sat, 17 Mar 2012 16:03:22 +0000 (09:03 -0700)]
cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
Ronald S. Bultje [Sat, 17 Mar 2012 16:02:44 +0000 (09:02 -0700)]
cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
Ronald S. Bultje [Sat, 17 Mar 2012 15:58:48 +0000 (08:58 -0700)]
h264: add overread protection to get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 16:32:03 +0000 (09:32 -0700)]
h264: reindent get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 05:41:17 +0000 (22:41 -0700)]
h264: use struct offsets in get_cabac_bypass_sign_x86().
Ronald S. Bultje [Sat, 17 Mar 2012 04:56:40 +0000 (21:56 -0700)]
h264: fix overreads in cabac reader.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Ronald S. Bultje [Wed, 28 Mar 2012 14:14:21 +0000 (07:14 -0700)]
wmall: fix seeking.
Ronald S. Bultje [Tue, 27 Mar 2012 19:26:46 +0000 (12:26 -0700)]
lagarith: fix buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diego Biurrun [Wed, 28 Mar 2012 13:44:18 +0000 (15:44 +0200)]
dvdec: drop unnecessary dv_tablegen.h #include
dvdec.c uses nothing from dv_tablegen.h. As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.
Mans Rullgard [Tue, 27 Mar 2012 21:42:41 +0000 (22:42 +0100)]
build: fix doc generation errors in parallel builds
The $(dir) function used to construct OBJDIRS includes a trailing slash
in the names returned, which GNU make 3.82 does not match to the
slash-less 'doc' in the documentation dependencies, causing parallel
build to fail. Adding a slash fixes this and still works with make
3.81.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diego Biurrun [Mon, 6 Jun 2011 12:13:02 +0000 (14:13 +0200)]
Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
Diego Biurrun [Tue, 27 Mar 2012 14:42:23 +0000 (16:42 +0200)]
faandct: Remove FAAN_POSTSCALE define and related code.
It is not a user-accessible option and unlikely to ever be changed.
Anton Khirnov [Mon, 26 Mar 2012 11:02:54 +0000 (13:02 +0200)]
dvenc: print allowed profiles if the video doesn't conform to any of them.
Anton Khirnov [Tue, 27 Mar 2012 06:21:02 +0000 (08:21 +0200)]
avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
Otherwise realloc would free it, which would result in double free
later.
Anton Khirnov [Mon, 26 Mar 2012 18:53:10 +0000 (20:53 +0200)]
FATE: add a test for vp8 with changing frame size.
Ronald S. Bultje [Tue, 27 Mar 2012 19:56:51 +0000 (12:56 -0700)]
fate: add kgv1 fate test.
Tested to be bit-exact across x86-64, x86-32 and ppc.
Justin Ruggles [Tue, 27 Mar 2012 18:08:27 +0000 (14:08 -0400)]
oggdec: calculate correct timestamps in Ogg/FLAC
We need to parse the individual packet durations when there is more than one
packet in a page.
Paul B Mahol [Tue, 20 Mar 2012 22:27:09 +0000 (22:27 +0000)]
westwood_vqa: fix SND0 chunk handling
Version from vqa header does not dictate which sound chunks may
appear in file.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Paul B Mahol [Tue, 20 Mar 2012 22:26:41 +0000 (22:26 +0000)]
westwood_vqa: set video stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Ronald S. Bultje [Tue, 27 Mar 2012 01:02:08 +0000 (18:02 -0700)]
raw: forward avpicture_fill() error code in raw_decode().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diego Biurrun [Mon, 26 Mar 2012 13:10:12 +0000 (15:10 +0200)]
build: Do not explicitly add the doc directory to the OBJDIRS list.
Now that a documentation generator is built in the doc directory,
this is no longer necessary. Fixes the Make warning:
Makefile:188: target `doc' given more than once in the same rule.
Diego Biurrun [Sun, 18 Mar 2012 18:01:45 +0000 (19:01 +0100)]
dv: Split off DV video decoder into its own file.
Diego Biurrun [Mon, 26 Mar 2012 23:04:45 +0000 (01:04 +0200)]
build: fix RALF decoder standalone compilation, which depends on Golomb code
Diego Biurrun [Mon, 26 Mar 2012 11:36:06 +0000 (13:36 +0200)]
configure: Drop stray duplicate entry for --disable-fft from help output.
Jindrich Makovicka [Wed, 21 Mar 2012 10:42:32 +0000 (11:42 +0100)]
make av_interleaved_write_frame() flush packets when pkt is NULL
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
Alex Converse [Mon, 26 Mar 2012 22:51:59 +0000 (15:51 -0700)]
mpegts: Fix dead error checks
Mashiat Sarker Shakkhar [Sat, 24 Mar 2012 22:49:34 +0000 (15:49 -0700)]
vc1: Do not read from array if index is invalid.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Ronald S. Bultje [Tue, 27 Mar 2012 00:46:16 +0000 (17:46 -0700)]
targa: convert to bytestream2.
Also remove some write-only variables or write-only variable
assignments, remove internal colorspace conversion to native
endianness (that can be done by swscale much more efficiently),
and some cosmetics.
Ronald S. Bultje [Mon, 26 Mar 2012 22:20:02 +0000 (00:20 +0200)]
rv34: set mb_num_left to 0 after finishing a frame
Prevents running error resilience on a previous frame which will write
to the pic->mb_type[] array of the previous image. The array might
already be re-used for a new image in a subsequent thread, thus cause
two threads to write to the same pic->mb_type[] array, causing a race
condition which can crash in rv34_decode_cbp(), called by
rv34_decode_inter_mb_header() (which accesses mb_type[] twice,
assuming values are maintained, which the race condition breaks).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diego Biurrun [Mon, 26 Mar 2012 14:15:52 +0000 (16:15 +0200)]
build: ppc: drop stray leftover backslash
Diego Biurrun [Mon, 6 Feb 2012 18:31:18 +0000 (19:31 +0100)]
build: Only clean the architecture subdirectory we build for.
This allows simplifying the Makefiles; it is no longer necessary to register
arch subdirectory Makefiles, just putting them in place is enough.
Diego Biurrun [Sun, 25 Mar 2012 10:19:55 +0000 (12:19 +0200)]
build: drop some unnecessary dependencies from the H.264 parser
Diego Biurrun [Thu, 2 Feb 2012 22:55:57 +0000 (23:55 +0100)]
build: prettyprinting cosmetics
Diego Biurrun [Thu, 26 Jan 2012 17:45:11 +0000 (18:45 +0100)]
libavutil: Remove pointless rational test program.
Diego Biurrun [Thu, 26 Jan 2012 01:38:30 +0000 (02:38 +0100)]
libavutil: Remove broken and pointless lzo test program.
Anton Khirnov [Thu, 15 Mar 2012 10:27:47 +0000 (11:27 +0100)]
lavf doxy: expand AVStream.codec doxy.
Anton Khirnov [Mon, 27 Feb 2012 08:41:31 +0000 (09:41 +0100)]
lavf doxy: improve AVStream.time_base doxy.
Remove confusing sentence that implied the user should set the timebase.
Elaborate on how the timebase is set for muxing.
Anton Khirnov [Mon, 27 Feb 2012 08:35:17 +0000 (09:35 +0100)]
lavf doxy: add some basic documentation about reading from the demuxer.
Anton Khirnov [Tue, 3 Jan 2012 07:34:55 +0000 (08:34 +0100)]
lavf doxy: document passing options to demuxers.
Anton Khirnov [Tue, 3 Jan 2012 06:41:14 +0000 (07:41 +0100)]
lavf doxy: clarify that an AVPacket contains encoded data.
Jindrich Makovicka [Wed, 21 Mar 2012 11:35:15 +0000 (12:35 +0100)]
mpegtsenc: allow user triggered PES packet flushing
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
Anton Khirnov [Tue, 20 Mar 2012 06:58:00 +0000 (07:58 +0100)]
APIchanges: mark the place where 0.7 was cut.
Anton Khirnov [Tue, 20 Mar 2012 06:58:00 +0000 (07:58 +0100)]
APIchanges: mark the place where 0.8 was cut.
Anton Khirnov [Tue, 20 Mar 2012 06:45:45 +0000 (07:45 +0100)]
APIchanges: fill in missing dates and hashes.
Ronald S. Bultje [Sun, 25 Mar 2012 00:37:43 +0000 (17:37 -0700)]
smacker: convert palette and header reading to bytestream2.
Ronald S. Bultje [Sun, 25 Mar 2012 02:10:40 +0000 (19:10 -0700)]
alac: convert extradata reading to bytestream2.
Diego Biurrun [Fri, 16 Mar 2012 17:42:01 +0000 (18:42 +0100)]
x86: dsputil: prettyprint gcc inline asm
Diego Biurrun [Tue, 6 Mar 2012 12:00:42 +0000 (13:00 +0100)]
x86: K&R prettyprinting cosmetics for dsputil_mmx.c
Diego Biurrun [Sun, 18 Dec 2011 13:10:33 +0000 (14:10 +0100)]
x86: conditionally compile H.264 QPEL optimizations
Diego Biurrun [Thu, 8 Mar 2012 23:59:06 +0000 (00:59 +0100)]
dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
This makes them safe to use in non-fully braced if-blocks and similar.