rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

If we throw away the buffered incomplete frame, make sure to also
throw away the buffered bits of an incomplete byte at the same
time.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
h261enc: Disallow sliced encoding

This avoids trying to do sliced encoding, even if a slice/packet
size is requested (via the -ps option or the rtp_payload_size
field), since the encoder currently doesn't support it (or at least
our decoder can't decode it, even if the h261_encode_gob_header
function is hooked up to be called from the slicing part in
mpegvideo_enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8'

* commit 'df07c07b3de0a5e8890078944de1eb5cb8372ef8':
  rtpdec_h263_rfc2190: Clear the stored bits if discarding buffered data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '91bfac759dfd536e439ad3e35964705012c6a5a7'

* commit '91bfac759dfd536e439ad3e35964705012c6a5a7':
  h261enc: Disallow sliced encoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/lut: reduce dereference in the inner loop

For rgb, with a 1080p source, 69 to 74fps on core i5(2 core, 1.8GHz),
and 136 to 160 fps on an core i7(4770R, 3.2Ghz)
Changed the yuv code for consistency, even though the performance
increase is not as obvious as rgb

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h261dec: Fix context initialization sequence

ff_mpv_common_init sets s->context_initialized.

This fixes decoding of h261 in the cases where the demuxer
hasn't already set the frame size.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
rtpenc: Avoid brittle switch fallthroughs

Instead explicitly jump to the default case in the cases where
it is wanted, and avoid fallthrough between different codecs,
which could easily introduce bugs if people editing the code
aren't careful.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtp: Initial H.261 support

The packetizer only supports splitting at GOB headers - if
such aren't available frequently enough, it splits at any
random byte offset (not at a macroblock boundary either, which
would be allowed by the spec) and sends a payload header pretend
that it starts with a GOB header.

As long as a receiver doesn't try to handle such cases cleverly
but just drops broken frames, this shouldn't matter too much
in practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat: Add a muxer wrapping mpegts encoding into RTP

Since this structurally is quite different from normal RTP
(multiple streams are muxed into one single mpegts stream,
which is packetized into one single RTP session), it is kept
as a separate muxer.

Since this structurally also behaves differently than normal
RTP, all of the other muxers that do chained RTP muxing
(rtsp, sap, mp4) would need to be updated similarly to handle
this - in particular, creating one single rtp_mpegts muxer
for the whole presentation instead of one rtp muxer per stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Adjust the pts of new fragments similarly to what is done for dts

The pts and the corresponding duration is written in sidx
atoms, thus make sure these match up correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
tiff: support encoding and decoding 64bit images
DPX parser

Additional improvements and fixes by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
fate: add a DPX parser test
theora: support different visible and coded frame size

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
fate: add test for offset theora
lavu: Refactor side data wiping

And make sure the nb_side_data field is reset as well.

Based on an initial patch from wm4 <nfxjfg@googlemail.com>.

CC: libav-stable@libav.org
elbg: check memory allocations and propagate errors
roqvideo: check memory allocations and propagate errors
a64multi: check elbg return values
cmdutils: check file access functions return values

CC: libav-stable@libav.org
Bug-Id: CID 703706