ffmpeg.git
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 21 Feb 2012 01:49:41 +0000 (02:49 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (36 commits)
  adpcmenc: Use correct frame_size for Yamaha ADPCM.
  avcodec: add ff_samples_to_time_base() convenience function to internal.h
  adx parser: set duration
  mlp parser: set duration instead of frame_size
  gsm parser: set duration
  mpegaudio parser: set duration instead of frame_size
  (e)ac3 parser: set duration instead of frame_size
  flac parser: set duration instead of frame_size
  avcodec: add duration field to AVCodecParserContext
  avutil: add av_rescale_q_rnd() to allow different rounding
  pnmdec: remove useless .pix_fmts
  libmp3lame: support float and s32 sample formats
  libmp3lame: renaming, rearrangement, alignment, and comments
  libmp3lame: use the LAME default bit rate
  libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing
  libmp3lame: cosmetics: remove some pointless comments
  libmp3lame: convert some debugging code to av_dlog()
  libmp3lame: remove outdated comment.
  libmp3lame: do not set coded_frame->key_frame.
  libmp3lame: improve error handling in MP3lame_encode_init()
  ...

Conflicts:
doc/APIchanges
libavcodec/libmp3lame.c
libavcodec/pcxenc.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/sgienc.c
libavcodec/utils.c
libavformat/hls.c
libavutil/avutil.h
libswscale/x86/swscale_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoaf_pan: move query_format before config_props.
Nicolas George [Mon, 20 Feb 2012 20:45:18 +0000 (21:45 +0100)]
af_pan: move query_format before config_props.

That is the logical order in which the functions are called,
and there is no longer any need of forward declarations.

7 years agoaf_pan: remove the indirect function call.
Nicolas George [Mon, 20 Feb 2012 20:43:16 +0000 (21:43 +0100)]
af_pan: remove the indirect function call.

libswresample is used in all cases.

7 years agoadpcmenc: Use correct frame_size for Yamaha ADPCM.
Justin Ruggles [Tue, 31 Jan 2012 20:57:53 +0000 (15:57 -0500)]
adpcmenc: Use correct frame_size for Yamaha ADPCM.

Output packet size should match avctx->block_align. The target output packet
size is 1024 bytes.
Before:
mono   - 1024 samples -> 512 bytes
stereo - 2048 samples -> 2048 bytes
After:
mono   - 2048 samples -> 1024 bytes
stereo - 1024 samples -> 1024 bytes

7 years agoAdd missing av_free_packet.
Reimar Döffinger [Mon, 20 Feb 2012 20:20:04 +0000 (21:20 +0100)]
Add missing av_free_packet.

Fixes memory leak when encoding at least with mpegvideo using the
new encode2 function.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoavcodec: add ff_samples_to_time_base() convenience function to internal.h
Justin Ruggles [Tue, 7 Feb 2012 20:37:45 +0000 (15:37 -0500)]
avcodec: add ff_samples_to_time_base() convenience function to internal.h

7 years agoadx parser: set duration
Justin Ruggles [Fri, 13 Jan 2012 04:43:31 +0000 (23:43 -0500)]
adx parser: set duration

7 years agomlp parser: set duration instead of frame_size
Justin Ruggles [Fri, 13 Jan 2012 04:43:30 +0000 (23:43 -0500)]
mlp parser: set duration instead of frame_size

7 years agogsm parser: set duration
Justin Ruggles [Fri, 13 Jan 2012 05:40:10 +0000 (00:40 -0500)]
gsm parser: set duration

7 years agompegaudio parser: set duration instead of frame_size
Justin Ruggles [Fri, 13 Jan 2012 02:05:08 +0000 (21:05 -0500)]
mpegaudio parser: set duration instead of frame_size

7 years ago(e)ac3 parser: set duration instead of frame_size
Justin Ruggles [Fri, 13 Jan 2012 01:59:43 +0000 (20:59 -0500)]
(e)ac3 parser: set duration instead of frame_size

7 years agoflac parser: set duration instead of frame_size
Justin Ruggles [Fri, 13 Jan 2012 01:53:09 +0000 (20:53 -0500)]
flac parser: set duration instead of frame_size

7 years agoavcodec: add duration field to AVCodecParserContext
Justin Ruggles [Fri, 13 Jan 2012 01:03:17 +0000 (20:03 -0500)]
avcodec: add duration field to AVCodecParserContext

This will allow parsers to export the duration of the current frame being
output, if known, instead of using AVCodecContext.frame_size.

7 years agoavutil: add av_rescale_q_rnd() to allow different rounding
Justin Ruggles [Mon, 13 Feb 2012 20:35:00 +0000 (15:35 -0500)]
avutil: add av_rescale_q_rnd() to allow different rounding

7 years agoaf_pan: reindent after last commit.
Nicolas George [Mon, 20 Feb 2012 19:15:09 +0000 (20:15 +0100)]
af_pan: reindent after last commit.

7 years agoaf_pan: use libswr for rematrixing.
Nicolas George [Thu, 16 Feb 2012 11:34:39 +0000 (12:34 +0100)]
af_pan: use libswr for rematrixing.

7 years agolibswr: allow to set custom matrices.
Nicolas George [Thu, 16 Feb 2012 10:26:32 +0000 (11:26 +0100)]
libswr: allow to set custom matrices.

7 years agomatroskadec: remove H.264 special-case that disabled header parsing.
Reimar Döffinger [Sun, 19 Feb 2012 14:30:34 +0000 (15:30 +0100)]
matroskadec: remove H.264 special-case that disabled header parsing.

The parser was fixed so this workaround should no longer
be necessary.
This allows using stream-copy to fix files with keyframes
incorrectly marked.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agopnmdec: remove useless .pix_fmts
Paul B Mahol [Sun, 19 Feb 2012 05:20:01 +0000 (05:20 +0000)]
pnmdec: remove useless .pix_fmts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agolibmp3lame: support float and s32 sample formats
Justin Ruggles [Fri, 17 Feb 2012 06:50:57 +0000 (01:50 -0500)]
libmp3lame: support float and s32 sample formats

7 years agolibmp3lame: renaming, rearrangement, alignment, and comments
Justin Ruggles [Fri, 17 Feb 2012 05:04:54 +0000 (00:04 -0500)]
libmp3lame: renaming, rearrangement, alignment, and comments

7 years agolibmp3lame: use the LAME default bit rate
Justin Ruggles [Fri, 17 Feb 2012 04:28:38 +0000 (23:28 -0500)]
libmp3lame: use the LAME default bit rate

Also, only set bit rate for CBR.

7 years agolibmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing
Justin Ruggles [Fri, 17 Feb 2012 04:06:54 +0000 (23:06 -0500)]
libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing

7 years agolibmp3lame: cosmetics: remove some pointless comments
Justin Ruggles [Fri, 17 Feb 2012 03:27:46 +0000 (22:27 -0500)]
libmp3lame: cosmetics: remove some pointless comments

7 years agolibmp3lame: convert some debugging code to av_dlog()
Justin Ruggles [Fri, 17 Feb 2012 03:25:51 +0000 (22:25 -0500)]
libmp3lame: convert some debugging code to av_dlog()

also remove unneeded commented-out full frame data debugging

7 years agolibmp3lame: remove outdated comment.
Justin Ruggles [Fri, 17 Feb 2012 03:18:31 +0000 (22:18 -0500)]
libmp3lame: remove outdated comment.

We now require at least libmp3lame 3.98.3.
lame_encode_buffer_interleaved() still doesn't work for mono, but it does not
"die"; it just expects a stereo interleaved buffer.

7 years agolibmp3lame: do not set coded_frame->key_frame.
Justin Ruggles [Fri, 17 Feb 2012 03:12:21 +0000 (22:12 -0500)]
libmp3lame: do not set coded_frame->key_frame.

it is already set in avcodec_alloc_frame()

7 years agolibmp3lame: improve error handling in MP3lame_encode_init()
Justin Ruggles [Fri, 17 Feb 2012 03:12:03 +0000 (22:12 -0500)]
libmp3lame: improve error handling in MP3lame_encode_init()

7 years agolibmp3lame: remove unneeded 'stereo' field from Mp3AudioContext
Justin Ruggles [Fri, 17 Feb 2012 03:04:08 +0000 (22:04 -0500)]
libmp3lame: remove unneeded 'stereo' field from Mp3AudioContext

7 years agoffprobe: report bit rate in stream description
Matthieu Bouron [Mon, 6 Feb 2012 10:58:14 +0000 (11:58 +0100)]
ffprobe: report bit rate in stream description

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
7 years agolavc: set bit_rate in the decoder context, just after the init stage
Stefano Sabatini [Thu, 9 Feb 2012 17:50:32 +0000 (18:50 +0100)]
lavc: set bit_rate in the decoder context, just after the init stage

Also move the get_bit_rate() function, in order to avoid an undefined
symbol reference in avcodec_open2().

7 years agohls: Reset the AVIOContext when seeking
Martin Storsjö [Fri, 20 Jan 2012 14:29:09 +0000 (16:29 +0200)]
hls: Reset the AVIOContext when seeking

This avoids reading any old data in the AVIOContext buffer after
the seek, and indicates to the mpegts demuxer that we've seeked,
avoiding continuity check errors.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agodoc: fix channel layout value in abuffer example.
Clément Bœsch [Tue, 14 Feb 2012 11:16:51 +0000 (12:16 +0100)]
doc: fix channel layout value in abuffer example.

The channel layout must start with 0x, otherwise it is parsed as a
number of channels.

7 years agopcxenc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
pcxenc: switch to encode2().

7 years agosgienc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
sgienc: switch to encode2().

7 years agotargaenc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
targaenc: switch to encode2().

7 years agotargaenc: don't modify input frame.
Anton Khirnov [Sun, 19 Feb 2012 09:44:52 +0000 (10:44 +0100)]
targaenc: don't modify input frame.

Set the pict_type/key_frame properties on the coded picture.

7 years agoroqvideoenc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
roqvideoenc: switch to encode2().

7 years agoroqvideoenc: add const qualifier to the input frame.
Anton Khirnov [Sun, 19 Feb 2012 09:01:01 +0000 (10:01 +0100)]
roqvideoenc: add const qualifier to the input frame.

7 years agopnmenc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
pnmenc: switch to encode2().

7 years agohuffyuv: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
huffyuv: switch to encode2().

7 years agov410enc: switch to encode2().
Anton Khirnov [Sun, 12 Feb 2012 08:32:40 +0000 (09:32 +0100)]
v410enc: switch to encode2().

7 years agozmbvenc: switch to encode2().
Anton Khirnov [Fri, 10 Feb 2012 09:30:05 +0000 (10:30 +0100)]
zmbvenc: switch to encode2().

7 years agozmbvenc: move header writing to the end of encode_frame().
Anton Khirnov [Sun, 19 Feb 2012 10:16:16 +0000 (11:16 +0100)]
zmbvenc: move header writing to the end of encode_frame().

This makes switching to encode2() simpler, because it allows us to know
exactly how large should the output buffer be before we start writing
into it.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 19 Feb 2012 23:47:46 +0000 (00:47 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  doxy: remove reference to removed api
  examples: unbreak compilation
  ttadec: cosmetics: reindent
  sunrast: use RLE trigger macro inplace of the hard coded value.
  sunrastenc: set keyframe flag for the output packet.
  mpegvideo_enc: switch to encode2().
  mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0

Conflicts:
doc/examples/muxing.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: don't use redzone in loopfilter on win64.
Ronald S. Bultje [Sun, 19 Feb 2012 02:57:22 +0000 (18:57 -0800)]
h264: don't use redzone in loopfilter on win64.

Red zone usage is not allowed in the Win64 ABI.

7 years agoRevert two swscale commits.
Ronald S. Bultje [Sun, 19 Feb 2012 14:38:49 +0000 (06:38 -0800)]
Revert two swscale commits.

Revert "swscale: update context offsets after removal of AlpMmxFilter."
(commit a95e3fa90b4190381b65d180eec5a4027075e2da)
and
Revert "swscale: Remove some write-only variables related to alpha handling."
(commit 9d03cb9fc5ddf914920ab0dbe13f19a34c754966).

They broke alpha handling - it's the evil inline asm that still uses that
variable, so it's not truely write-only.

7 years agowmalossless: Fix infinite loop.
Michael Niedermayer [Sun, 19 Feb 2012 20:50:18 +0000 (21:50 +0100)]
wmalossless: Fix infinite loop.

Fixes more of Ticket1000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowmalossless: Switch to new audio API
Michael Niedermayer [Sun, 19 Feb 2012 20:49:43 +0000 (21:49 +0100)]
wmalossless: Switch to new audio API

Partially fixes Ticket1000

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agowmalossless: remove tab
Michael Niedermayer [Sun, 19 Feb 2012 21:08:09 +0000 (22:08 +0100)]
wmalossless: remove tab

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoapplehttp: Do seeking within segments, too
Panagiotis H.M. Issaris [Tue, 10 Jan 2012 13:48:57 +0000 (14:48 +0100)]
applehttp: Do seeking within segments, too

Enhance seeking by demuxing until the requested timestamp is
reached within the segment selected by the seek code using the
playlist info.

Some mpegts streams don't have dts set for all packets though,
this seeking method doesn't work well for that case.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agocmdutils: add -cpuflags.
Michael Niedermayer [Sun, 19 Feb 2012 15:51:25 +0000 (16:51 +0100)]
cmdutils: add -cpuflags.

This allows globally forcing specific cpuflags (or lack thereof)
Useful for debugging and benchmarking

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'shariman/wmall'
Michael Niedermayer [Sun, 19 Feb 2012 18:13:09 +0000 (19:13 +0100)]
Merge remote-tracking branch 'shariman/wmall'

* shariman/wmall:
  Perform inter-channel decorr. only if both channels are coded
  Use fixed-length array in revert_mclms()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoxy: remove reference to removed api
Luca Barbato [Sun, 19 Feb 2012 09:35:45 +0000 (10:35 +0100)]
doxy: remove reference to removed api

7 years agoexamples: unbreak compilation
Luca Barbato [Sun, 19 Feb 2012 09:34:40 +0000 (10:34 +0100)]
examples: unbreak compilation

Update api so it will compile again.

7 years agottadec: cosmetics: reindent
Paul B Mahol [Sat, 18 Feb 2012 01:25:46 +0000 (01:25 +0000)]
ttadec: cosmetics: reindent

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agopamdec: fix mono support.
Michael Niedermayer [Sun, 19 Feb 2012 04:56:17 +0000 (05:56 +0100)]
pamdec: fix mono support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agosunrast: use RLE trigger macro inplace of the hard coded value.
Aneesh Dogra [Fri, 17 Feb 2012 20:34:24 +0000 (02:04 +0530)]
sunrast: use RLE trigger macro inplace of the hard coded value.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agosunrastenc: set keyframe flag for the output packet.
Aneesh Dogra [Fri, 17 Feb 2012 20:08:01 +0000 (01:38 +0530)]
sunrastenc: set keyframe flag for the output packet.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoH264 parser: enable header parsing/frame type detection for is_avc.
Reimar Döffinger [Sat, 18 Feb 2012 09:29:58 +0000 (10:29 +0100)]
H264 parser: enable header parsing/frame type detection for is_avc.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agompegvideo_enc: switch to encode2().
Anton Khirnov [Fri, 10 Feb 2012 09:30:05 +0000 (10:30 +0100)]
mpegvideo_enc: switch to encode2().

7 years agompegvideo_enc: force encoding delay of at least 1 frame when low_delay=0
Anton Khirnov [Sat, 18 Feb 2012 08:08:23 +0000 (09:08 +0100)]
mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0

This allows the following commit to extrapolate better dts for the first
frame. Pts difference between the first two frames is reused as the
difference between pts and dts of the first frame.

7 years agopamenc: allocate the correct packetsize for mono.
Michael Niedermayer [Sun, 19 Feb 2012 03:15:22 +0000 (04:15 +0100)]
pamenc: allocate the correct packetsize for mono.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopamenc: move allocation down.
Michael Niedermayer [Sun, 19 Feb 2012 03:12:19 +0000 (04:12 +0100)]
pamenc: move allocation down.

This way the size that is calculated is known and can be used in a following
commit.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoh264: use av_fast_padded_malloc()
Michael Niedermayer [Sun, 19 Feb 2012 02:47:52 +0000 (03:47 +0100)]
h264: use av_fast_padded_malloc()

This zeros all the memory once and avoids valgrind warnings.
alternatively the warnings could be suppressed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoimg2dec: add im32 extension, sunrast with 32bit depth
Paul B Mahol [Sun, 19 Feb 2012 00:26:57 +0000 (00:26 +0000)]
img2dec: add im32 extension, sunrast with 32bit depth

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoexamples: add -Wall to CFLAGS.
Clément Bœsch [Sun, 19 Feb 2012 01:17:56 +0000 (02:17 +0100)]
examples: add -Wall to CFLAGS.

7 years agoexamples/filtering: fix unused variable and return value in open_input_file().
Clément Bœsch [Fri, 17 Feb 2012 10:19:29 +0000 (11:19 +0100)]
examples/filtering: fix unused variable and return value in open_input_file().

7 years agoexamples/filtering: fix deprecated function calls warnings.
Clément Bœsch [Fri, 17 Feb 2012 10:18:27 +0000 (11:18 +0100)]
examples/filtering: fix deprecated function calls warnings.

7 years agoexamples/filtering: fix implicit declarations and function mis-usage.
Clément Bœsch [Fri, 17 Feb 2012 10:05:13 +0000 (11:05 +0100)]
examples/filtering: fix implicit declarations and function mis-usage.

7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 19 Feb 2012 00:36:23 +0000 (01:36 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mov: Use defines for sample flags in fragments
  mov: Use defines for trun flags
  mov: Use defines for tfhd flags
  proresenc: force bitrate not to exceed given limit
  vc1parse: call vc1_init_common().
  wma: don't return 0 on invalid packets.
  asf: prevent packet_size_left from going negative if hdrlen > pktlen.
  mjpegb: don't return 0 at the end of frame decoding.
  rtpdec: Identify incorrectly signalled H263
  vp8dsp: split long line.
  aiff: don't skip block_align==0 check on COMM-after-SSND files.
  dpcm: ignore extra unpaired bytes in stereo streams.
  mp3on4: require a minimum framesize.
  mpc7: assign an error level + context to av_log() msg.
  huffyuv: error out on bit overrun.
  dct-test: Add the missing ff_ prefix to the altivec functions
  dct-test: Remove a stray declaration of a nonexistent function
  movenc: Write the unknown duration as 64 bit fields in ismv
  movenc: Write track durations with all bits set if duration is unknown

Conflicts:
libavcodec/dct-test.c
libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavf-fate-ogg_vp3: Try -idct auto instead of -idct simple.
Reimar Döffinger [Sat, 18 Feb 2012 20:43:21 +0000 (21:43 +0100)]
lavf-fate-ogg_vp3: Try -idct auto instead of -idct simple.

-idct simple for some reason results in different results on
different systems.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agooggenc: fix condition when not to flush due to keyframe granule.
Reimar Döffinger [Sat, 18 Feb 2012 20:21:20 +0000 (21:21 +0100)]
oggenc: fix condition when not to flush due to keyframe granule.

The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agooggdec: improve warning message.
Reimar Döffinger [Sat, 18 Feb 2012 20:19:58 +0000 (21:19 +0100)]
oggdec: improve warning message.

Print whether it was a keyframe or a non-keyframe that
was incorrectly marked as the other.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoffprobe: fix crash if the file can't be opened.
Clément Bœsch [Sat, 18 Feb 2012 20:34:44 +0000 (21:34 +0100)]
ffprobe: fix crash if the file can't be opened.

7 years agomov: Use defines for sample flags in fragments
Martin Storsjö [Thu, 16 Feb 2012 20:12:12 +0000 (21:12 +0100)]
mov: Use defines for sample flags in fragments

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomov: Use defines for trun flags
Martin Storsjö [Thu, 16 Feb 2012 19:58:09 +0000 (20:58 +0100)]
mov: Use defines for trun flags

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomov: Use defines for tfhd flags
Martin Storsjö [Thu, 16 Feb 2012 19:48:30 +0000 (20:48 +0100)]
mov: Use defines for tfhd flags

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoproresenc: force bitrate not to exceed given limit
Kostya Shishkov [Wed, 15 Feb 2012 20:04:12 +0000 (21:04 +0100)]
proresenc: force bitrate not to exceed given limit

Apple ProRes Format Specifications mentions target data size for every frame,
so make sure frame meets it. This also allows encoder to demand much smaller
packet sizes for output.

7 years agovc1parse: call vc1_init_common().
Ronald S. Bultje [Fri, 17 Feb 2012 22:18:22 +0000 (14:18 -0800)]
vc1parse: call vc1_init_common().

The parser uses VLC tables initialized in vc1_common_init(), therefore
we should call this function on parser init also.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agowma: don't return 0 on invalid packets.
Ronald S. Bultje [Sat, 18 Feb 2012 00:57:00 +0000 (16:57 -0800)]
wma: don't return 0 on invalid packets.

Return 0 means "please return the same data again", i.e. it causes an
infinite loop. Instead, return an error.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoasf: prevent packet_size_left from going negative if hdrlen > pktlen.
Ronald S. Bultje [Fri, 17 Feb 2012 20:21:18 +0000 (12:21 -0800)]
asf: prevent packet_size_left from going negative if hdrlen > pktlen.

This prevents failed assertions further down in the packet processing
where we require non-negative values for packet_size_left.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agomjpegb: don't return 0 at the end of frame decoding.
Ronald S. Bultje [Sat, 18 Feb 2012 00:27:36 +0000 (16:27 -0800)]
mjpegb: don't return 0 at the end of frame decoding.

Return 0 indicates "please return the same data again", i.e. it causes
an infinite loop. Instead, return that we consumed the buffer if we
finished decoding succesfully, or return an error if an error occurred.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoAdd muxer test based on stream-copy from FATE sample.
Reimar Döffinger [Sun, 12 Feb 2012 10:52:10 +0000 (11:52 +0100)]
Add muxer test based on stream-copy from FATE sample.

This should test muxing Theora into Ogg.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agortpdec: Identify incorrectly signalled H263
Martin Storsjö [Fri, 17 Feb 2012 08:27:41 +0000 (10:27 +0200)]
rtpdec: Identify incorrectly signalled H263

H263 in RTP can be packetized in two formats (RFC 2190, RFC
2429/4629). The former normally uses the static payload type 34,
while the latter normally uses dynamic payload types with the
SDP format names H263-1998 or H263-2000.

Look for packets that don't look like proper RFC 2190 packets and
switch to depacketizing them according to the new format if they
match some heuristic criteria.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoPerform inter-channel decorr. only if both channels are coded
Mashiat Sarker Shakkhar [Sat, 18 Feb 2012 15:00:03 +0000 (21:00 +0600)]
Perform inter-channel decorr. only if both channels are coded

7 years agoffmpeg: Fix setting flags for codec copy.
Michael Niedermayer [Sat, 18 Feb 2012 06:53:05 +0000 (07:53 +0100)]
ffmpeg: Fix setting flags for codec copy.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAllow other programs to open the same files on Windows.
Reimar Döffinger [Fri, 20 Jan 2012 19:27:22 +0000 (20:27 +0100)]
Allow other programs to open the same files on Windows.

In order to match Linux behaviour better our
Windows-specific open() replacement should disable
Windows default file locking.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agoMake AAC in Ogg (ogm) work.
Reimar Döffinger [Mon, 6 Feb 2012 21:04:46 +0000 (22:04 +0100)]
Make AAC in Ogg (ogm) work.

This needs the extradata to be extracted.
The approach used is the one MPlayer uses, though it is
unclear whether the 4 bytes extradata that are skipped
should be skipped always or only for AAC.
The AAC parser must be disabled, too, otherwise playback
still does not work.
Fixes trac issue #547.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
7 years agolavfi/aspect: set default value to 0:1, as stated in the docs
Stefano Sabatini [Sat, 18 Feb 2012 10:41:53 +0000 (11:41 +0100)]
lavfi/aspect: set default value to 0:1, as stated in the docs

Fix regression introduced in commit 70ffda3217c58bbbfb8a7e7c58824b8ca6c56128.

7 years agolavfi/aspect: remove confusing comments
Stefano Sabatini [Sat, 18 Feb 2012 10:37:34 +0000 (11:37 +0100)]
lavfi/aspect: remove confusing comments

7 years agolavfi/aspect: show log info even in case no argument is provided to setdar/setsar
Stefano Sabatini [Sat, 18 Feb 2012 10:31:28 +0000 (11:31 +0100)]
lavfi/aspect: show log info even in case no argument is provided to setdar/setsar

7 years agomovenc: Dont crash on aspect=0/0.
Michael Niedermayer [Sat, 18 Feb 2012 03:07:53 +0000 (04:07 +0100)]
movenc: Dont crash on aspect=0/0.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavidec: remove harmless duplicate code.
Michael Niedermayer [Sat, 18 Feb 2012 02:42:10 +0000 (03:42 +0100)]
avidec: remove harmless duplicate code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibx264: unbreak libx264rgb
Paul B Mahol [Sat, 18 Feb 2012 01:16:37 +0000 (01:16 +0000)]
libx264: unbreak libx264rgb

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 18 Feb 2012 01:20:19 +0000 (02:20 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (22 commits)
  als: prevent infinite loop in zero_remaining().
  cook: prevent div-by-zero if channels is zero.
  pamenc: switch to encode2().
  svq1enc: switch to encode2().
  dvenc: switch to encode2().
  dpxenc: switch to encode2().
  pngenc: switch to encode2().
  v210enc: switch to encode2().
  xwdenc: switch to encode2().
  ttadec: use branchless unsigned-to-signed unfolding
  avcodec: add a Sun Rasterfile encoder
  sunrast: Move common defines to a new header file.
  cdxl: fix video decoding for some files
  cdxl: fix audio for some samples
  apetag: add proper support for binary tags
  ttadec: remove dead code
  swscale: make access to filter data conditional on filter type.
  swscale: update context offsets after removal of AlpMmxFilter.
  prores: initialise encoder and decoder parts only when needed
  swscale: make monowhite/black RGB-independent.
  ...

Conflicts:
Changelog
libavcodec/alsdec.c
libavcodec/dpxenc.c
libavcodec/golomb.h
libavcodec/pamenc.c
libavcodec/pngenc.c
libavformat/img2.c
libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agovp8dsp: split long line.
Ronald S. Bultje [Fri, 17 Feb 2012 05:42:55 +0000 (21:42 -0800)]
vp8dsp: split long line.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoaiff: don't skip block_align==0 check on COMM-after-SSND files.
Ronald S. Bultje [Fri, 17 Feb 2012 23:51:27 +0000 (15:51 -0800)]
aiff: don't skip block_align==0 check on COMM-after-SSND files.

This prevents SIGFPEs when using block_align for divisions.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agodpcm: ignore extra unpaired bytes in stereo streams.
Alex Converse [Fri, 17 Feb 2012 22:13:40 +0000 (14:13 -0800)]
dpcm: ignore extra unpaired bytes in stereo streams.

Fixes: CVE-2011-3951

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agomp3on4: require a minimum framesize.
Ronald S. Bultje [Fri, 17 Feb 2012 23:20:27 +0000 (15:20 -0800)]
mp3on4: require a minimum framesize.

If bufsize < headersize, init_get_bits() will be called with a negative
number, causing it to fail and any subsequent call to get_bits() will
crash because it reads from a NULL pointer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org