Commit Graph

14799 Commits

Author SHA1 Message Date
Diego Biurrun 9b3139ebca dctref: make sure function declarations match between .c and .h file 2011-07-27 00:26:13 +02:00
Mans Rullgard da4c7cce21 x86: fix build with gcc 4.7
The upcoming gcc 4.7 has more advanced constant propagation
resulting some inline asm operands becoming constants and thus
emitted as literals, sometimes in contexts where this results
in invalid instructions.

This patch changes the constraints of the relevant operands
to "rm" thus forcing a valid type.  While obviously suboptimal,
this is what older gcc versions already did, and there is no
change to the code generated with these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-26 22:17:43 +01:00
Reimar Döffinger 7cbb856efe Remove useless NULL check.
We dereferenced the pointer two lines above, no point in
checking for NULL afterwards.
In addition it cannot be NULL the way it was initialized
just one line further above.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-07-26 22:34:44 +02:00
Stefano Sabatini d7e14c0d10 imgconvert: remove PixFmtInfo.pixel_type field
The field is only used for checking if a format is YUV planar
and if the format is paletted.

This patch replaces the current is_planar_yuv() code with a function
which uses the pixdesc information. The new implementation is less
efficient, but this should not be an issue as the functions which use
it (av_picture_crop/pad()) are deprecated and currently never used in
the codebase.
2011-07-25 11:11:54 +02:00
Michael Niedermayer 14d5e214bf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  jpegdec: actually search for and parse RSTn

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-25 01:19:40 +02:00
Michael Niedermayer 9e4ed295da mpeg4_decode_profile_level: fix indention
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-24 16:28:10 +02:00
Michael Niedermayer 52e24c7d7e mpeg4videodec: simplify mpeg4_decode_profile_level()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-24 16:21:37 +02:00
Michael Niedermayer 8c0fa61a97 jpegdec: actually search for and parse RSTn
Fixes decoding of MJPEG files produced by some UVC Logitec web cameras,
such as "Notebook Pro" and "HD C910".

References:
http://trac.videolan.org/vlc/ticket/4215
http://ffmpeg.org/trac/ffmpeg/ticket/267

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Kostya <kostya.shishkov@gmail.com>
(cherry picked from commit 7b8ed831eb)
2011-07-23 19:19:13 +02:00
Stefano Sabatini 3b8bb503ee imgconvert: store padded size information in PixFmtInfo, simplify avg_bits_per_pixel()
Prefer data-driven over procedural logic in avg_bits_per_pixel(),
simplify and improve robustness, as it is easy to miss a function
update when a new format is added.
2011-07-23 17:01:27 +02:00
Stefano Sabatini 49f612ee29 imgconvert: remove useless PixFmtInfo.nb_channels field 2011-07-23 17:01:27 +02:00
Michael Niedermayer 5271b857eb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dnxhddec: avoid a branch in 10-bit decode_dct_block()
  H.264: Add optimizations to predict x86 assembly.
  riff: Add mpgv MPEG-2 fourcc
  add Flash Screen Video 2 decoder

Conflicts:
	configure
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-23 16:47:10 +02:00
Mans Rullgard b4cfb8254e dnxhddec: avoid a branch in 10-bit decode_dct_block()
The minimum weight value is 32 so this test can be skipped for the
10-bit case.  Overall speedup 3-4%.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-22 23:39:31 +01:00
Daniel Kang 406fbd24dc H.264: Add optimizations to predict x86 assembly.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-22 14:54:33 -07:00
Kostya Shishkov c2d23309ef add Flash Screen Video 2 decoder
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-22 09:12:30 -07:00
Michael Niedermayer 4095fa9038 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dnxhddec: optimise dnxhd_decode_dct_block()
  rtp: remove disabled code
  eac3enc: use different numbers of blocks per frame to allow higher bitrates
  dnxhd: add regression test for 10-bit
  dnxhd: 10-bit support
  dsputil: update per-arch init funcs for non-h264 high bit depth
  dsputil: template get_pixels() for different bit depths
  dsputil: create 16/32-bit dctcoef versions of some functions
  jfdctint: add 10-bit version
  mov: add clcp type track as Subtitle stream.
  mpeg4: add Mpeg4 Profiles names.
  mpeg4: decode Level Profile for MPEG4 Part 2.
  ffprobe: display bitstream level.
  imgconvert: remove unused glue and xglue macros

Conflicts:
	libavcodec/dsputil_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-22 12:08:52 +02:00
Mans Rullgard bb32fded36 dnxhddec: optimise dnxhd_decode_dct_block()
Template the function for 8/10-bit and use lowlevel bitstream
macros.

