1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-01 16:59:58 +02:00
Commit Graph

56862 Commits

Author SHA1 Message Date
Michael Niedermayer
02a6ee5168 avfilter/vf_frei0r: fix out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 11:16:35 +02:00
Clément Bœsch
d4dc673455 avformat/vobsub: raise packet even if apparently incomplete.
This restore the latest packet which was dropped from the FATE test in
dbfe61100.
2013-10-04 09:25:11 +00:00
Clément Bœsch
dbfe61100b avformat/vobsub: fix several issues.
Here is an extract of fate-samples/sub/vobsub.idx, with an additional
text at the end of each line to better identify each bitmap:

    timestamp: 00:04:55:445, filepos: 00001b000 Ace!
    timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey!
    timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work.
    timestamp: 00:05:02:035, filepos: 00001d000 <???>
    timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay?
    timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight.
    timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you.
    timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up?
    timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going?
    timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd!
    timestamp: 00:05:27:193, filepos: 000023800 Look over there!
    timestamp: 00:05:28:369, filepos: 000024800 Where are they going?
    timestamp: 00:05:28:361, filepos: 000025000 <???>
    timestamp: 00:05:29:946, filepos: 000025800 Let's go see.
    timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton.

Note the two "<???>": they are basically split subtitles (with the
previous one), which the dvdsub decoder is now supposed to reconstruct
with a previous commit. But also note that while the first chunk has
increasing timestamps,

    timestamp: 00:05:02:018, filepos: 00001c800
    timestamp: 00:05:02:035, filepos: 00001d000

...it's not the case of the second one (and this is not an exception in the
original file):

    timestamp: 00:05:28:369, filepos: 000024800
    timestamp: 00:05:28:361, filepos: 000025000

For the dvdsub decoder, they need to be "filepos'ed" ordered, but the
FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the
introduction of a sub sort method in the context, to allow giving
priority to the position, and then the timestamps. With that change, the
dvdsub decoder get fed with ordered packets.

Now the packet size estimation was also broken: the filepos differences
in the vobsub index defines the full data read between two subtitles
chunks, and it is necessary to take into account what is read by the
mpegps_read_pes_header() function since the length returned by that
function doesn't count the size of the data it reads. This is fixed with
the introduction of total_read, and {old,new}_pos. By doing this change,
we can drop the unreliable len16 heuristic and simplify the whole loop.
Note that mpegps_read_pes_header() often read more than one PES packet
(typically in one call it can read 0x1ba and 0x1be chunk along with the
relevant 0x1bd packet), which triggers the "total_read + pkt_size >
psize" check. This is an expected behaviour, which could be avoided by
having a more chunked version of mpegps_read_pes_header().

The latest change is the extraction of each stream into its own
subtitles queue. If we don't do this, the maximum size for a subtitle
chunk is broken, and the previous changes can not work. Having each
stream in a different queue requires some little adjustments in the
seek code of the demuxer.

This commit is only meaningful as a whole change and can not be easily
split. The FATE test changes because it uses the vobsub demuxer.
2013-10-04 07:59:49 +02:00
Clément Bœsch
95cafeb684 avcodec/dvdsubdec: reconstruct incomplete SPU packets. 2013-10-04 07:59:48 +02:00
Clément Bœsch
71e0ae22ac avcodec/dvdsubdec: extract every subtitle in a different file (debug).
Even thought a generic solution would be more relevant, this is
currently helpful while debugging.
2013-10-04 07:59:48 +02:00
Clément Bœsch
41fd6f0796 avcodec/dvdsubdec: factor out rectangles reset. 2013-10-04 07:59:48 +02:00
Michael Niedermayer
c7fe2a3733 ffplay: avoid direct access to lowres use av_codec_g/set_lowres()
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 22:38:54 +02:00
Michael Niedermayer
b72040daad ffplay: avoid direct access to max_lowres use av_codec_get_max_lowres()
This avoids future ABI issues when the field is moved to the end of the
struct.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 22:38:23 +02:00
Paul B Mahol
5f99e6d632 avfilter/vf_pullup: do not ignore frame field order
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-03 02:43:20 +00:00
Michael Niedermayer
4a63c69faa Merge remote-tracking branch 'qatar/master'
* qatar/master:
  atrac3: Generalize gain compensation code

