]> git.sesse.net Git - ffmpeg/log
ffmpeg
12 years agoalacenc: fix error handling and potential memleaks in alac_encode_init()
Justin Ruggles [Thu, 2 Feb 2012 01:54:34 +0000 (20:54 -0500)]
alacenc: fix error handling and potential memleaks in alac_encode_init()

12 years agoalacenc: do not set coded_frame->key_frame
Justin Ruggles [Thu, 2 Feb 2012 01:43:43 +0000 (20:43 -0500)]
alacenc: do not set coded_frame->key_frame

It is already set in avcodec_alloc_frame()

12 years agoalacenc: do not set bits_per_coded_sample
Justin Ruggles [Thu, 2 Feb 2012 01:41:40 +0000 (20:41 -0500)]
alacenc: do not set bits_per_coded_sample

encoded ALAC does not have a fixed number of bits per sample

12 years agoalacenc: remove unneeded frame_size check in alac_encode_frame()
Justin Ruggles [Thu, 2 Feb 2012 01:38:06 +0000 (20:38 -0500)]
alacenc: remove unneeded frame_size check in alac_encode_frame()

12 years agotta: error out if samplerate is zero.
Ronald S. Bultje [Fri, 10 Feb 2012 18:51:43 +0000 (10:51 -0800)]
tta: error out if samplerate is zero.

Prevents a division by zero later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agottadec: fix invalid free when an error occurs while decoding 24-bit tta
Justin Ruggles [Thu, 9 Feb 2012 19:49:59 +0000 (14:49 -0500)]
ttadec: fix invalid free when an error occurs while decoding 24-bit tta

12 years agowavpack: add needed braces for 2 statements inside an if block
Justin Ruggles [Sat, 11 Feb 2012 01:18:10 +0000 (20:18 -0500)]
wavpack: add needed braces for 2 statements inside an if block

12 years agov210enc: remove redundant check for pix_fmt
Paul B Mahol [Sun, 5 Feb 2012 21:14:33 +0000 (21:14 +0000)]
v210enc: remove redundant check for pix_fmt

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agowavpack: allow user to disable CRC checking
Paul B Mahol [Fri, 10 Feb 2012 18:51:57 +0000 (18:51 +0000)]
wavpack: allow user to disable CRC checking

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agov210enc: Use Bytestream2 functions
Aneesh Dogra [Wed, 8 Feb 2012 17:48:40 +0000 (23:18 +0530)]
v210enc: Use Bytestream2 functions

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agocafdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 10 Feb 2012 18:47:53 +0000 (18:47 +0000)]
cafdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoyop: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:45 +0000 (19:13 +0000)]
yop: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agotta: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:44 +0000 (19:13 +0000)]
tta: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agotmv: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:43 +0000 (19:13 +0000)]
tmv: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agor3d: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:42 +0000 (19:13 +0000)]
r3d: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agonsvdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:41 +0000 (19:13 +0000)]
nsvdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agompc8: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:40 +0000 (19:13 +0000)]
mpc8: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agojvdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:39 +0000 (19:13 +0000)]
jvdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agofilmstripdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:38 +0000 (19:13 +0000)]
filmstripdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoffmdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:37 +0000 (19:13 +0000)]
ffmdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agodv: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:36 +0000 (19:13 +0000)]
dv: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agobink: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:34 +0000 (19:13 +0000)]
bink: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoCheck AVCodec.pix_fmts in avcodec_open2()
Paul B Mahol [Fri, 10 Feb 2012 00:05:14 +0000 (00:05 +0000)]
Check AVCodec.pix_fmts in avcodec_open2()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agosvq3: Prevent illegal reads while parsing extradata.
Alex Converse [Fri, 10 Feb 2012 04:21:47 +0000 (20:21 -0800)]
svq3: Prevent illegal reads while parsing extradata.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agoremove ParseContext1
Rafaël Carré [Thu, 9 Feb 2012 00:34:37 +0000 (19:34 -0500)]
remove ParseContext1

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agovc1: use ff_parse_close
Rafaël Carré [Wed, 8 Feb 2012 22:46:51 +0000 (17:46 -0500)]
vc1: use ff_parse_close

