ffmpeg.git
7 years agoAdd some missing v4l2 pix_fmt mappings.
Carl Eugen Hoyos [Wed, 1 Feb 2012 17:04:17 +0000 (18:04 +0100)]
Add some missing v4l2 pix_fmt mappings.

7 years agoFix v4l pix_fmt mapping for rgb32: There is no transparency information.
Carl Eugen Hoyos [Wed, 1 Feb 2012 17:00:24 +0000 (18:00 +0100)]
Fix v4l pix_fmt mapping for rgb32: There is no transparency information.

7 years agoFix pix_fmt mapping for v4l2 rgb5x5.
Carl Eugen Hoyos [Wed, 1 Feb 2012 16:58:42 +0000 (17:58 +0100)]
Fix pix_fmt mapping for v4l2 rgb5x5.

7 years agoSupport decoding rgba64 with libopenjpeg.
Michael Bradshaw [Wed, 1 Feb 2012 14:51:18 +0000 (15:51 +0100)]
Support decoding rgba64 with libopenjpeg.

7 years agoSupport decoding gray8a with libopenjpeg.
Michael Bradshaw [Wed, 1 Feb 2012 14:47:28 +0000 (15:47 +0100)]
Support decoding gray8a with libopenjpeg.

7 years agolibavformat/avformat.h: fix stray libavformat reference
Michael Niedermayer [Wed, 1 Feb 2012 03:41:07 +0000 (04:41 +0100)]
libavformat/avformat.h: fix stray libavformat reference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibavfilter/version.h: fix project name
Michael Niedermayer [Wed, 1 Feb 2012 03:38:41 +0000 (04:38 +0100)]
libavfilter/version.h: fix project name

The code in the file is written by vitor in be19d752 (2008)
thus cannot have originated in libav which did not exist at that
time

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosnowdata: Fix project name, this file has not been developed in libav
Michael Niedermayer [Wed, 1 Feb 2012 03:32:04 +0000 (04:32 +0100)]
snowdata: Fix project name, this file has not been developed in libav
or by any libav developers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agogsm.h: Fix project reference
Michael Niedermayer [Wed, 1 Feb 2012 03:27:40 +0000 (04:27 +0100)]
gsm.h: Fix project reference

The code in this file is copy and pasted from FFmpegs libavcodec/libgsm.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowestwood_aud: Fix project reference
Michael Niedermayer [Wed, 1 Feb 2012 03:19:09 +0000 (04:19 +0100)]
westwood_aud: Fix project reference

"Copyright (c) 2003 The ffmpeg Project" and "part of libav"
is ROTFL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosimpleidct: fix project name.
Michael Niedermayer [Wed, 1 Feb 2012 03:15:35 +0000 (04:15 +0100)]
simpleidct: fix project name.

"Copyright (c) 2001 Michael Niedermayer" and "part of Libav" is not likely
not only am i not a libav developer there also was no libav in 2001

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaacenc: fix library references
Michael Niedermayer [Wed, 1 Feb 2012 02:46:11 +0000 (03:46 +0100)]
aacenc: fix library references

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc: fix convertion tool references
Michael Niedermayer [Wed, 1 Feb 2012 02:37:08 +0000 (03:37 +0100)]
doc: fix convertion tool references

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264 golomb: Fix copyright violation.
Michael Niedermayer [Wed, 1 Feb 2012 02:05:39 +0000 (03:05 +0100)]
h264 golomb: Fix copyright violation.

