Commit Graph

37817 Commits

Author SHA1 Message Date
Michael Niedermayer 4e04e1b81e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: convert yuv2yuvX() to using named arguments.
  swscale: rename "dstw" to "w" to prevent name collisions.
  swscale: use named registers in yuv2yuv1_plane() place.
  lavf: fix aspect ratio mismatch message.
  avconv: set AVFormatContext.duration from '-t'
  cljr: implement encode2.
  cljr: set the properties of the coded_frame, not input frame.
  dnxhdenc: switch to encode2.
  bmpenc: switch to encode2().

Conflicts:
	libavcodec/bmpenc.c
	libavcodec/cljr.c
	libavformat/utils.c
	tests/ref/vsynth1/cljr
	tests/ref/vsynth2/cljr

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-13 02:06:44 +01:00
Reimar Döffinger f51a072160 Fix compilation without HAVE_AVX.
%ifdef HAVE_AVX must now be %if HAVE_AVX.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-12 21:42:31 +01:00
Michael Niedermayer 18a7f7465e threads: Perform the generic progress cleanup more carefully.
The cleanup is only done now when
a picture is returned (assuming that it has to be done when its returned)
a error is returned (assuming that there will be no further progress on the frame)
the codec is not h264 (this is still needed due to some deadlocks in realvideo)

This fixes a decoding regression with 00017.MTS

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 20:24:29 +01:00
Michael Niedermayer 6be0960851 threads: move state update after progress cleanup.
This order is more logic and might prevent a race.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 20:24:29 +01:00
Michael Niedermayer f900d60178 h264: Mark previous field as done before throwing it away.
This fixes some deadlock without the generic cleanup code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 20:24:29 +01:00
Andrey Utkin b66b58f7b0 Fix aspect ratio mismatch message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 20:24:29 +01:00
Reimar Döffinger c15f3bd3db Simplify: use local variable with same contents directly.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-12 18:56:07 +01:00
Reimar Döffinger ff92549195 Fix Theora-in-ogg keyframe handling.
To make seeking work correctly, we must write a new granule for
each keyframe.
Unfortunately we currently have no regression tests due to no
included Theora encoder.
A test based on -vcodec copy from a Theora FATE sample should
probably be added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-12 18:56:06 +01:00
Reimar Döffinger b223035511 Detect and check for CMOV.
Some MMX-only CPUs do not have support for CMOV.
All SSE/MMX2 CPUs should be fine, thus no check was
added to those functions.
See also https://sourceforge.net/tracker/?func=detail&aid=3358347&group_id=205275&atid=992986

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-12 18:56:06 +01:00
Ronald S. Bultje 3e23badd83 swscale: convert yuv2yuvX() to using named arguments. 2012-02-12 08:27:51 -08:00
Ronald S. Bultje 8c433d8a03 swscale: rename "dstw" to "w" to prevent name collisions.
"dstw" can collide with the word-version of the "dst" argument, causing
all kind of weird stuff down the pipe.
2012-02-12 08:27:50 -08:00
Ronald S. Bultje ef66a0ed2e swscale: use named registers in yuv2yuv1_plane() place.
Most of the function had been converted before, but I forgot this
particular location.
2012-02-12 08:27:50 -08:00
Andrey Utkin e3cc617263 lavf: fix aspect ratio mismatch message.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-12 17:18:24 +01:00
Andrey Utkin c22e2ec9d1 avconv: set AVFormatContext.duration from '-t'
Set output files duration to recording_time option, if given.
Rationale: to save duration into metadata for file that is written to
non-seekable output, for formats like FLV (with metadata at beginning).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-12 17:15:41 +01:00
Anton Khirnov 3dffa1b46c cljr: implement encode2. 2012-02-12 08:05:57 +01:00
Anton Khirnov 177bb4bf50 cljr: set the properties of the coded_frame, not input frame. 2012-02-12 08:05:38 +01:00
Anton Khirnov 89829242a6 dnxhdenc: switch to encode2. 2012-02-12 08:03:46 +01:00
Anton Khirnov 3f77c41171 bmpenc: switch to encode2(). 2012-02-12 08:02:28 +01:00
Michael Niedermayer cd1c12b5c5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: update reference for seek-alac_mp4
  sunrast: Return AVERROR values instead of -1.
  sunrast: Add support for gray8 decoding.
  swscale: enforce a minimum filtersize.
  alacenc: use AVCodec.encode2()
  alacenc: cosmetics: indentation
  alacenc: consolidate bitstream writing into a single function.
  alacenc: only encode frame size in header for a final smaller frame
  alacenc: store current frame size in AlacEncodeContext.
  alacenc: return AVERROR codes in alac_encode_frame()
  alacenc: calculate a new max frame size for the final small frame
  alacenc: pretty-printing and other cosmetics
  alacenc: fix error handling and potential memleaks in alac_encode_init()
  alacenc: do not set coded_frame->key_frame
  alacenc: do not set bits_per_coded_sample
  alacenc: remove unneeded frame_size check in alac_encode_frame()
  tta: error out if samplerate is zero.
  ttadec: fix invalid free when an error occurs while decoding 24-bit tta
  wavpack: add needed braces for 2 statements inside an if block