6% faster overall on i7 gcc 4.5.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 23:14:37 +01:00
Justin Ruggles be7bd626c4 eac3enc: use different numbers of blocks per frame to allow higher bitrates 2011-07-21 14:57:10 -04:00
Joseph Artsimovich 5ab21439fd dnxhd: 10-bit support
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:44:40 +01:00
Mans Rullgard a617c6aaa3 dsputil: update per-arch init funcs for non-h264 high bit depth
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard 874f1a901d dsputil: template get_pixels() for different bit depths
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard 5cc2600964 dsputil: create 16/32-bit dctcoef versions of some functions
High bitdepth H.264 needs 32-bit transform coefficients, whereas
dnxhd does not.  This creates a conflict with the templated
functions operating on DCTELEM data.  This patch adds a field
allowing the caller to choose the element size in dsputil_init()
and adds the required functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Mans Rullgard 0a72533e98 jfdctint: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Thierry Foucu c4ab43ff3c mpeg4: add Mpeg4 Profiles names.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-21 09:34:11 -07:00
Thierry Foucu 0637e50579 mpeg4: decode Level Profile for MPEG4 Part 2.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-21 09:33:34 -07:00
Stefano Sabatini 09e8163625 imgconvert: remove unused glue and xglue macros
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-07-21 17:55:27 +02:00
Michael Niedermayer ba99474b1d h264: fix h264-test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-21 16:53:24 +02:00
Michael Niedermayer f93f6963ba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rv30: return AVERROR(EINVAL) instead of EINVAL
  build: add -L flags before existing LDFLAGS
  simple_idct: whitespace cosmetics
  simple_idct: make repeated code a macro
  dsputil: remove huge #if 0 block
  simple_idct: change 10-bit add/put stride from pixels to bytes
  dsputil: allow 9/10-bit functions for non-h264 codecs
  dnxhd: rename some data tables
  dnxhdenc: remove inline from function only called through pointer
  dnxhdenc: whitespace cosmetics
  swscale: mark YUV422P10(LE,BE) as supported for output
  configure: add -xc99 to LDFLAGS for Sun CC
  Remove unused and non-compiling vestigial g729 decoder
  Remove unused code under G729_BITEXACT #ifdef.
  mpegvideo: fix invalid picture unreferencing.
  dsputil: Remove extra blank line at end.
  dsputil: Replace a LONG_MAX check with HAVE_FAST_64BIT.
  simple_idct: add 10-bit version

Conflicts:
	Makefile
	libavcodec/g729data.h
	libavcodec/g729dec.c
	libavcodec/rv30.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-21 16:28:53 +02:00
Diego Biurrun e5985185d2 rv30: return AVERROR(EINVAL) instead of EINVAL
On some platforms EINVAL could be positive, ensure we return negative values.
2011-07-21 14:26:06 +02:00
Mans Rullgard 2cc4f3b21f simple_idct: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 12:49:51 +01:00
Mans Rullgard a402f10959 simple_idct: make repeated code a macro
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 12:49:51 +01:00
Mans Rullgard 7df701a192 dsputil: remove huge #if 0 block
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 11:04:56 +01:00
Mans Rullgard e7bcc5baf7 simple_idct: change 10-bit add/put stride from pixels to bytes
This matches other dsputil functions and simplifies calls.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 09:26:37 +01:00
Mans Rullgard a82beafd64 dsputil: allow 9/10-bit functions for non-h264 codecs
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 09:26:26 +01:00
Joseph Artsimovich 42c27f2eca dnxhd: rename some data tables
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 03:30:29 +01:00
Mans Rullgard b049978397 dnxhdenc: remove inline from function only called through pointer
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 02:13:03 +01:00
Mans Rullgard 1073823984 dnxhdenc: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 02:12:47 +01:00
Diego Biurrun 79a9aab56f Remove unused and non-compiling vestigial g729 decoder 2011-07-20 20:47:07 +02:00
Diego Biurrun a005174b25 Remove unused code under G729_BITEXACT #ifdef.
G729_BITEXACT is never set, so the code is all dead code.
2011-07-20 20:47:07 +02:00
Ronald S. Bultje 80469eafb7 mpegvideo: fix invalid picture unreferencing.
Mpegvideo would free frames as soon as they're not the next or prev
picture. This is fine for a single-threading model, but fails miserably
in a system where pictures can be referenced (as e.g. last/prev pic)
in other threads. Keeping track of ownership of pictures keeps image
references (e.g. motion vectors, or the reference of a motion vector)
alive as long as the picture data itself is alive.

This also happens to fix make THREADS=[3-16] fate-vsynth[12]-error.
2011-07-20 10:26:49 -07:00
Alex Converse e4b50572b7 dsputil: Remove extra blank line at end. 2011-07-20 10:15:57 -07:00
Alex Converse d9a9f50a36 dsputil: Replace a LONG_MAX check with HAVE_FAST_64BIT. 2011-07-20 10:15:57 -07:00
Mans Rullgard e7a972e113 simple_idct: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-20 17:49:48 +01:00
Michael Niedermayer 7c6c4cf2fb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Remove h264_lowres_idct_put/add functions
  Remove snow/dwt test program
  h264: remove some disabled code
  Fix incorrect max_lowres values
  matroskadec: fix integer underflow if header length < probe length.
  cosmetics: indentation
  eac3enc: use frame exponent strategy when applicable.
  cosmetics: rename eac3dec_data.c/h to eac3_data.c/h since the tables will also be used in the E-AC-3 encoder.
  dsputil: fix ff_check_alignment()