Copy and paste does not change authorship
See 0da71265 for the original checkin

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 1 Feb 2012 01:08:23 +0000 (02:08 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (29 commits)
  fate: add golomb-test
  golomb-test: K&R formatting cosmetics
  h264: Split h264-test off into a separate file - golomb-test.c.
  h264-test: cleanup: drop timer invocations, commented out code and other cruft
  h264-test: Remove unused DSP and AVCodec contexts and related init calls.
  adpcm: Add missing stdint.h #include to fix standalone header compilation.
  lavf: add functions for accessing the fourcc<->CodecID mapping tables.
  lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
  lavc: make avcodec_close() work properly on unopened codecs.
  lavc: add avcodec_is_open().
  lavf: rename AVInputFormat.value to raw_codec_id.
  lavf: remove the pointless value field from flv and iv8
  lavc/lavf: remove unnecessary symbols from the symbol version script.
  lavc: reorder AVCodec fields.
  lavf: reorder AVInput/OutputFormat fields.
  mp3dec: Fix a heap-buffer-overflow
  adpcmenc: remove some unneeded casts
  adpcmenc: use int16_t and uint8_t instead of short and unsigned char.
  adpcmenc: fix adpcm_ms extradata allocation
  adpcmenc: return proper AVERROR codes instead of -1
  ...

Conflicts:
doc/APIchanges
libavcodec/Makefile
libavcodec/adpcmenc.c
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/libavcodec.v
libavcodec/mpc7.c
libavcodec/mpegaudiodec.c
libavcodec/options.c
libavformat/Makefile
libavformat/avformat.h
libavformat/flvdec.c
libavformat/libavformat.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffv1dec: use correct linesize
Paul B Mahol [Tue, 31 Jan 2012 21:41:33 +0000 (21:41 +0000)]
ffv1dec: use correct linesize

Apparently this did not break anything.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'shariman/wmall'
Michael Niedermayer [Tue, 31 Jan 2012 21:55:03 +0000 (22:55 +0100)]
Merge remote-tracking branch 'shariman/wmall'

* shariman/wmall:
  Cosmetics: Fix some whitespace errors and indentation
  Use correct variable type for 32-bit samples buffer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffv1dec: PIX_FMT_YUVA444P support
Paul B Mahol [Tue, 31 Jan 2012 20:18:24 +0000 (20:18 +0000)]
ffv1dec: PIX_FMT_YUVA444P support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffv1enc: PIX_FMT_YUVA444P support
Paul B Mahol [Tue, 31 Jan 2012 20:21:34 +0000 (20:21 +0000)]
ffv1enc: PIX_FMT_YUVA444P support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffv1dec: PIX_FMT_YUVA420P support
Paul B Mahol [Tue, 31 Jan 2012 20:18:22 +0000 (20:18 +0000)]
ffv1dec: PIX_FMT_YUVA420P support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffv1enc: PIX_FMT_YUVA420P support
Paul B Mahol [Tue, 31 Jan 2012 20:18:21 +0000 (20:18 +0000)]
ffv1enc: PIX_FMT_YUVA420P support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompeg/h264: update thread context even if it is not initialized.
Michael Niedermayer [Sun, 29 Jan 2012 21:37:37 +0000 (22:37 +0100)]
mpeg/h264: update thread context even if it is not initialized.

Fixes decoding of Ticket952

Tested-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: Return the correct number of bytes for mid strea, extradata.
Michael Niedermayer [Sun, 29 Jan 2012 20:06:09 +0000 (21:06 +0100)]
h264: Return the correct number of bytes for mid strea, extradata.

Fixes the hang with Ticket952

Tested-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopngdec: fix warning about pointer types
Michael Niedermayer [Tue, 31 Jan 2012 02:57:23 +0000 (03:57 +0100)]
pngdec: fix warning about pointer types

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: add golomb-test
Diego Biurrun [Mon, 30 Jan 2012 11:58:20 +0000 (12:58 +0100)]
fate: add golomb-test

7 years agogolomb-test: K&R formatting cosmetics
Diego Biurrun [Mon, 30 Jan 2012 10:30:13 +0000 (11:30 +0100)]
golomb-test: K&R formatting cosmetics

7 years agoh264: Split h264-test off into a separate file - golomb-test.c.
Diego Biurrun [Mon, 30 Jan 2012 11:50:16 +0000 (12:50 +0100)]
h264: Split h264-test off into a separate file - golomb-test.c.

The new name is more appropriate as only golomb functions are tested.

7 years agoh264-test: cleanup: drop timer invocations, commented out code and other cruft
Diego Biurrun [Mon, 30 Jan 2012 10:16:20 +0000 (11:16 +0100)]
h264-test: cleanup: drop timer invocations, commented out code and other cruft

7 years agoh264-test: Remove unused DSP and AVCodec contexts and related init calls.
Diego Biurrun [Mon, 30 Jan 2012 10:10:27 +0000 (11:10 +0100)]
h264-test: Remove unused DSP and AVCodec contexts and related init calls.

This also avoids a segfault on startup.

7 years agoadpcm: Add missing stdint.h #include to fix standalone header compilation.
Diego Biurrun [Tue, 31 Jan 2012 17:41:52 +0000 (18:41 +0100)]
adpcm: Add missing stdint.h #include to fix standalone header compilation.

7 years agoffmpeg: fix -map_channel being ignored when resampling is not needed.
Clément Bœsch [Tue, 31 Jan 2012 14:51:01 +0000 (15:51 +0100)]
ffmpeg: fix -map_channel being ignored when resampling is not needed.

7 years agolavf: add functions for accessing the fourcc<->CodecID mapping tables.
Anton Khirnov [Fri, 27 Jan 2012 12:33:09 +0000 (13:33 +0100)]
lavf: add functions for accessing the fourcc<->CodecID mapping tables.

Fixes bug 212.

7 years agolavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
Anton Khirnov [Sat, 28 Jan 2012 18:15:15 +0000 (19:15 +0100)]
lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().

This way, if the AVCodecContext is allocated for a specific codec, the
caller doesn't need to store this codec separately and then pass it
again to avcodec_open2().

It also allows to set codec private options using av_opt_set_* before
opening the codec.

7 years agolavc: make avcodec_close() work properly on unopened codecs.
Anton Khirnov [Sun, 29 Jan 2012 11:17:30 +0000 (12:17 +0100)]
lavc: make avcodec_close() work properly on unopened codecs.

I.e. free the priv_data and other stuff allocated in
avcodec_alloc_context3() and not segfault.

7 years agolavc: add avcodec_is_open().
Anton Khirnov [Thu, 8 Dec 2011 05:57:44 +0000 (06:57 +0100)]
lavc: add avcodec_is_open().

It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().

7 years agolavf: rename AVInputFormat.value to raw_codec_id.
Anton Khirnov [Tue, 31 Jan 2012 06:50:31 +0000 (07:50 +0100)]
lavf: rename AVInputFormat.value to raw_codec_id.

It's only used by raw demuxers for storing the codec id.

7 years agolavf: remove the pointless value field from flv and iv8
Anton Khirnov [Tue, 31 Jan 2012 06:46:18 +0000 (07:46 +0100)]
lavf: remove the pointless value field from flv and iv8

The demuxers don't use it in any way.

7 years agolavc/lavf: remove unnecessary symbols from the symbol version script.
Anton Khirnov [Sun, 29 Jan 2012 11:22:49 +0000 (12:22 +0100)]
lavc/lavf: remove unnecessary symbols from the symbol version script.

7 years agolavc: reorder AVCodec fields.
Anton Khirnov [Fri, 27 Jan 2012 11:29:37 +0000 (12:29 +0100)]
lavc: reorder AVCodec fields.

Put all private fields at the end and mark them as such so they can be
easily changed/removed.

This breaks ABI.

7 years agolavf: reorder AVInput/OutputFormat fields.
Anton Khirnov [Fri, 27 Jan 2012 11:29:37 +0000 (12:29 +0100)]
lavf: reorder AVInput/OutputFormat fields.

Put all private fields at the end and mark them as such so they can be
easily changed/removed.

This breaks ABI.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 31 Jan 2012 00:14:58 +0000 (01:14 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (26 commits)
  avconv: deprecate the -deinterlace option
  doc: Fix the name of the new function
  aacenc: make sure to encode enough frames to cover all input samples.
  aacenc: only use the number of input samples provided by the user.
  wmadec: Verify bitstream size makes sense before calling init_get_bits.
  kmvc: Log into a context at a log level constant.
  mpeg12: Pad framerate tab to 16 entries.
  kgv1dec: Increase offsets array size so it is large enough.
  kmvc: Check palsize.
  nsvdec: Propagate errors
  nsvdec: Be more careful with av_malloc().
  nsvdec: Fix use of uninitialized streams.
  movenc: cosmetics: Get rid of camelCase identifiers
  swscale: more generic check for planar destination formats with alpha
  doc: Document mov/mp4 fragmentation options
  build: Use order-only prerequisites for creating FATE reference file dirs.
  x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf
  rtsp: Remove some unused variables from ff_rtsp_connect().
  avutil: make intfloat api public
  avformat_write_header(): detail error message
  ...

Conflicts:
doc/APIchanges
doc/ffmpeg.texi
doc/muxers.texi
ffmpeg.c
libavcodec/kmvc.c
libavcodec/x86/Makefile
libavcodec/x86/dsputil_yasm.asm
libavcodec/x86/pngdsp-init.c
libavformat/movenc.c
libavformat/movenc.h
libavformat/mpegtsenc.c
libavformat/nsvdec.c
libavformat/utils.c
libavutil/avutil.h
libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomp3dec: Fix a heap-buffer-overflow
Alex Converse [Wed, 25 Jan 2012 23:46:14 +0000 (15:46 -0800)]
mp3dec: Fix a heap-buffer-overflow

In some cases, what is left to read from ptr is smaller than EXTRABYTES.

Based on a patch by Thierry Foucu <tfoucu@gmail.com>.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agoadpcmenc: remove some unneeded casts
Justin Ruggles [Mon, 30 Jan 2012 18:34:43 +0000 (13:34 -0500)]
adpcmenc: remove some unneeded casts

7 years agoadpcmenc: use int16_t and uint8_t instead of short and unsigned char.
Justin Ruggles [Mon, 30 Jan 2012 18:33:05 +0000 (13:33 -0500)]
adpcmenc: use int16_t and uint8_t instead of short and unsigned char.

7 years agoadpcmenc: fix adpcm_ms extradata allocation
Justin Ruggles [Mon, 30 Jan 2012 18:15:18 +0000 (13:15 -0500)]
adpcmenc: fix adpcm_ms extradata allocation

Add FF_INPUT_BUFFER_PADDING_SIZE.
If allocation fails, also free memory which was allocated previously in
adpcm_encode_init().

7 years agoadpcmenc: return proper AVERROR codes instead of -1
Justin Ruggles [Mon, 30 Jan 2012 18:06:57 +0000 (13:06 -0500)]
adpcmenc: return proper AVERROR codes instead of -1

7 years agoadpcmenc: check for coded_frame allocation failure
Justin Ruggles [Mon, 30 Jan 2012 18:03:01 +0000 (13:03 -0500)]
adpcmenc: check for coded_frame allocation failure

7 years agoadpcmenc: Do not set coded_frame->key_frame.
Justin Ruggles [Mon, 30 Jan 2012 17:57:34 +0000 (12:57 -0500)]
adpcmenc: Do not set coded_frame->key_frame.

It is already set in avcodec_alloc_frame().

7 years agompc7: check for allocation failure
Justin Ruggles [Mon, 30 Jan 2012 19:33:01 +0000 (14:33 -0500)]
mpc7: check for allocation failure

7 years agompc7: align local temp buffer
Justin Ruggles [Mon, 30 Jan 2012 19:29:05 +0000 (14:29 -0500)]
mpc7: align local temp buffer

DSPContext.bswap_buf() requires aligned output

7 years agoavidec: print informative error messages if seeking fails.
Michael Niedermayer [Mon, 30 Jan 2012 22:52:03 +0000 (23:52 +0100)]
avidec: print informative error messages if seeking fails.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAllow decoding of 64bit png images.
Carl Eugen Hoyos [Mon, 30 Jan 2012 23:13:24 +0000 (00:13 +0100)]
Allow decoding of 64bit png images.

Fixes a part of ticket #639.

7 years agoSimplify "deloco" and support decoding of 48bit loco png.
Carl Eugen Hoyos [Mon, 30 Jan 2012 23:03:26 +0000 (00:03 +0100)]
Simplify "deloco" and support decoding of 48bit loco png.

7 years agorv40: x86 SIMD for biweight
Christophe Gisquet [Wed, 11 Jan 2012 23:11:15 +0000 (00:11 +0100)]
rv40: x86 SIMD for biweight

Provide MMX, SSE2 and SSSE3 versions, with a fast-path when the weights are
multiples of 512 (which is often the case when the values round up nicely).

*_TIMER report for the 16x16 and 8x8 cases:
C:
9015 decicycles in 16, 524257 runs, 31 skips
2656 decicycles in 8, 524271 runs, 17 skips
MMX:
4156 decicycles in 16, 262090 runs, 54 skips
1206 decicycles in 8, 262131 runs, 13 skips
MMX on fast-path:
2760 decicycles in 16, 524222 runs, 66 skips
995 decicycles in 8, 524252 runs, 36 skips
SSE2:
2163 decicycles in 16, 262131 runs, 13 skips
832 decicycles in 8, 262137 runs, 7 skips
SSE2 with fast path:
1783 decicycles in 16, 524276 runs, 12 skips
711 decicycles in 8, 524283 runs, 5 skips
SSSE3:
2117 decicycles in 16, 262136 runs, 8 skips
814 decicycles in 8, 262143 runs, 1 skips
SSSE3 with fast path:
1315 decicycles in 16, 524285 runs, 3 skips
578 decicycles in 8, 524286 runs, 2 skips

This means around a 4% speedup for some sequences.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agox86: Give RV40 init file a more suitable name.
Diego Biurrun [Mon, 30 Jan 2012 08:56:28 +0000 (09:56 +0100)]
x86: Give RV40 init file a more suitable name.

7 years agox86: Place mm_flags variable declaration below the appropriate #ifdef.
Diego Biurrun [Mon, 30 Jan 2012 08:39:16 +0000 (09:39 +0100)]
x86: Place mm_flags variable declaration below the appropriate #ifdef.

This fixes some unused variable warnings with YASM disabled.

7 years agoSupoort decoding of gray16 images with libopenjpeg.
Michael Bradshaw [Mon, 30 Jan 2012 22:53:25 +0000 (23:53 +0100)]
Supoort decoding of gray16 images with libopenjpeg.

7 years agomp3dec: fix truncating packet error message while decoding a complete MP3.
Clément Bœsch [Sat, 21 Jan 2012 21:53:57 +0000 (22:53 +0100)]
mp3dec: fix truncating packet error message while decoding a complete MP3.

The MP3 demuxer split the data in packets of 1024B which are later split
in MP3 frames by the MPEG audio parser. The last read is "truncated",
but this should not raise any error.

Solution-by: Michael Niedermayer
7 years agoassdec: fix wrong alloc pointer check.
Clément Bœsch [Sun, 29 Jan 2012 13:47:04 +0000 (14:47 +0100)]
assdec: fix wrong alloc pointer check.

7 years agoass: use av_asprintf() instead of a temporary stack buffer.
Clément Bœsch [Sat, 28 Jan 2012 17:13:07 +0000 (18:13 +0100)]
ass: use av_asprintf() instead of a temporary stack buffer.

7 years agomovdec: Ignore sample_degradation_priority bits when checking first_sample_flags
Martin Storsjö [Wed, 18 Jan 2012 13:12:10 +0000 (15:12 +0200)]
movdec: Ignore sample_degradation_priority bits when checking first_sample_flags

This makes the first packet of a track fragment run to get
the keyframe flag set properly if sample_degradation_priority
is nonzero.

This makes the keyframes flag be set properly for ismv files
created by Microsoft.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoflvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too
Martin Storsjö [Mon, 30 Jan 2012 20:47:40 +0000 (22:47 +0200)]
flvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too

Previously, we've only passed the key string on to the recursive
amf_parse_object for the mixedarray type, not for 'object'. By
passing the key string on, the recursive amf_parse_object can
store the amf objects as metadata.

This kind of data was seen in data from XSplit Broadcaster, received
over RTMP via Wowza. This patch allows reading this metadata.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavconv: deprecate the -deinterlace option
Anton Khirnov [Mon, 30 Jan 2012 15:05:28 +0000 (16:05 +0100)]
avconv: deprecate the -deinterlace option

Its quality is horrible, yadif should always be used instead.

7 years agodiracdec: Fix integer overflow leading to out of global array read.
Michael Niedermayer [Sun, 29 Jan 2012 02:38:58 +0000 (03:38 +0100)]
diracdec: Fix integer overflow leading to out of global array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: add support for specifying the shell used to run configure
Michael Niedermayer [Mon, 30 Jan 2012 00:57:33 +0000 (01:57 +0100)]
fate: add support for specifying the shell used to run configure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc: Fix the name of the new function
Martin Storsjö [Mon, 30 Jan 2012 19:11:33 +0000 (21:11 +0200)]
doc: Fix the name of the new function

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoaacenc: make sure to encode enough frames to cover all input samples.
Justin Ruggles [Sat, 28 Jan 2012 22:51:22 +0000 (17:51 -0500)]
aacenc: make sure to encode enough frames to cover all input samples.

Currently, any samples in the final frame are not decoded because they are
only represented by one frame instead of two. So we encode two final frames to
cover both the analysis delay and the MDCT delay.

7 years agoaacenc: only use the number of input samples provided by the user.
Justin Ruggles [Sat, 28 Jan 2012 22:18:18 +0000 (17:18 -0500)]
aacenc: only use the number of input samples provided by the user.

Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.

7 years agowmadec: Verify bitstream size makes sense before calling init_get_bits.
Alex Converse [Fri, 27 Jan 2012 22:24:07 +0000 (14:24 -0800)]
wmadec: Verify bitstream size makes sense before calling init_get_bits.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agokmvc: Log into a context at a log level constant.
Alex Converse [Mon, 30 Jan 2012 18:27:50 +0000 (10:27 -0800)]
kmvc: Log into a context at a log level constant.

7 years agompeg12: Pad framerate tab to 16 entries.
Alex Converse [Fri, 27 Jan 2012 23:50:24 +0000 (15:50 -0800)]
mpeg12: Pad framerate tab to 16 entries.

There are many places where we read an unchecked 4-bit index into it.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agokgv1dec: Increase offsets array size so it is large enough.
Michael Niedermayer [Wed, 25 Jan 2012 22:23:35 +0000 (23:23 +0100)]
kgv1dec: Increase offsets array size so it is large enough.

Fixes CVE-2011-3945

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 807a045ab7f51993a2c1b3116016cbbd4f3d20d6)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agokmvc: Check palsize.
Alex Converse [Thu, 26 Jan 2012 16:30:49 +0000 (17:30 +0100)]
kmvc: Check palsize.

Fixes: CVE-2011-3952

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Based on fix by Michael Niedermayer

7 years agonsvdec: Propagate errors
Alex Converse [Fri, 27 Jan 2012 01:23:09 +0000 (17:23 -0800)]
nsvdec: Propagate errors

Related to CVE-2011-3940.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agonsvdec: Be more careful with av_malloc().
Alex Converse [Fri, 27 Jan 2012 01:21:46 +0000 (17:21 -0800)]
nsvdec: Be more careful with av_malloc().

Check results for av_malloc() and fix an overflow in one call.

Related to CVE-2011-3940.

Based in part on work from Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agonsvdec: Fix use of uninitialized streams.
Michael Niedermayer [Tue, 24 Jan 2012 21:20:26 +0000 (22:20 +0100)]
nsvdec: Fix use of uninitialized streams.

Fixes CVE-2011-3940 (Out of bounds read resulting in out of bounds write)

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5c011706bc752d34bc6ada31d7df2ca0c9af7c6b)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agohuffman: use a simple assignment instead of FFSWAP.
Reimar Döffinger [Sun, 29 Jan 2012 20:45:19 +0000 (21:45 +0100)]
huffman: use a simple assignment instead of FFSWAP.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoDeobfuscate ff_huff_build_tree.
Reimar Döffinger [Sun, 29 Jan 2012 20:23:59 +0000 (21:23 +0100)]
Deobfuscate ff_huff_build_tree.

