Martin Storsjö [Sun, 23 Dec 2012 15:10:04 +0000 (17:10 +0200)]
lavc: Correct the description of pkt_dts
The description as updated in 6e5c44b0f made it sound like it is
handled exactly like the pts, which it is not. Clarify that it
is the packet that triggered returning the frame instead of just
the last avpacket (in case of frame threading, it won't be the
dts of the last packet).
Justin Ruggles [Fri, 10 Feb 2012 22:51:11 +0000 (17:51 -0500)]
ttadec: fix last frame handling when seeking
Using a frame count, as is done currently, does not work at all with
seeking. Instead, when the number of samples in the final frame has
been decoded, we check if only the 32-bit CRC is remaining. If so, we
assume that it is the final frame.
There is no longer a need to keep total_frames in TTAContext.
Martin Storsjö [Tue, 11 Dec 2012 13:12:31 +0000 (15:12 +0200)]
rtpdec_vp8: Don't return known-broken packets
This is built on the assumption that the first partition of each
VP8 packet is essential for decoding any later packet - if this
partition is broken/missed, the arithmetic coder gets out of sync
and decoding the bitstream in further packet ends up with total
garbage. If packets of a frame are lost, make sure the first
partition is intact (return only this part of the packet, nothing
else), otherwise stop returning data until the next keyframe is
received.
Alternatively, one would simply not return any packets at all
until the next keyframe, if packet loss is detected.
Ronald S. Bultje [Sat, 15 Dec 2012 17:46:02 +0000 (09:46 -0800)]
lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().
Björn Axelsson [Thu, 13 Dec 2012 13:48:25 +0000 (14:48 +0100)]
flvenc: Check whether seeking back to the header succeeded
The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seeking to the header fails.
Janne Grunau [Wed, 19 Dec 2012 09:31:12 +0000 (10:31 +0100)]
mov: handle h263 and flv1 for codec_tag 'H','2','6','3'
The sample in https://bugzilla.libav.org/show_bug.cgi?id=393 and
samples/F4V/H263_NM_f.mp4 both have codec_tag H263 for different
codecs. H263 is apparently used by Flash Media Server for Sorensen
Spark videos.
Janne Grunau [Tue, 18 Dec 2012 21:57:58 +0000 (22:57 +0100)]
mpegvideo: increase edge_emu_buffer size for VC1
The VC1 decoder uses edge_emu_buffer simultaneously for luma and chroma
and needs more space. That was not a problem before f1d8763a02b5fce
since the size for edge_emu_buffer was always calculated with 2 byte per
pixel since the linesize was not known.
Anton Khirnov [Sun, 10 Jun 2012 18:46:30 +0000 (20:46 +0200)]
cmdutils: add a commandline pre-parser.
It splits the commandline into a more convenient internal representation
for further parsing.
This will allow e.g.
- processing global options first independently of their location on the
commandline, eliminating ugly hacks for processing e.g. cpuflags
first
- better options validation and error reporting. It is now possible for
the parser to know that it's applying an input option to an output
file or vice versa and act accordingly.
Janne Grunau [Sun, 25 Nov 2012 21:42:07 +0000 (22:42 +0100)]
mpegvideo: allocate scratch buffers after linesize is known
Since we can't know which stride a custom get_buffer() implementation is
going to use we have to allocate this scratch buffers after the linesize
is known. It was pretty safe for 8 bit per pixel pixel formats since we
always allocated memory for up to 16 bits per pixel. It broke hoever
with cmdutis.c's alloc_buffer() and high pixel bit depth since it
allocated larger edges than mpegvideo expected.
Janne Grunau [Sat, 15 Dec 2012 21:21:23 +0000 (22:21 +0100)]
h264: prevent decoding of slice NALs in extradata
It is not posible to call get_buffer during frame-mt codec
initialization. Libavformat might pass huge amounts of data as
extradata after parsing broken files. The 'extradata' for the fuzzed
sample sample_varPAR_s5374_r001-02.avi is 2.8M large and contains
multiple slices.
Justin Ruggles [Fri, 30 Nov 2012 01:58:05 +0000 (20:58 -0500)]
lavr: remove automatic context close/open for resampling compensation
It adds unnecessary complication for insignificant usability improvement.
The user really should know if they'll need resampling compensation before
opening the context.
Note that only the documentation has changed. The current functionality will
still work until the next major bump.
Martin Storsjö [Sun, 9 Dec 2012 23:10:42 +0000 (01:10 +0200)]
rtpenc_vp8: Include the picture number in VP8 packets
This makes it easier for receivers to decide what to do if data
is lost.
Refactor calculating the max payload size, to avoid hardcoding the
header size in too many places, reducing the number of lines that
have to be touched if the header is adjusted further.
Janne Grunau [Wed, 12 Dec 2012 15:42:05 +0000 (16:42 +0100)]
mpegvideo: treat delayed pictures as used
This requires to move the avcodec_default_free_buffers() call to
ff_MPV_common_end() since otherwise delayed pictures would get freed
during a size change.