It works as long as ParseContext is the first member of the private struct

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agompegvideo parser: move specific fields into private context
Rafaël Carré [Wed, 8 Feb 2012 22:46:50 +0000 (17:46 -0500)]
mpegvideo parser: move specific fields into private context

This obviates using ParseContext1, which is slated for removal.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agompeg4video parser: move specific fields into private context
Rafaël Carré [Fri, 10 Feb 2012 01:26:17 +0000 (20:26 -0500)]
mpeg4video parser: move specific fields into private context

This obviates using ParseContext1, which is slated for removal.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agocavs parser: fix parser context type
Rafaël Carré [Wed, 8 Feb 2012 22:46:48 +0000 (17:46 -0500)]
cavs parser: fix parser context type

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago4xm, timefilter: K&R formatting cosmetics
Yordan Makariev [Wed, 11 Jan 2012 19:27:20 +0000 (21:27 +0200)]
4xm, timefilter: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agortpenc: Write a log message if the max packet size is too small
Martin Storsjö [Thu, 9 Feb 2012 21:28:01 +0000 (23:28 +0200)]
rtpenc: Write a log message if the max packet size is too small

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoh264: disallow constrained intra prediction modes for luma.
Ronald S. Bultje [Fri, 10 Feb 2012 06:57:01 +0000 (22:57 -0800)]
h264: disallow constrained intra prediction modes for luma.

Conversion of the luma intra prediction mode to one of the constrained
("alzheimer") ones can happen by crafting special bitstreams, causing
a crash because we'll call a NULL function pointer for 16x16 block intra
prediction, since constrained intra prediction functions are only
implemented for chroma (8x8 blocks).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agodv: Move tables from dvdata.h to dvdata.c
Alex Converse [Fri, 10 Feb 2012 01:56:29 +0000 (17:56 -0800)]
dv: Move tables from dvdata.h to dvdata.c

12 years agodv: Move a table used only by the demuxer out of a shared header.
Alex Converse [Fri, 10 Feb 2012 01:53:05 +0000 (17:53 -0800)]
dv: Move a table used only by the demuxer out of a shared header.

12 years agodv: Move functions used only by the encoder out of a shared header.
Alex Converse [Fri, 10 Feb 2012 01:49:57 +0000 (17:49 -0800)]
dv: Move functions used only by the encoder out of a shared header.

12 years agodv: Split dvdata.h into dvdata.h and dvquant.h
Alex Converse [Fri, 10 Feb 2012 01:44:47 +0000 (17:44 -0800)]
dv: Split dvdata.h into dvdata.h and dvquant.h

12 years agodv: Fix small overread in audio frequency table.
Alex Converse [Fri, 10 Feb 2012 01:11:55 +0000 (17:11 -0800)]
dv: Fix small overread in audio frequency table.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agoavcodec: set avpkt->size to 0 if encode2() did not output a packet
Justin Ruggles [Tue, 7 Feb 2012 19:31:49 +0000 (14:31 -0500)]
avcodec: set avpkt->size to 0 if encode2() did not output a packet

12 years agoavcodec: for audio encoding, set packet dts to packet pts.
Justin Ruggles [Tue, 7 Feb 2012 00:08:32 +0000 (19:08 -0500)]
avcodec: for audio encoding, set packet dts to packet pts.

There are no audio encoders which do frame reordering.

12 years agoac3dsp: do not use pshufb in ac3_extract_exponents_ssse3()
Justin Ruggles [Thu, 9 Feb 2012 18:00:30 +0000 (13:00 -0500)]
ac3dsp: do not use pshufb in ac3_extract_exponents_ssse3()

We need to do unsigned saturation in order to cover the corner case when the
absolute coefficient value is 16777215 (the maximum value).

Fixes Bug #216

12 years agoac3dec: Move center and surround mix level tables to the parser.
Michael Niedermayer [Fri, 3 Feb 2012 03:27:27 +0000 (22:27 -0500)]
ac3dec: Move center and surround mix level tables to the parser.

That way all mix levels as exported by avpriv_ac3_parse_header()
will have the same meaning.