I have no idea what the idea was behind the original code,
but the new code is equivalent to it.
In that loop that places the new node nodes[j] contains
always the data of the new node (since the steps are always
in order: FFSWAP copies node[j] to node[j-1], j is decremented).
Thus nodes[j].no == i and nodes[j].sym == HNODE.
make fate still passes and contains VP6 samples which use
FF_HUFFMAN_FLAG_HNODE_FIRST.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agomovenc: cosmetics: Get rid of camelCase identifiers
Martin Storsjö [Mon, 30 Jan 2012 14:19:15 +0000 (16:19 +0200)]
movenc: cosmetics: Get rid of camelCase identifiers

Also add spacing around operators on touched lines, and split
one line to match the common style.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoswscale: more generic check for planar destination formats with alpha
Paul B Mahol [Mon, 30 Jan 2012 13:58:50 +0000 (13:58 +0000)]
swscale: more generic check for planar destination formats with alpha

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agodoc: Document mov/mp4 fragmentation options
Martin Storsjö [Fri, 20 Jan 2012 18:33:13 +0000 (20:33 +0200)]
doc: Document mov/mp4 fragmentation options

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agobuild: Use order-only prerequisites for creating FATE reference file dirs.
Diego Biurrun [Sun, 29 Jan 2012 21:08:58 +0000 (22:08 +0100)]
build: Use order-only prerequisites for creating FATE reference file dirs.