Conflicts:
	libavcodec/atrac.c
	libavcodec/atrac.h
	libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 21:46:42 +02:00
Michael Niedermayer
2ece7d94bc Merge commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f'
* commit '5ce04c14dd3dd3670cbdba82275a3a72c716ec6f':
  Use correct Doxygen syntax

Conflicts:
	libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 21:29:38 +02:00
Michael Niedermayer
16bb8faac6 Merge commit '4be292dac7e7f0586053fcced8d530ccf4ebef29'
* commit '4be292dac7e7f0586053fcced8d530ccf4ebef29':
  atrac: Move doxygen comments to the header

Conflicts:
	libavcodec/atrac.c
	libavcodec/atrac.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 21:22:55 +02:00
Michael Niedermayer
c2df95978b Merge commit 'be0b4c70ec40d7f9ac8e416a4379d4a387421184'
* commit 'be0b4c70ec40d7f9ac8e416a4379d4a387421184':
  atrac3: Replace a silly counter variable name with plain 'j'

Conflicts:
	libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 21:14:54 +02:00
Michael Niedermayer
6565b1ad97 avcodec/h264_sei: make SEI type truncated message more informative
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 20:13:55 +02:00
Michael Niedermayer
fcd19d6c8d avcodec/jpeg2000dec: Zero code and quant style
This prevents future frames from using half initialized/inconsistent
structures
Fixes assertion failure
Fixes Ticket2897

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 19:03:56 +02:00
Michael Niedermayer
1c71f185ad avcodec/tiff_common: Improve formating of long arrays
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 18:47:50 +02:00
Maxim Poliakovski
79cbac8cd4 atrac3: Generalize gain compensation code
Move it to the ATRAC common code, to reuse in the upcoming ATRAC3+ decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 18:20:01 +02:00
Diego Biurrun
5ce04c14dd Use correct Doxygen syntax 2013-10-03 17:53:51 +02:00
Maxim Poliakovski
4be292dac7 atrac: Move doxygen comments to the header
Also update copyright info and file description.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-03 17:53:51 +02:00
Diego Biurrun
be0b4c70ec atrac3: Replace a silly counter variable name with plain 'j' 2013-10-03 17:53:51 +02:00
Michael Niedermayer
4d5d905eed ffmpeg: avoid direct access to lowres use av_codec_g/set_lowres()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 17:20:53 +02:00
Michael Niedermayer
e57dba0d52 avcodec: add av_codec_get_max_lowres()
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 16:33:09 +02:00
Marton Balint
0362cf1a19 avfilter/vf_histogram: add mirrored waveform mode
Added parameter to mirror the waveform (high values are shown on top in column mode)

Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-02 21:02:59 +00:00
Marton Balint
5b5bb0d81c avfilter/vf_histogram: fix segfault in parade waveform mode for subsampled formats
Signed-off-by: Marton Balint <cus@passwd.hu>
2013-10-02 21:02:54 +00:00
Michael Niedermayer
4c292d5c34 Merge remote-tracking branch 'rbultje/master'
* rbultje/master:
  Full-pixel MC functions.
  VP9 MC (ssse3) optimizations.
  Native VP9 decoder.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 13:56:52 +02:00
Michael Niedermayer
5a63fb6693 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: mark deprecated AVCodec.max_lowres for removal on next bump