Previously the 3-bit center mix level for E-AC-3 was used to index in a
4-entry table, leading to out-of-array reads.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agoaacdec: Unify preconfigured layout and PCE layout.
Alex Converse [Wed, 8 Feb 2012 18:10:34 +0000 (10:10 -0800)]
aacdec: Unify preconfigured layout and PCE layout.

12 years agoaacdec: Support native channel layout when requested.
Alex Converse [Fri, 3 Feb 2012 02:59:15 +0000 (18:59 -0800)]
aacdec: Support native channel layout when requested.

12 years agoaacdec: Try to sniff a reasonable channel layout for PCE based configurations.
Alex Converse [Tue, 31 Jan 2012 23:54:21 +0000 (15:54 -0800)]
aacdec: Try to sniff a reasonable channel layout for PCE based configurations.

This changes the output order of multichannel PCE based streams.

12 years agolibavcodec: Don't do av_free(av_malloc(0)) for bitstream filters
Martin Storsjö [Wed, 8 Feb 2012 13:01:13 +0000 (15:01 +0200)]
libavcodec: Don't do av_free(av_malloc(0)) for bitstream filters

This fixes crashes on exit when closing a bitstream filter that
hasn't allocated any private data, on OS X.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoeac3dec: replace undefined 1<<31 with INT32_MIN in noise generation
Janne Grunau [Thu, 9 Feb 2012 19:46:08 +0000 (20:46 +0100)]
eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation

12 years agoyadif: specify array size outside DECLARE_ALIGNED
Janne Grunau [Thu, 9 Feb 2012 19:27:12 +0000 (20:27 +0100)]
yadif: specify array size outside DECLARE_ALIGNED

12 years agoprores: specify array size outside DECLARE_ALIGNED brackets.
Ronald S. Bultje [Thu, 9 Feb 2012 19:00:01 +0000 (11:00 -0800)]
prores: specify array size outside DECLARE_ALIGNED brackets.

12 years agoWavPack demuxer: set packet duration
Paul B Mahol [Wed, 8 Feb 2012 22:17:54 +0000 (22:17 +0000)]
WavPack demuxer: set packet duration

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agotta: use skip_bits_long()
Paul B Mahol [Sun, 5 Feb 2012 19:39:13 +0000 (19:39 +0000)]
tta: use skip_bits_long()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agomxfdec: Ignore the last entry in Avid's index table segments
Tomas Härdin [Thu, 26 Jan 2012 12:21:30 +0000 (13:21 +0100)]
mxfdec: Ignore the last entry in Avid's index table segments

The last entry is the total size of the essence container.
Previously a TemporalOffset error would be logged, even though
segments like these are expected.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Sanity-check SampleRate
Tomas Härdin [Thu, 26 Jan 2012 13:12:50 +0000 (14:12 +0100)]
mxfdec: Sanity-check SampleRate

This avoids a SIGFPE if SampleRate is missing or set to naughty values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Handle small EditUnitByteCount
Tomas Härdin [Thu, 26 Jan 2012 12:21:44 +0000 (13:21 +0100)]
mxfdec: Handle small EditUnitByteCount

These are common with audio atoms. Without this the demuxer would read two
bytes at a time for a mono 16-bit file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
Tomas Härdin [Thu, 26 Jan 2012 12:21:43 +0000 (13:21 +0100)]
mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a

This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
Tomas Härdin [Thu, 26 Jan 2012 12:21:41 +0000 (13:21 +0100)]
mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
Tomas Härdin [Thu, 26 Jan 2012 12:21:40 +0000 (13:21 +0100)]
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()

This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Sanity check PreviousPartition
Tomas Härdin [Thu, 26 Jan 2012 12:21:39 +0000 (13:21 +0100)]
mxfdec: Sanity check PreviousPartition

Without this certain files could get the demuxer stuck in a loop.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Never seek back in local sets and KLVs
Tomas Härdin [Thu, 26 Jan 2012 12:21:38 +0000 (13:21 +0100)]
mxfdec: Never seek back in local sets and KLVs

Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend
past the end of the set and not allowing other KLVs to be read past
the end of themselves.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Move the current_partition check inside mxf_read_header()
Tomas Härdin [Thu, 26 Jan 2012 12:21:37 +0000 (13:21 +0100)]
mxfdec: Move the current_partition check inside mxf_read_header()