Conflicts:
	libavcodec/Makefile
	libavcodec/h264idct_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-20 18:31:45 +02:00
Mans Rullgard 7b4ee3a21d Remove h264_lowres_idct_put/add functions
Use of these has been broken ever since the h264 idct was changed
to always use transposed inputs.  Furthermore, they were only
ever used if some *other* non-default idct was requested.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-20 16:13:04 +01:00
Mans Rullgard 89cc8a316d Remove snow/dwt test program
This test program so full of programming errors it is impossible
to make sense of it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-20 14:54:24 +01:00
Diego Biurrun 1b4a17094e h264: remove some disabled code 2011-07-20 15:04:51 +02:00
Mans Rullgard e23a05ab06 Fix incorrect max_lowres values
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-20 10:19:36 +01:00
Erik Slagter 045ef52ef5 libx264.c: distinguish between x264 parameter errors.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-20 02:20:08 +02:00
Justin Ruggles 953302656a cosmetics: indentation 2011-07-19 14:15:00 -04:00
Justin Ruggles 08a747afb9 eac3enc: use frame exponent strategy when applicable.
This checks if the set of selected exponent strategies for all blocks in a
channel are in the frame exponent strategy table, and if so, writes the
table index instead of each strategy. This saves up to 7 bits per channel per
frame, so the overall effect on quality is small.
2011-07-19 14:15:00 -04:00
Justin Ruggles 31b69928e5 cosmetics: rename eac3dec_data.c/h to eac3_data.c/h since the tables will also
be used in the E-AC-3 encoder.
2011-07-19 14:15:00 -04:00
Michael Niedermayer d303e0affd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  simple_idct: simplify some ifdeffery
  simple_idct: remove code for DCTELEM != int16
  Remove VLAs in ff_amrwb_lsp2lpc()
  fate: make vsynth tests depend on only the relevant vref
  rtsp: remove disabled code
  dsputil: restore mistakenly removed hunk of disabled code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-19 18:46:04 +02:00
Mans Rullgard 29b42c66f7 dsputil: fix ff_check_alignment()
The change to LOCAL_ALIGNED means the declared object must be an
array and the subsequent test should not use the & operator.