7 years agoCosmetics: Add bit per component information to v308 comment.
Carl Eugen Hoyos [Mon, 30 Jan 2012 10:30:52 +0000 (11:30 +0100)]
Cosmetics: Add bit per component information to v308 comment.

7 years agoDetect jps and pns files as (3D) jpg and png images.
Martin Lambers [Mon, 30 Jan 2012 10:28:08 +0000 (11:28 +0100)]
Detect jps and pns files as (3D) jpg and png images.

7 years agoAdd option forced_subs_only for Bluray subtitles.
Carl Eugen Hoyos [Mon, 30 Jan 2012 10:25:59 +0000 (11:25 +0100)]
Add option forced_subs_only for Bluray subtitles.

7 years agoAdd pix_fmt_info for yuva444.
Carl Eugen Hoyos [Mon, 30 Jan 2012 10:24:02 +0000 (11:24 +0100)]
Add pix_fmt_info for yuva444.

Reviewed-by: Paul B Mahol
7 years agox86 dsputil: provide SSE2/SSSE3 versions of bswap_buf
Christophe Gisquet [Thu, 19 Jan 2012 20:48:39 +0000 (21:48 +0100)]
x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf

While pshufb allows emulating bswap on XMM registers for SSSE3, more
shuffling is needed for SSE2. Alignment is critical, so specific codepaths
are provided for this case.