This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Fix infinite loop in mxf_packet_timestamps()
Tomas Härdin [Thu, 26 Jan 2012 12:21:36 +0000 (13:21 +0100)]
mxfdec: Fix infinite loop in mxf_packet_timestamps()

This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Check eof_reached in mxf_read_local_tags()
Tomas Härdin [Thu, 26 Jan 2012 12:21:35 +0000 (13:21 +0100)]
mxfdec: Check eof_reached in mxf_read_local_tags()

This fixes an infinite loop with zzuf2.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Check for NULL component
Tomas Härdin [Thu, 26 Jan 2012 12:21:34 +0000 (13:21 +0100)]
mxfdec: Check for NULL component

This fixes a SIGSEGV with zzuf1.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Tomas Härdin [Thu, 26 Jan 2012 12:21:32 +0000 (13:21 +0100)]
mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()

Only the OPAtom demuxing logic is guaranteed to have index tables,
meaning OP1a files that lack an index would cause SIGSEGV.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomxfdec: Make sure x < index_table->nb_ptses
Tomas Härdin [Thu, 26 Jan 2012 12:21:31 +0000 (13:21 +0100)]
mxfdec: Make sure x < index_table->nb_ptses

Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agobuild: Add missing directories to DIRS declarations.
Diego Biurrun [Wed, 8 Feb 2012 10:02:10 +0000 (11:02 +0100)]
build: Add missing directories to DIRS declarations.

12 years agoarm: Add missing #include to vp8.h to fix a make checkheaders warning.
Diego Biurrun [Wed, 8 Feb 2012 12:18:22 +0000 (13:18 +0100)]
arm: Add missing #include to vp8.h to fix a make checkheaders warning.

12 years agoswscale: ppc: Add missing header #includes to pass 'make checkheaders'.
Diego Biurrun [Wed, 8 Feb 2012 10:01:41 +0000 (11:01 +0100)]
swscale: ppc: Add missing header #includes to pass 'make checkheaders'.

12 years agocosmetics: Delete empty lines at end of file.
Diego Biurrun [Wed, 8 Feb 2012 09:39:18 +0000 (10:39 +0100)]
cosmetics: Delete empty lines at end of file.

12 years agobytestream: K&R formatting cosmetics
Aneesh Dogra [Wed, 8 Feb 2012 18:07:20 +0000 (23:37 +0530)]
bytestream: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agoapetag: fix comment
Paul B Mahol [Thu, 9 Feb 2012 00:00:29 +0000 (00:00 +0000)]
apetag: fix comment

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agorawenc: switch to encode2().
Anton Khirnov [Wed, 1 Feb 2012 14:33:51 +0000 (15:33 +0100)]
rawenc: switch to encode2().

This changes a number of FATE results, since before this commit, the
timestamps in all tests using rawenc were made up by lavf.

In most cases, the previous timestamps were completely bogus.

In some other cases -- raw formats, mostly h264 -- the new timestamps
are bogus as well. The only difference is that timestamps invented by
the muxer are replaced by timestamps invented by the demuxer.

cscd     -- avconv sets output codec timebase from r_frame_rate
and r_frame_rate is in this case some guessed number 31.42 (377/12),
which is not accurate enough to represent all timestamps. This results
in some frames having duplicate pts. Therefore, vsync 0 needs to be
changed to vsync 2 and avconv drops two frames. A proper fix in the
future would be to set output timebase to something saner in avconv.

nuv      -- previous timestamps for video were wrong AND the cscd
comment applies, one frame is dropped.

vp8-signbias -- the file contains two frames with identical timestamps,
so -vsync 0 needs to be removed/changed to -vsync 2 and avconv drops one
frame.

vc1-ism -- apparrently either the demuxer lies about timestamps or the
file is broken, since dts == pts on all packets, but reordering clearly
takes place.

12 years agopixdesc: mark pseudopaletted formats with a special flag.
Anton Khirnov [Wed, 1 Feb 2012 14:32:21 +0000 (15:32 +0100)]
pixdesc: mark pseudopaletted formats with a special flag.

This makes it possible to dintinguish them from PAL8.

Fixes an invalid write in avpicture_layout().