Noticed by Uoti Urpala.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-19 17:44:35 +01:00
Mans Rullgard 3e9409b1d0 simple_idct: simplify some ifdeffery
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-18 20:57:27 +01:00
Mans Rullgard dbb5ee8ea7 simple_idct: remove code for DCTELEM != int16
DCTELEM can never be changed to anything else, too much code
depends on it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-18 20:57:22 +01:00
Reimar Döffinger 47b71eea09 Bink: clip AC coefficients during dequantization.
Fixes artefacts with Neverwinter Nights WOTCLogo.bik
(http://drmccoy.de/zeugs/WOTCLogo.bik).
Fixes trac ticket #352.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-07-18 20:01:43 +02:00
Reimar Döffinger f04d4345da Remove a pointless/bad "static".
It has no advantage and seems to cause compile issues with
some combinations of compiler/compiler flags/PIC.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-07-18 20:00:24 +02:00
Mans Rullgard 3f5dcde7e6 Remove VLAs in ff_amrwb_lsp2lpc()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-18 18:48:13 +01:00
Diego Biurrun e463f0e979 dsputil: restore mistakenly removed hunk of disabled code
This particular part serves to document the optimized code variant.
2011-07-18 18:04:56 +02:00
Michael Niedermayer 3c3daf4d19 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vf_libopencv: replace opencv/cxtypes.h #include by opencv/cxcore.h
  dsputil: remove disabled code
  tta: remove disabled code
  gxfenc: place variable declarations before statements
  x86: Use LOCAL_ALIGNED in mpegvideo_mmx_template
  random_seed: use proper #includes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-18 16:43:46 +02:00
Diego Biurrun 65083b4911 dsputil: remove disabled code 2011-07-18 11:48:35 +02:00
Diego Biurrun c99c0e2625 tta: remove disabled code 2011-07-18 01:47:50 +02:00
Martin Storsjö 8f62ef0f95 x86: Use LOCAL_ALIGNED in mpegvideo_mmx_template
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-07-18 00:10:45 +03:00
Michael Niedermayer 78accb876c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: fix some indentation
  ffmpeg: fix operation with --disable-avfilter
  simple_idct: remove disabled code
  motion_est: remove disabled code
  vc1: remove disabled code
  fate: separate lavf-mxf_d10 test from lavf-mxf
  cabac: Move code only used in the cabac test program to cabac.c.
  ffplay: warn that -pix_fmt is no longer working, suggest alternative
  ffplay: warn that -s is no longer working, suggest alternative
  lavf: rename enc variable in utils.c:has_codec_parameters()
  lavf: use designated initialisers for all (de)muxers.
  wav: remove a use of deprecated AV_METADATA_ macro
  rmdec: remove useless ap parameter from rm_read_header_old()
  dct-test: remove write-only variable
  des: fix #if conditional around P_shuffle
  Use LOCAL_ALIGNED in ff_check_alignment()

Conflicts:
	ffmpeg.c
	libavformat/avidec.c
	libavformat/matroskaenc.c
	libavformat/mp3enc.c
	libavformat/oggenc.c
	libavformat/utils.c
	tests/ref/lavf/mxf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-17 20:12:02 +02:00
Diego Biurrun e0ae2174db simple_idct: remove disabled code 2011-07-17 17:32:37 +02:00
Diego Biurrun 473e547e80 motion_est: remove disabled code 2011-07-17 17:32:37 +02:00
Diego Biurrun 9cab9421ce vc1: remove disabled code 2011-07-17 17:32:37 +02:00
Michael Niedermayer fc096e2e86 Revert "Do not decode RV30 files if the extradata is too small"
This commit is plain wrong, theres no reason to error out at this point nor is the
error value guranteed to be negative as it should be

This reverts commit 289c60001f.
2011-07-17 14:20:52 +02:00
Diego Biurrun fd065d3e79 cabac: Move code only used in the cabac test program to cabac.c. 2011-07-17 12:56:42 +02:00
Mans Rullgard 2f07cb4d39 dct-test: remove write-only variable
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-16 19:39:19 +01:00
Mans Rullgard 58d7efdb29 Use LOCAL_ALIGNED in ff_check_alignment()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-16 19:39:19 +01:00
Michael Niedermayer 15285d8fc5 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  arm: remove disabled function dct_unquantize_h263_inter_iwmmxt()
  Remove commented-out call to non-existing function print_pow1().
  Do not decode RV30 files if the extradata is too small
  flashsv: split flashsv_decode_block() off from flashsv_decode_frame().
  ppc: remove disabled code
  libspeexdec: Drop const qualifier to silence compiler warning.
  libopenjpeg: Drop const qualifier to silence compiler warning.
  alac: Remove unused dummy code.
  Remove unused structs and tables.
  vaapi: do not assert on value read from input bitstream
  flashsvenc: replace bitstream description by a link to the specification
  flashsvenc: drop unnecessary cast
  flashsvenc: improve some variable names and fix corresponding comments
  flashsvenc: merge two consecutive if-conditions
  flashsvenc: merge variable declarations and initializations
  flashsvenc: convert some debug av_log() to av_dlog()
  flashsvenc: whitespace cosmetics
  flashsvenc: drop some unnecessary parentheses
  flashsvenc: fix some comment typos
  aacps: skip some memcpy() if src and dst would be equal
  ...

Conflicts:
	libavcodec/vaapi_mpeg2.c
	libavformat/aviobuf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-16 19:43:35 +02:00
Diego Biurrun 8342a82680 arm: remove disabled function dct_unquantize_h263_inter_iwmmxt() 2011-07-16 19:15:01 +02:00
Diego Biurrun 4d4c7f8ef0 Remove commented-out call to non-existing function print_pow1(). 2011-07-16 19:13:45 +02:00
Stefano Sabatini 7bda0c9a82 mpegvideo: fix compilation after 900321b08c
Replace:
s->last_picture_ptr->f.key_frame = 0;
with:
s->last_picture_ptr->key_frame = 0;

This is required since mpegvideo.h:Picture now contains an embedded
AVFrame f, rather than a literal copy of the AVFrame fields.
2011-07-16 18:56:47 +02:00
Rafaël Carré 289c60001f Do not decode RV30 files if the extradata is too small
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-07-16 18:17:43 +02:00
elupus 900321b08c Don't mark generated dummy frame output from mpeg1/2 decoder as keyframe.
We use this flag to tell when to assume decoded data is free
from artifacts after a seek. The mpeg1/2 decoder will generate
a dummy frame if decoding is started on a non keyframe. This
will sadly be output from decoder to player and displayed
as a gray screen.
2011-07-16 12:38:25 +02:00
Jernej Fijačko 8b973d4937 Patch for memory leaks in DVB subtitles decoder
Signed-off-by: Joakim Plate <elupus@ecce.se>
2011-07-16 12:38:20 +02:00
Diego Biurrun b8783b98c5 flashsv: split flashsv_decode_block() off from flashsv_decode_frame(). 2011-07-16 09:08:51 +02:00
Diego Biurrun 21aed0ed92 ppc: remove disabled code 2011-07-16 02:56:52 +02:00
Diego Biurrun 0523dc57ff libspeexdec: Drop const qualifier to silence compiler warning.
libavcodec/libspeexdec.c:108: warning: passing argument 2 of ‘speex_bits_read_from’ discards qualifiers from pointer target type
/usr/include/speex/speex_bits.h:80: note: expected ‘char *’ but argument is of type ‘const uint8_t *’
2011-07-16 01:26:51 +02:00
Diego Biurrun 34e36f3a1c libopenjpeg: Drop const qualifier to silence compiler warning.
libavcodec/libopenjpeg.c💯 warning: passing argument 2 of ‘opj_cio_open’ discards qualifiers from pointer target type
/usr/include/openjpeg.h:770: note: expected ‘unsigned char *’ but argument is of type ‘const uint8_t *’
2011-07-16 01:26:51 +02:00
Diego Biurrun 8b587fa292 alac: Remove unused dummy code. 2011-07-16 01:21:17 +02:00
Diego Biurrun 356be9307c Remove unused structs and tables. 2011-07-16 01:08:31 +02:00
Diego Biurrun f20418c349 vaapi: do not assert on value read from input bitstream
User-provided data should never trigger an assert; return error instead.
Also fix an instance of get_bits where get_bits_long should have been used.

This eliminates the following warning:
libavcodec/vaapi_mpeg2.c:112:14: warning: variable 'start_code' set but not used
2011-07-16 00:28:07 +02:00
Diego Biurrun 86e8272a23 flashsvenc: replace bitstream description by a link to the specification
An official specification now exists and it is both more detailed and
easier to understand than the incomplete notes available here.
2011-07-16 00:28:04 +02:00
Diego Biurrun 20a6f210cd flashsvenc: drop unnecessary cast 2011-07-16 00:27:15 +02:00
Diego Biurrun 0686515cb4 flashsvenc: improve some variable names and fix corresponding comments 2011-07-16 00:27:15 +02:00
Diego Biurrun 59ef6bded5 flashsvenc: merge two consecutive if-conditions 2011-07-16 00:27:12 +02:00
Diego Biurrun 12e9bf3e84 flashsvenc: merge variable declarations and initializations 2011-07-16 00:26:19 +02:00
Diego Biurrun b88523c25d flashsvenc: convert some debug av_log() to av_dlog() 2011-07-16 00:26:18 +02:00
Diego Biurrun 3d5669c6e9 flashsvenc: whitespace cosmetics 2011-07-16 00:26:18 +02:00
Diego Biurrun 4877356d8f flashsvenc: drop some unnecessary parentheses 2011-07-16 00:26:17 +02:00
Diego Biurrun 36ba39d140 flashsvenc: fix some comment typos 2011-07-16 00:26:15 +02:00
Mans Rullgard e5902d60ce aacps: skip some memcpy() if src and dst would be equal
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-15 22:41:52 +01:00
Michael Niedermayer 042f9d62ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Automatically add more flags required on symbian
  mem.h: switch doxygen parameter order to match function prototype
  doxygen: replace @sa tag by the more readable but equivalent @see
  doxygen: use Doxygen markup for authors and web links where appropriate
  doxygen: do not include license boilerplate in Doxygen documentation
  ac3enc: Mark AVClasses const
  ffserver: Replace two loops with one loop.
  ffmpeg: Fix the check for experimental codecs
  swscale: extend mmx padding.
  swscale: clip unscaled colorspace conversion path.
  doxygen: misc consistency cosmetics
  doc: remove file name from @file directive in Doxygen usage example
  doxygen: consistently place brief description
  doxygen: place empty line between brief description and detailed description
  avformat_open_input(): Add braces to shut up gcc warning.

Conflicts:
	libavcodec/8svx.c
	libavcodec/tiff.c
	libavcodec/tiff.h
	libavcodec/vaapi_h264.c
	libavcodec/vorbis.c
	libavcodec/vorbisdec.c
	libavcodec/vp6.c
	libswscale/swscale_unscaled.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-15 17:51:09 +02:00
Diego Biurrun bee6d2fd76 doxygen: replace @sa tag by the more readable but equivalent @see 2011-07-15 02:01:22 +02:00
Diego Biurrun ad4cd0c2a4 doxygen: use Doxygen markup for authors and web links where appropriate 2011-07-15 02:01:21 +02:00
Diego Biurrun 6168781f70 doxygen: do not include license boilerplate in Doxygen documentation 2011-07-15 00:52:09 +02:00
Martin Storsjö ca5d57ef8a ac3enc: Mark AVClasses const
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-07-15 00:26:23 +03:00
Diego Biurrun 99b9df5281 doxygen: misc consistency cosmetics 2011-07-14 20:51:15 +02:00
Diego Biurrun f6f95d4e49 doxygen: consistently place brief description 2011-07-14 20:49:37 +02:00
Diego Biurrun ec679eb453 doxygen: place empty line between brief description and detailed description
Without it, Doxygen cannot separate them into different sections.
2011-07-14 20:49:08 +02:00
Michael Niedermayer 5dc6bd86f0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  APIchanges: fill in missing hashes and dates.
  Add an APIChanges entry and bump minor versions for recent changes.
  ffmpeg: print the low bitrate warning after the codec is openend.
  doxygen: Move function documentation into the macro generating the function.
  doxygen: Make sure parameter names match between .c and .h files.
  h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
  H.264: Add more x86 assembly for 10-bit H.264 predict functions
  lavf: fix invalid reads in avformat_find_stream_info()
  cmdutils: replace opt_default with opt_default2() and remove set_context_opts
  ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
  ffplay: use new avcodec_open2 and avformat_find_stream_info API.
  cmdutils: store all codec options in one dict instead of video/audio/sub
  ffmpeg: check experimental flag after codec is opened.
  ffmpeg: do not set GLOBAL_HEADER flag in the options context

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	libavcodec/version.h
	libavformat/version.h
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 20:44:58 +02:00
Anton Khirnov f2f523fffc Add an APIChanges entry and bump minor versions for recent changes. 2011-07-14 14:16:16 +02:00
Diego Biurrun d0fcf39f0c doxygen: Move function documentation into the macro generating the function.
This fixes a bunch of related warnings where Doxygen assumed that the
documentation belonged to the macro and not the function.
2011-07-14 04:09:50 +02:00
Diego Biurrun 96c1e6d40d doxygen: Make sure parameter names match between .c and .h files. 2011-07-14 04:09:49 +02:00
Diego Biurrun 806212498a h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
This fixes a bunch of unused function warnings.
2011-07-14 04:09:49 +02:00
Daniel Kang ac4a85f476 H.264: Add more x86 assembly for 10-bit H.264 predict functions
Mainly ported from 8-bit H.264 predict.

Some code ported from x264. LGPL ok by author.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-13 18:44:51 -07:00
Michael Niedermayer 80e4fe4063 Merge commit 'b5849f77095439e994b11c25e6063d443b36c228'
* commit 'b5849f77095439e994b11c25e6063d443b36c228': (21 commits)
  ac3enc: merge AC3MDCTContext with AC3EncodeContext.
  ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext
  ac3enc: fix memleak
  mpeg1video: add CODEC_CAP_SLICE_THREADS.
  lavf: fix segfault in av_open_input_stream()
  mpegtsenc: set Random Access indicator on keyframe start packets
  lavf: Cleanup try_decode_frame() logic.
  Replace some gotos that lead to single return statements by direct return.
  build: move tests/seek_test.c to libavformat and reuse generic build rules
  mxfenc: include needed header for ff_iso8601_to_unix_time() prototype
  Add a check for strptime().
  lavf: factor out conversion of ISO8601 string to unix time
  wav: parse 'bext' metadata
  wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
  wav: Refactor the tag checking into a switch statement
  wav: make sure neither data_size nor sample_count is negative.
  wav: refactor the 'fmt ' tag search and parsing.
  wav: add an option for writing BEXT chunk
  ffmpeg: get rid of a pointless limit on number of streams.
  ffmpeg: remove an unused define.
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-14 02:24:10 +02:00
Justin Ruggles b5849f7709 ac3enc: merge AC3MDCTContext with AC3EncodeContext.
Since both the fixed-point and floating-point encoders use the FFTContext,
this no longer needs to be in a separate context. Also, when a short-transform
context is added, the same MDCT window will be used.
2011-07-13 16:55:28 -04:00
Justin Ruggles 82cea7cb6c ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext 2011-07-13 16:55:28 -04:00
Justin Ruggles f501157e53 ac3enc: fix memleak 2011-07-13 16:54:02 -04:00
Ronald S. Bultje cdc5a3a194 mpeg1video: add CODEC_CAP_SLICE_THREADS. 2011-07-13 12:41:45 -07:00
Alex Converse a58858d60d lavf: Cleanup try_decode_frame() logic.
This fixes AAC playback in ffplay.
2011-07-13 10:39:06 -07:00
Michael Niedermayer bb258fb995 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doc: Improve references to external URLs.
  h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
  ffplay: skip return value of avcodec_decode_video2 / avcodec_decode_subtitle2
  dnxhdenc: Replace a forward declaration by the proper #include.
  h264: move h264_mvpred.h include.
  pix_fmt: Fix number of bits per component in yuv444p9be
  lavf: deprecate AVFormatContext.timestamp
  ffmpeg: merge input_files_ts_scale into InputStream.
  ffmpeg: don't abuse a global for passing sample format from input to output
  ffmpeg: don't abuse a global for passing channel layout from input to output
  ffmpeg: factor common code from new_a/v/s/d_stream to new_output_stream()
  matroskaenc: make SSA default subtitle codec.
  oggdec: prevent heap corruption.

Conflicts:
	doc/developer.texi
	doc/faq.texi
	doc/general.texi
	ffmpeg.c
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-13 00:42:11 +02:00
Diego Biurrun 028216b2c2 h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
This resolves a circular dependency between the headers.
2011-07-12 20:36:50 +02:00
Reimar Döffinger 896e59758a Move resetting of channels, sample_rate back to av_find_stream_info.
Resetting it on codec init would incorrectly clear the values
if av_find_stream_info was already run before, in particular
breaking ffplay.

This fixes trac tickets #213 and #262.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-07-12 19:44:59 +02:00
Diego Biurrun 828e207337 dnxhdenc: Replace a forward declaration by the proper #include. 2011-07-12 19:24:53 +02:00
Ronald S. Bultje c90a2538a0 h264: move h264_mvpred.h include.
Fixes the following compile error with darwin/gcc-4.2.1:
In file included from libavcodec/error_resilience.c:33:
libavcodec/h264.h: In function ‘decode_mb_skip’:
libavcodec/h264.h:773: error: ‘always_inline’ function could not be inlined in call to ‘pred_pskip_motion’: the function body must appear before caller
libavcodec/h264.h:1334: error: called from here
2011-07-12 08:15:55 -07:00
Michael Niedermayer e10979ff56 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  changelog: misc typo and wording fixes
  H.264: add filter_mb_fast support for >8-bit decoding
  doc: Remove outdated comments about gcc 2.95 and gcc 3.3 support.
  lls: use av_lfg instead of rand() in test program
  build: remove unnecessary dependency on libs from 'all' target
  H.264: avoid redundant alpha/beta calculations in loopfilter
  H.264: optimize intra/inter loopfilter decision
  mpegts: fix Continuity Counter error detection
  build: remove unnecessary FFLDFLAGS variable
  vp8/mt: flush worker thread, not application thread context, on seek.
  mt: proper locking around release_buffer calls.
  DxVA2: unbreak build after [657ccb5ac7]
  hwaccel: unbreak build
  Eliminate FF_COMMON_FRAME macro.

Conflicts:
	Changelog
	Makefile
	doc/developer.texi
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-12 01:42:32 +02:00
Jason Garrett-Glaser b5bbc84fe2 H.264: add filter_mb_fast support for >8-bit decoding
Much faster high bit depth deblocking.
2011-07-11 14:58:50 -07:00
Jason Garrett-Glaser f6b7f72461 H.264: avoid redundant alpha/beta calculations in loopfilter 2011-07-11 08:46:44 -07:00
Jason Garrett-Glaser a4f6be86d6 H.264: optimize intra/inter loopfilter decision 2011-07-11 08:46:03 -07:00
Ronald S. Bultje d1cf459119 vp8/mt: flush worker thread, not application thread context, on seek.
This prevents a crash when seeking.
2011-07-10 21:41:57 -07:00
Ronald S. Bultje 5eafc8b466 mt: proper locking around release_buffer calls.
This fixes a crash when seeking in some webm files with many
threads (e.g. 8).
2011-07-10 21:41:52 -07:00
Michael Niedermayer a8c2ff2c3c Revert "lavc: remove a half-working attempt at different defaults for audio/video codecs."
This reverts commit 18c007ba37.
2011-07-11 05:46:51 +02:00
Michael Niedermayer 3602ad7ee6 Merge commit '142e76f1055de5dde44696e71a5f63f2cb11dedf'
* commit '142e76f1055de5dde44696e71a5f63f2cb11dedf':
  swscale: fix crash with dithering due incorrect offset calculation.
  matroskadec: fix stupid typo (!= -> ==)
  build: remove duplicates from order-only directory prerequisite list
  build: rework rules for things in the tools dir
  configure: fix --cpu=host with gcc 4.6
  ARM: use const macro to define constant data in asm
  bitdepth: simplify FUNC/FUNCC macros
  dsputil: remove ff_emulated_edge_mc macro used in one place
  9/10-bit: simplify clipping macros
  matroskadec: reindent
  matroskadec: defer parsing of cues element until we seek.
  lavc: add support for codec-specific defaults.
  lavc: make avcodec_alloc_context3 officially public.
  lavc: remove a half-working attempt at different defaults for audio/video codecs.
  ac3dec: add a drc_scale private option
  lavf: add avformat_find_stream_info()
  lavc: introduce avcodec_open2() as a replacement for avcodec_open().

Conflicts:
	Makefile
	libavcodec/utils.c
	libavformat/avformat.h
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-11 04:23:25 +02:00
Jean-Baptiste Kempf 58ef4ecff8 DxVA2: unbreak build after [657ccb5ac7]
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-10 16:16:19 -07:00
Mans Rullgard 1765aacb17 hwaccel: unbreak build
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-10 23:58:26 +01:00
Diego Biurrun 657ccb5ac7 Eliminate FF_COMMON_FRAME macro.
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture.  Replace by an embedded AVFrame structure in struct Picture.
2011-07-11 00:19:00 +02:00
Mans Rullgard 11043d80f6 ARM: use const macro to define constant data in asm
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-10 17:56:06 +01:00
Mans Rullgard 39c2a6bf44 bitdepth: simplify FUNC/FUNCC macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-10 17:56:06 +01:00
Mans Rullgard 710b8df949 dsputil: remove ff_emulated_edge_mc macro used in one place
This macro can cause problems in conjunction with the bitdepth
template expansion.  It was presumably added to keep source
compatibility when high bitdepth support was added.  However,
emulated_edge_mc is a dsputil pointer and should not be called
directly, so there is little reason to keep such a macro.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-10 17:55:58 +01:00
Mans Rullgard 0f6fc8660e 9/10-bit: simplify clipping macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-10 17:54:41 +01:00
Anton Khirnov 84626b364b lavc: add support for codec-specific defaults. 2011-07-10 17:10:49 +02:00
Anton Khirnov 71a861cf40 lavc: make avcodec_alloc_context3 officially public.
Deprecate avcodec_alloc_context/2.
2011-07-10 17:09:28 +02:00
Anton Khirnov 18c007ba37 lavc: remove a half-working attempt at different defaults for audio/video codecs.
It should be replaced with proper per-codec defaults.
2011-07-10 17:08:58 +02:00
Anton Khirnov 9b83919f44 ac3dec: add a drc_scale private option
Deprecate corresponding AVCodecContext option.

This is the first test of decoder private options.
2011-07-10 17:07:12 +02:00
Anton Khirnov 0b950fe240 lavc: introduce avcodec_open2() as a replacement for avcodec_open().
Adds support for decoder-private options and makes setting other options
simpler.
2011-07-10 17:06:22 +02:00
Michael Niedermayer 2f56a97f24 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  H.264: fix filter_mb_fast with 4:4:4 + 8x8dct
  alsa: limit buffer_size to 32768 frames.
  alsa: fallback to buffer_size/4 for period_size.
  doc: replace @pxref by @ref where appropriate
  mpeg1video: don't abort if thread_count is too high.
  segafilm: add support for videos with cri adx adpcm
  gxf: Fix 25 fps DV material in GXF being misdetected as 50 fps
  libxvid: Add const qualifier to silence compiler warning.
  H.264: improve qp_thresh check
  H.264: use fill_rectangle in CABAC decoding
  H.264: Remove redundant hl_motion_16/8 code
  H.264: merge fill_rectangle into P-SKIP MV prediction, to match B-SKIP
  H.264: faster P-SKIP decoding
  H.264: av_always_inline some more functions
  H.264: Add x86 assembly for 10-bit H.264 predict functions
  swscale: rename uv_off/uv_off2 to uv_off_px/byte.
  swscale: implement error dithering in planarCopyWrapper.
  swscale: error dithering for 16/9/10-bit to 8-bit.
  swscale: fix overflow in 16-bit vertical scaling.
  swscale: fix crash in 8-bpc bilinear output without alpha.
  ...

Conflicts:
	doc/developer.texi
	libavdevice/alsa-audio.h
	libavformat/gxf.c
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/x86/swscale_template.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-10 04:28:50 +02:00
Jason Garrett-Glaser 7f7dc4fb55 H.264: fix filter_mb_fast with 4:4:4 + 8x8dct 2011-07-09 13:32:55 -07:00
Frank Barchard f98c9fb27d mpeg1video: don't abort if thread_count is too high.
Instead, just decrease it to a valid value and use that.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-07-09 10:13:57 -07:00
Joakim Plate a7d3a51dd1 cosmetic: reindent of dxva2 zigzag workaround 2011-07-09 17:30:25 +02:00
Joakim Plate 6dabe0f74a Added ability to enable workaround for dxva2 decoding using older ATI cards
The workaround need to be enabled per pci id which can not
be detected inside ffmpeg. So this adds a flag that enabled
the alternate behavior.
2011-07-09 17:21:31 +02:00
Diego Biurrun d8dbe20241 libxvid: Add const qualifier to silence compiler warning.
libavcodec/libxvidff.c:752: warning: initialization discards qualifiers from pointer target type
2011-07-09 12:20:44 +02:00
Michael Niedermayer 58257ea29e Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  mp3enc: write a xing frame containing number of frames in the file
  lavf: update AVStream.nb_frames when muxing.
  ffmpeg: remove unused variables from InputStream.
  doc: update ffmpeg -ar and -ac documentation to reflect reality.
  ffmpeg: remove pointless if (nb_input_files)
  ffmpeg: merge input_files_ts_offset into input_files.
  ffmpeg: merge input_codecs into input_streams.
  ffmpeg: drop AV prefixes from struct names.
  ffmpeg: deprecate loop_input and loop_output options
  gif: add loop private option.
  img2: add loop private option.
  AVOptions: in av_opt_find() don't return named constants unless unit is specified.
  x11grab: replace undocumented nomouse hackery with a private option.
  dict: extend documentation.
  lls: whitespace cosmetics
  docs: Use proper markup for a literal command line option
  docs: Remove a remark that isn't relevant any longer
  docs: Explain how to regenerate import libraries with MSVC tools
  docs: Mention that libraries for MSVC can be built with a cross compiler
  docs: Remove old docs that mention setting up a build environment with lib.exe
  ...

Conflicts:
	doc/ffmpeg.texi
	doc/general.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/dnxhddata.c
	libavformat/mp3enc.c
	libavformat/utils.c
	libavutil/Makefile
	tests/copycooker.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-09 02:06:40 +02:00
Jason Garrett-Glaser 6a2176aac0 H.264: improve qp_thresh check
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
2011-07-08 16:12:42 -07:00
Jason Garrett-Glaser 99b6d2c065 H.264: use fill_rectangle in CABAC decoding 2011-07-08 16:12:39 -07:00
Jason Garrett-Glaser 298e52c99c H.264: Remove redundant hl_motion_16/8 code 2011-07-08 16:12:36 -07:00