For the huffyuv sequence "angels_480-huffyuvcompress.avi":
C (using bswap instruction): ~ 55k cycles
SSE2:                        ~ 40k cycles
SSSE3 using unaligned loads: ~ 35k cycles
SSSE3 using aligned loads:   ~ 30k cycles

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agortsp: Remove some unused variables from ff_rtsp_connect().
Diego Biurrun [Mon, 30 Jan 2012 08:38:41 +0000 (09:38 +0100)]
rtsp: Remove some unused variables from ff_rtsp_connect().

7 years agoavutil: make intfloat api public
Paul B Mahol [Sun, 29 Jan 2012 20:09:22 +0000 (20:09 +0000)]
avutil: make intfloat api public

The functions are already av_ prefixed and intfloat header is already provided.
Install libavutil/intfloat.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoavformat_write_header(): detail error message
Rafaël Carré [Sun, 29 Jan 2012 04:29:26 +0000 (23:29 -0500)]
avformat_write_header(): detail error message

Give the exact aspect ratios when there is a mismatch between encoder
and muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agos/vbsf/bsf/
Mike Melanson [Mon, 30 Jan 2012 05:29:25 +0000 (21:29 -0800)]
s/vbsf/bsf/

-vbsf doesn't exist anymore. It got renamed to -bsf somewhere along the
line. Update print statement accordingly.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoyuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.
Mike Melanson [Mon, 30 Jan 2012 05:24:41 +0000 (21:24 -0800)]
yuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.