12 years agoavconv: switch to avcodec_encode_video2().
Anton Khirnov [Wed, 1 Feb 2012 09:51:36 +0000 (10:51 +0100)]
avconv: switch to avcodec_encode_video2().

12 years agolibx264: implement encode2().
Anton Khirnov [Mon, 6 Feb 2012 06:39:23 +0000 (07:39 +0100)]
libx264: implement encode2().

12 years agolibx264: split extradata writing out of encode_nals().
Anton Khirnov [Mon, 6 Feb 2012 06:34:57 +0000 (07:34 +0100)]
libx264: split extradata writing out of encode_nals().

This is done in preparation for the following patch.

12 years agolavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket
Anton Khirnov [Wed, 1 Feb 2012 08:54:38 +0000 (09:54 +0100)]
lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket

Deprecate avcodec_encode_video().

12 years agocmdutils: update copyright year to 2012.
Ronald S. Bultje [Wed, 8 Feb 2012 18:16:41 +0000 (10:16 -0800)]
cmdutils: update copyright year to 2012.

12 years agoswscale: sign-extend integer function argument to qword on x86-64.
Ronald S. Bultje [Sat, 4 Feb 2012 09:27:45 +0000 (10:27 +0100)]
swscale: sign-extend integer function argument to qword on x86-64.

12 years agox86inc: support yasm -f win64 flag also.
Haruhiko Yamagata [Tue, 7 Feb 2012 20:27:33 +0000 (12:27 -0800)]
x86inc: support yasm -f win64 flag also.

This sets __OUTPUT_FORMAT__ to win64 instead of win32, even though both
(through -m amd64) produce 64-bit binary code.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoh264: manually save/restore XMM registers for functions using INIT_MMX.
Ronald S. Bultje [Tue, 7 Feb 2012 20:46:59 +0000 (12:46 -0800)]
h264: manually save/restore XMM registers for functions using INIT_MMX.

On Win64, these registers are callee-save, so not saving/restoring them
correctly is a violation of ABI and can lead to crashes or corrupt data.

12 years agox86inc: allow manual use of WIN64_SPILL_XMM.
Henrik Gramner [Sat, 4 Feb 2012 08:28:46 +0000 (00:28 -0800)]
x86inc: allow manual use of WIN64_SPILL_XMM.

Functions using INIT_MMX may still access XMM registers through direct
means (xmm0-15). Therefore, they still need to be marked for clobber
so they can be properly saved/restored.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoaacdec: Use correct speaker order for 7.1.
Alex Converse [Tue, 31 Jan 2012 22:25:35 +0000 (14:25 -0800)]
aacdec: Use correct speaker order for 7.1.

The spec says the following speaker mapping is default:
center front speaker
left, right center front speakers,
left, right outside front speakers,
left surround, right surround rear speakers,
front low frequency effects speaker

12 years agoaacdec: Remove incorrect comment.
Alex Converse [Tue, 31 Jan 2012 23:49:45 +0000 (15:49 -0800)]
aacdec: Remove incorrect comment.

It was only correct when element ids met very specific criteria.

12 years agoaacdec: Simplify output configuration.
Alex Converse [Tue, 31 Jan 2012 23:49:06 +0000 (15:49 -0800)]
aacdec: Simplify output configuration.

12 years agoRemove Sun medialib glue code.
Diego Biurrun [Wed, 1 Feb 2012 13:43:06 +0000 (14:43 +0100)]
Remove Sun medialib glue code.

It is obscure, most likely unused and not bit-exact compared to
libavcodec due to a different IDCT transform algorithm.

12 years agodsputil: set STRIDE_ALIGN to 16 for x86 also.
Ronald S. Bultje [Tue, 7 Feb 2012 22:54:46 +0000 (14:54 -0800)]
dsputil: set STRIDE_ALIGN to 16 for x86 also.

This fixes crashes in e.g. PNG decoding with SSE2 enabled. In fact, many
x86 optimizations for codecs assume that our buffer strides are 16-byte
aligned.

12 years agopngdsp: swap argument inversion.
Ronald S. Bultje [Tue, 7 Feb 2012 20:51:21 +0000 (12:51 -0800)]
pngdsp: swap argument inversion.