Conflicts:
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 12:04:37 +02:00
Michael Niedermayer
c4f3b55f50 Merge commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76'
* commit '06e7301a2efa8dededecbe6836ee5b59bf7e5e76':
  vf_interlace: do not process an already interlaced frame

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 11:16:57 +02:00
Stefano Sabatini
f5b27b6d5f ffprobe: print stream channel_layout when available
Fix trac ticket #3006.
2013-10-03 09:19:38 +02:00
Ronald S. Bultje
f1548c008f Full-pixel MC functions.
Decoding time of ped1080p.webm goes from 11.3sec to 11.1sec.
2013-10-02 21:03:15 -04:00
Ronald S. Bultje
c07ac8d467 VP9 MC (ssse3) optimizations.
Decoding time of ped1080p.webm goes from 20.7sec to 11.3sec.
2013-10-02 21:03:15 -04:00
Ronald S. Bultje
848826f527 Native VP9 decoder.
Authors: Ronald S. Bultje <rsbultje gmail com>,
         Clement Boesch <u pkh me>
2013-10-02 21:03:11 -04:00
Carl Eugen Hoyos
b5f219c904 Print pix_fmt name on h264 context reinitialisation. 2013-10-03 01:42:23 +02:00
Michael Niedermayer
64327aabb9 ffmpeg: add support to force specific AVCodecs
previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 22:56:03 +02:00
Michael Niedermayer
5082fcc0e2 avformat: add support to force specific AVCodecs
previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 22:56:03 +02:00
Michael Niedermayer
f4aec34805 avformat/utils: pass AVFormatContext to find_decoder()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 22:56:03 +02:00
Reimar Döffinger
af6e232ccf VC1 VDPAU: Mark missing reference frames as such.
Currently the code passes some nonsense values as
references instead, causing corruption with NVidia's
and assertion failures with Mesa's implementation.
For non-corrupted input this mostly happens in
interlaced bitstreams, e.g.
http://samples.mplayerhq.hu/V-codecs/WMV9/interlaced/480i30__codec_WVC1__mode_2__framerate_29.970__type_2__preproc_17.wmv.
The != VDP_INVALID handle assert does not trigger
(and probably is quite nonsense) because the frames
are initialized to 0.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-10-02 20:51:14 +02:00
Michael Niedermayer
ebb8dd437b mov: fix trun / pseudo_stream_id handling
This fixes simple concatenated h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 19:59:10 +02:00
Michael Niedermayer
95666b2298 avcodec/imgconvert/get_color_type: fix type for PAL8
Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 19:59:10 +02:00
Paul B Mahol
2490996f38 avcodec: use designated initializers for bitstream filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-02 17:20:29 +00:00
Anton Khirnov
451606f7ce lavc: mark deprecated AVCodec.max_lowres for removal on next bump 2013-10-02 16:41:08 +02:00
Vittorio Giovara
06e7301a2e vf_interlace: do not process an already interlaced frame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-02 16:40:49 +02:00
Michael Niedermayer
5e253fdfc1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: alias rtmp_listen to listen

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:59:42 +02:00
Michael Niedermayer
c28bca2bde Merge commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1'
* commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1':
  mxf: Remove a typo

Conflicts:
	libavformat/mxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:55:18 +02:00
Michael Niedermayer
8aa6ffd8fa Merge commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad'
* commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad':
  asfdec: Check the return value of asf_read_stream_properties

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 14:53:00 +02:00
Clément Bœsch
3841e4510b avfilter/avf_showspectrum: use the name 's' for the pointer to the private context 2013-10-02 11:37:53 +00:00
Paul B Mahol
848a1e6738 avfilter/af_afade: use the name 's' for the pointer to the private context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-02 11:37:52 +00:00
Michael Niedermayer
0425fd7eb2 ffmpeg: dont return reserved values
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 12:59:39 +02:00
Clément Bœsch
e31a239fea avfilter/vf_removelogo: use the name 's' for the pointer to the private context 2013-10-02 10:54:11 +00:00
Paul B Mahol
7d0ce1e59d avfilter/af_silencedetect: use the name 's' for the pointer to the private context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-02 10:28:28 +00:00
Maxim Poliakovski
d49f3fa579 atrac3: Generalize gain compensation code
Move it to the ATRAC common code, so it can be reused
in the umpcoming ATRAC3+ decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 10:44:02 +02:00