Current demuxer recognizes several colorspace formats that begin with 'C420'
but does not yet recognize plain 'C420'. GStreamer's y4menc component
generates .y4m files with a 'C420' colorspace. This new comparison is
placed after the other 'C420' checks so that it doesn't interfere with
them.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agopng: add support for bpp>4 to paeth x86 SIMD code.
Ronald S. Bultje [Fri, 27 Jan 2012 15:28:28 +0000 (23:28 +0800)]
png: add support for bpp>4 to paeth x86 SIMD code.

This fixes playback of e.g. RGB48 (bpp=6) content on x86 CPUs. Fixes
bug 214.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 30 Jan 2012 04:20:58 +0000 (05:20 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  png: add missing #if HAVE_SSSE3 around function pointer assignment.
  imdct36: mark SSE functions as using all 16 XMM registers.
  png: move DSP functions to their own DSP context.
  sunrast: Add a sample request for TIFF, IFF, and Experimental Rastfile formats.
  sunrast: Cosmetics
  sunrast: Remove if (unsigned int < 0) check.
  sunrast: Replace magic number by a macro.

Conflicts:
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/pngdec.c
libavcodec/sunrast.c
libavcodec/x86/Makefile
libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopng: add SSE2 version for add_bytes_l2.
Ronald S. Bultje [Fri, 27 Jan 2012 15:23:05 +0000 (23:23 +0800)]
png: add SSE2 version for add_bytes_l2.

7 years agopng: convert DSP functions to yasm.
Ronald S. Bultje [Fri, 27 Jan 2012 15:21:55 +0000 (23:21 +0800)]
png: convert DSP functions to yasm.

7 years agoFix non-C89 declarations in for loops
Mans Rullgard [Sun, 29 Jan 2012 20:55:10 +0000 (20:55 +0000)]
Fix non-C89 declarations in for loops

Some compilers still do not support this syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
7 years agobuild: configure: Restore alphabetical order for CMDLINE_SET
Alexander Strasser [Sun, 29 Jan 2012 21:56:12 +0000 (22:56 +0100)]
build: configure: Restore alphabetical order for CMDLINE_SET

7 years agoFix offset validity checks.
Reimar Döffinger [Sun, 29 Jan 2012 17:16:23 +0000 (18:16 +0100)]
Fix offset validity checks.

Offsets are relative to the end of the header, not the
start of the buffer, thus the buffer size needs to be subtracted.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agofraps: frame threading support.
Reimar Döffinger [Sun, 29 Jan 2012 13:59:32 +0000 (14:59 +0100)]
fraps: frame threading support.

Codec is too simple to gain much from it at lower resolutions,
but should help at very high resolutions, particularly for
v3 and v5 where a not too optimized pseudo-YUV to RGB
is done in the codec.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>