12 years agoswscale: make yuv2yuv1 use named registers.
Ronald S. Bultje [Sat, 4 Feb 2012 09:00:27 +0000 (10:00 +0100)]
swscale: make yuv2yuv1 use named registers.

12 years agoh264: mark h264_idct_add8_10 with number of XMM registers.
Michael Kostylev [Sat, 4 Feb 2012 08:16:35 +0000 (00:16 -0800)]
h264: mark h264_idct_add8_10 with number of XMM registers.

This fixes XMM register clobber problems on Win64.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoswscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
Ronald S. Bultje [Tue, 7 Feb 2012 19:33:20 +0000 (11:33 -0800)]
swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.

Fixes bug 221.

CC: libav-stable@libav.org
12 years agovp8: always update next_framep[] before returning from decode_frame().
Ronald S. Bultje [Tue, 31 Jan 2012 23:17:59 +0000 (15:17 -0800)]
vp8: always update next_framep[] before returning from decode_frame().

Also slightly move around code not allocate a new frame if we won't
decode it. This prevents us from putting undecoded frames in frame
pointers, which (in mt decoding) other threads will use and wait on
as references, causing a deadlock (if we skipped decoding) or a crash
(if we didn't initialized next_framep[] at all).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agoavconv: estimate next_dts from framerate if it is set.
Anton Khirnov [Thu, 2 Feb 2012 12:18:49 +0000 (13:18 +0100)]
avconv: estimate next_dts from framerate if it is set.

12 years agoavconv: better next_dts usage.
Anton Khirnov [Thu, 2 Feb 2012 11:21:37 +0000 (12:21 +0100)]
avconv: better next_dts usage.

next_dts is used for estimating the dts of the next packet if it's
missing. Therefore, it makes no sense to set it from the pts of the last
decoded frame. Also it should be estimated from the current packet
duration/ticks_per_frame always, not only when a frame was successfully
decoded.

12 years agoavconv: rename InputStream.pts to last_dts.
Anton Khirnov [Sun, 5 Feb 2012 20:12:43 +0000 (21:12 +0100)]
avconv: rename InputStream.pts to last_dts.

It more accurately describes what does this variable store.

12 years agoavconv: reduce overloading for InputStream.pts.
Anton Khirnov [Sun, 5 Feb 2012 19:56:24 +0000 (20:56 +0100)]
avconv: reduce overloading for InputStream.pts.

It currently has different meanings at different times (dts of the last
read packet/pts of the last decoded frame). Reduce obfuscation by
storing pts of the decoded frame in the frame itself.

12 years agoavconv: rename InputStream.next_pts to next_dts.
Anton Khirnov [Fri, 3 Feb 2012 14:32:51 +0000 (15:32 +0100)]
avconv: rename InputStream.next_pts to next_dts.

It's used to predict dts, not pts.

12 years agoavconv: rework -t handling for encoding.
Anton Khirnov [Sun, 5 Feb 2012 13:32:10 +0000 (14:32 +0100)]
avconv: rework -t handling for encoding.

Current code compares the desired recording time with InputStream.pts,
which has a very unclear meaning. Change the code to use actual
timestamps of the frames passed to the encoder.

In several tests, one less frame is encoded, which is more correct.

In the idroq test one more frame is encoded, which is again more
correct.

Behavior with stream copy should be unchanged.

12 years agoavconv: set encoder timebase for subtitles.
Anton Khirnov [Sun, 5 Feb 2012 13:28:19 +0000 (14:28 +0100)]
avconv: set encoder timebase for subtitles.

The actual number (1/1000) will probably require some
discussion/tweaking in the future, but should be good enough for now,
since the timestamps in AVSubtitle are in this timebase by definition.

12 years agopva-demux test: add -vn
Anton Khirnov [Sun, 5 Feb 2012 11:18:14 +0000 (12:18 +0100)]
pva-demux test: add -vn

The output is obviously not supposed to contain video (since only
-acodec copy is specified), but that only happens because of the way -t
handling is implemented currently.

12 years agoswscale: K&R formatting cosmetics for SPARC code
Diego Biurrun [Wed, 18 Jan 2012 17:33:16 +0000 (18:33 +0100)]
swscale: K&R formatting cosmetics for SPARC code