Conflicts:
	tests/ref/acodec/alac

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 01:06:13 +01:00
Carl Eugen Hoyos 289520fd97 Reduce the verbosity of a mpeg1/2 invalid intra-matrix warning.
Fixes ticket #973.
2012-02-12 00:20:56 +01:00
Michael Niedermayer 85f25cfa19 ffmpeg: fix passlogfile with multiple libx264 streams.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-12 00:03:26 +01:00
Paul B Mahol 07dbea7033 tta: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 23:59:19 +01:00
Pavel Koshevoy 277e52845e Modified to generate PAT/PMT for video keyframes
This is so that TS fragments produced by
http://code.google.com/p/httpsegmenter/
would be compatible with JW Player.

A new member variable prev_payload_key was added to MpegTSWriteStream
to help detect transition from non-key to key frame, so that
PAT/PMT would not be produced for every keyframe in intra-only videos.

Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 23:57:35 +01:00
Michael Niedermayer 69494fd5c5 lagarith: Fix out of array reads.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 23:57:35 +01:00
Carl Eugen Hoyos 2396206fb4 ffv1: Assume encoding all bits is wanted if bits_per_raw_sample == 0. 2012-02-11 23:45:04 +01:00
Carl Eugen Hoyos cadd9ab6aa Cosmetics: Move a block in ffv1's encode_init().
Makes the next patch smaller.
2012-02-11 23:42:58 +01:00
Justin Ruggles b498867d66 FATE: update reference for seek-alac_mp4
This should have been updated in b590f3a7bf.
2012-02-11 16:41:01 -05:00
Aneesh Dogra 41afdd913a sunrast: Return AVERROR values instead of -1.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-11 13:32:29 -08:00
Aneesh Dogra 4fbccfab23 sunrast: Add support for gray8 decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-11 11:05:43 -08:00
Ronald S. Bultje dae2ce361a swscale: enforce a minimum filtersize.
At very small dimensions, this calculation could lead to zero-sized
filters, which leads to uninitialized output, zero-sized allocations,
loop overflows in SIMD that uses do{..}while(i++<filtersize); instead
of for(i=0;i<filtersize;i++){..} and several other similar failures.
Therefore, require a minimum filtersize of 1.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-11 10:06:50 -08:00
Justin Ruggles 764852d653 alacenc: use AVCodec.encode2() 2012-02-11 12:49:23 -05:00
Justin Ruggles bee80054f7 alacenc: cosmetics: indentation 2012-02-11 12:49:22 -05:00
Justin Ruggles b6e8ff72ea alacenc: consolidate bitstream writing into a single function.
Simplifies use of verbatim mode.
2012-02-11 12:49:22 -05:00
Justin Ruggles b590f3a7bf alacenc: only encode frame size in header for a final smaller frame
Otherwise it is not needed because it matches the frame size as encoded in
the extradata.
2012-02-11 12:49:22 -05:00
Justin Ruggles ba821b098b alacenc: store current frame size in AlacEncodeContext.
This avoids an indirection and will simplify implementation of encode2()
2012-02-11 12:49:22 -05:00
Justin Ruggles 65d15aec77 alacenc: return AVERROR codes in alac_encode_frame() 2012-02-11 12:49:22 -05:00
Justin Ruggles 302daf5800 alacenc: calculate a new max frame size for the final small frame
Gives a better estimate of buffer requirements and a better decision of
whether or not to use verbatim mode.
2012-02-11 12:49:22 -05:00
Justin Ruggles fc9cf0b2a6 alacenc: pretty-printing and other cosmetics 2012-02-11 12:49:22 -05:00
Justin Ruggles 51c2483862 alacenc: fix error handling and potential memleaks in alac_encode_init() 2012-02-11 12:49:22 -05:00
Justin Ruggles 6e63228323 alacenc: do not set coded_frame->key_frame
It is already set in avcodec_alloc_frame()
2012-02-11 12:49:21 -05:00
Justin Ruggles 64fe3eaeb3 alacenc: do not set bits_per_coded_sample
encoded ALAC does not have a fixed number of bits per sample
2012-02-11 12:49:21 -05:00
Justin Ruggles 43a4cb070b alacenc: remove unneeded frame_size check in alac_encode_frame() 2012-02-11 12:49:21 -05:00
Ronald S. Bultje 7416d61036 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
2012-02-11 08:13:53 -08:00
Michael Niedermayer fd0b8d5986 ansi: Fix use of uninitalized width/height warning.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 08:23:42 +01:00
Justin Ruggles 6ab681a4c1 ttadec: fix invalid free when an error occurs while decoding 24-bit tta 2012-02-10 20:35:10 -05:00
Justin Ruggles 9d7cee50aa wavpack: add needed braces for 2 statements inside an if block 2012-02-10 20:27:55 -05:00
Michael Niedermayer ed83f97235 tta: Add some safety precautions to avoid freeing things that have not been allocated.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 02:06:24 +01:00
Paul B Mahol c6abf21492 tta: do not leak memory if bps == 3
In bps == 3 case output is decoded directly.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 02:02:01 +01:00
Ingo Brückl a697a185e4 buildsys: Fix shared lib build of MPlayer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 01:40:52 +01:00
Michael Niedermayer a78f6b8cb9 Merge remote-tracking branch 'qatar/master'
* qatar/master: (38 commits)
  v210enc: remove redundant check for pix_fmt
  wavpack: allow user to disable CRC checking
  v210enc: Use Bytestream2 functions
  cafdec: Check return value of avio_seek and avoid modifying state if it fails
  yop: Check return value of avio_seek and avoid modifying state if it fails
  tta: Check return value of avio_seek and avoid modifying state if it fails
  tmv: Check return value of avio_seek and avoid modifying state if it fails
  r3d: Check return value of avio_seek and avoid modifying state if it fails
  nsvdec: Check return value of avio_seek and avoid modifying state if it fails
  mpc8: Check return value of avio_seek and avoid modifying state if it fails
  jvdec: Check return value of avio_seek and avoid modifying state if it fails
  filmstripdec: Check return value of avio_seek and avoid modifying state if it fails
  ffmdec: Check return value of avio_seek and avoid modifying state if it fails
  dv: Check return value of avio_seek and avoid modifying state if it fails
  bink: Check return value of avio_seek and avoid modifying state if it fails
  Check AVCodec.pix_fmts in avcodec_open2()
  svq3: Prevent illegal reads while parsing extradata.
  remove ParseContext1
  vc1: use ff_parse_close
  mpegvideo parser: move specific fields into private context
  ...

Conflicts:
	libavcodec/4xm.c
	libavcodec/aacdec.c
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/mpeg4video_parser.c
	libavcodec/svq3.c
	libavcodec/v210enc.c
	libavformat/cafdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-11 01:22:22 +01:00