Commit Graph

14138 Commits

Author SHA1 Message Date
Mans Rullgard ae2e89717b dct-test: factor out some common code and do whas was likely intended
This fixes some nonsensical code by moving some should-be-shared
code to separate functions and using these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-21 15:43:59 +01:00
Anton Khirnov 609a2fa1fa Remove some forgotten AVCodecContext.palctrl usage. 2011-09-21 13:51:53 +02:00
Anton Khirnov 9ecfbb3e57 lavc/utils: move avcodec_init() higher in the file.
Fixes build on next major bump.
2011-09-21 13:51:53 +02:00
Anton Khirnov e5b29c1f6b lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_* 2011-09-21 13:51:53 +02:00
Anton Khirnov feedc0754b ac3dec: actually use drc_scale private option 2011-09-21 13:51:53 +02:00
Anton Khirnov 63e4c8a653 lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros
They are still being used and shouldn't be removed.
2011-09-21 13:51:53 +02:00
Diego Biurrun a3e0135dbb msmpeg4: remove leftover unused debug variable declaration 2011-09-21 09:57:33 +02:00
Diego Biurrun 95a06eb4d5 Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Diego Biurrun 35a6855868 Fix av_dlog invocations with wrong or missing logging context.
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
Laurent Aimar 4cc7732386 rv34: Check for invalid slice offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-20 10:29:55 +03:00
Laurent Aimar b4ed3d78cb rv34: Fix potential overreads
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar d2213b6493 rv34: Fix buffer size used for MC of B frames after a resolution change
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar d0f6ab0298 rv34: Avoid NULL dereference on corrupted bitstream
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:44:22 +03:00
Laurent Aimar 4a29b47186 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 14:58:33 +03:00
Luca Barbato 3a78fb57de libx264: introduce slice-max-size option
Yet another option useful for low latency streaming.
2011-09-16 07:56:17 -07:00
Laurent Aimar b59efc9434 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-15 13:23:04 -07:00
Michael Niedermayer 5166376f24 smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 11:13:54 +03:00
Laurent Aimar 6489455495 Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:40:31 +03:00
Laurent Aimar 9676ffba83 Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-14 10:38:49 +03:00
Justin Ruggles 3ed7860943 include stdint.h in adpcm_data.h
fixes make checkheaders
2011-09-13 10:59:47 -04:00
Diego Biurrun a05ea77c9f mpeg12: reorder functions to avoid ugly forward declarations 2011-09-13 15:53:05 +02:00
Alex Converse 0872bb23b4 xan: Add some buffer checks 2011-09-12 11:18:57 -07:00
Alex Converse 350f57bd7b xan: Remove extra trailing newline 2011-09-12 11:18:57 -07:00
Laurent Aimar 393d5031c6 Fixed size given to init_get_bits() in xan decoder. 2011-09-12 11:18:57 -07:00
Justin Ruggles 826c56d16e adpcm: split ADPCM encoders and decoders into separate files.
Move shared tables to a separate file as well.
2011-09-12 11:26:11 -04:00
Kostya Shishkov 23a1f0c592 rv34: check that subsequent slices have the same type as first one.
This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:30 +02:00
Anton Khirnov af1e247038 libxavs: add private options corresponding to deprecated global options
Code mostly copied from libx264 wrapper.
2011-09-12 08:45:55 +02:00
Anton Khirnov d242d80e36 avconv: remove me_threshold option.
It's only shadowing the AVOption with the same name.
2011-09-11 17:30:04 +02:00
Laurent Aimar 8bfea4ab4e Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-10 18:58:57 +03:00
Alex Converse 0c1f5b93d9 cljr: init_get_bits size in bits instead of bytes 2011-09-09 15:01:00 -07:00
Alex Converse b7ce4f1d1c indeo2: fail if input buffer too small 2011-09-09 15:01:00 -07:00
Alex Converse 68ca330cbd indeo2: init_get_bits size in bits instead of bytes 2011-09-09 15:01:00 -07:00
Laurent Aimar 46b004959b ffv1: Fixed size given to init_get_bits() in decoder.
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-09 15:00:28 -07:00
Alex Converse dba2b63a98 wavpack: Check error codes rather than working around error conditions. 2011-09-08 11:02:43 -07:00
Laurent Aimar 55354b7de2 Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:04:06 +03:00
Laurent Aimar 0aedab0340 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 12:00:13 +03:00
Laurent Aimar beefafda63 Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-08 11:57:13 +03:00
Kieran Kunhya 0ca36b4de7 Add LATM muxer
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-07 12:57:55 +02:00
Baptiste Coudurier 635bbecfc3 v210enc: clip values according to specifications
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:50:11 +02:00
Baptiste Coudurier d239b83e2e v210enc: switch to PIX_FMT_422P10
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:16:21 +02:00
Baptiste Coudurier 08fa23d6c2 v210dec: switch to PIX_FMT_422P10
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 12:16:15 +02:00
Anton Khirnov 79eff91325 AVOptions: deprecate av_opt_set_defaults2
It's a hack which was created to allow for multiple options with
different defaults to refer to same field (e.g. 'b' vs 'ab'). There is
no need for it anymore.
2011-09-07 11:19:43 +02:00
Anton Khirnov 0962f23b35 libx264: fix setting some more parameters
Specifically, trellis, nr, me_range, me_method, subq, b_strategy,
keyint_min, chroma_me and coder.
Change their defaults to -1 and apply them after
x264_param_default_preset() if the user explicitly set them.
2011-09-07 10:36:15 +02:00
Andrej Peterka 2bb5d637fc libx264: fix setting the H.264 level
Move setting it after x264_param_default_preset()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-07 09:16:06 +02:00
Anton Khirnov 9c684feadc libx264: add 'direct-pred' private option
Deprecate AVCodecContext.directpred
2011-09-07 07:27:55 +02:00
Anton Khirnov 0635a8aa21 libx264: add 'partitions' private option
Deprecate AVCodecContext.partitions.
2011-09-07 07:27:18 +02:00
Anton Khirnov 7042337673 libx264: add 'cplxblur' private option
Deprecate AVCodecContext.complexityblur
2011-09-06 21:03:41 +02:00
Anton Khirnov 71b5f4427b libx264: add 'deblock' private option
Deprecate AVCodecContext.deblockalpha/deblockbeta
2011-09-06 21:02:45 +02:00
Anton Khirnov f83c45183e libx264: add 'b-bias' private option
Deprecate AVCodecContext.bframebias.
2011-09-06 20:14:35 +02:00
Anton Khirnov bb73cda2f6 libx264: fix setting some options.
Specifically: gop_size, max_b_frames, scenechange_threshold, qmin, qmax,
max_qdiff, qblur, qcompress and refs.

Change their default values to -1 and only use them if the user
explicitly set them. Otherwise x264 defaults are used.

Move setting those options after x264_param_default_preset(), so they
don't get overwritten by it.
2011-09-06 20:13:28 +02:00
Anton Khirnov d8dee0e7bd libx264: remove useless assignment
priv_data is memset to 0.
2011-09-06 20:13:11 +02:00
Reimar Döffinger 459fe331e9 ac3dec: avoid pointless alloc and indirection for input_buffer
Since we now always allocate it, it can simply be made part of the context
instead.
2011-09-06 12:43:16 -04:00
Diego Biurrun 6192b6f3e7 mpeg12: cosmetics: reformat as K&R 2011-09-06 11:46:57 +02:00
Justin Ruggles ae264bb29b ac3enc: Add channel coupling support for the fixed-point AC-3 encoder.
Update FATE references accordingly.
2011-09-05 10:09:44 -04:00
Justin Ruggles a0d17b6d45 ac3enc: scale floating-point coupling channel coefficients in
scale_coefficients() rather than in apply_channel_coupling()
2011-09-05 10:07:43 -04:00
Justin Ruggles 3e5722a8ca ac3enc: fix encoding of stereo ac3 files when rematrixing is disabled.
The number of rematrixing bands still needs to be calculated.
2011-09-05 09:24:59 -04:00
Kostya Shishkov bcd4aa8bec wavpack: fix wrong return value in wavpack_decode_block()
This function should return number of samples decoded, not number of bytes
decoded.
Spotted by Uoti Urpala.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-05 12:44:26 +02:00
Dustin Brody ff17fc6353 mpeg12: propagate more real return values through chunk decode error return and fix some indentation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:19:14 +02:00
Kostya Shishkov 9bc4e21a9b wavpack: use context reset in appropriate places
This fixes improper flushing in the cases when the same frame is decoded in
several iterations (for being too large to fit into output buffer) and flush is
called mid-decoding and it also resets context in case of decoding errors.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-05 11:18:27 +02:00
Anton Khirnov fb47997edb lavc: fix type for thread_type option
It should be flags, not int.
2011-09-04 13:15:36 +02:00
Anton Khirnov fb4ca26bdb lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions. 2011-09-03 20:53:35 +02:00
Anton Khirnov c11fb8288d AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
2011-09-03 20:52:21 +02:00
Anton Khirnov 9bc9188e58 libmp3lame: fix typo
FF_API_LAME_GLOBAL_OPTIONS => FF_API_LAME_GLOBAL_OPTS

Thanks to Clément Bœsch for spotting.
2011-09-01 10:37:19 +02:00
Anton Khirnov 1440037411 libx264: use X264_THREADS_AUTO constant instead of 0. 2011-09-01 10:12:30 +02:00
Anton Khirnov 5d06f15235 libx264: set default thread count to 0 (auto) 2011-08-31 17:39:13 +02:00
Anton Khirnov f013cb8118 lavc: cosmetics, group deprecated codec flags 2011-08-31 13:28:54 +02:00
Anton Khirnov aed7900704 mpeg12: add 'scan_offset' private option.
Deprecate CODEC_FLAG_SVCD_SCAN_OFFSET
2011-08-31 13:28:41 +02:00
Anton Khirnov 4bcee8e7f8 h263/p encoder: add 'structured_slices' private option.
Deprecate CODEC_FLAG_H263P_SLICE_STRUCT
2011-08-31 13:28:26 +02:00
Anton Khirnov 0d904de89d h263/p encoder: add 'obmc' private option.
Deprecate CODEC_FLAG_OBMC
2011-08-31 13:28:11 +02:00
Anton Khirnov e3922d1110 h263p encoder: add 'aiv' private option.
Deprecate CODEC_FLAG_H263P_AIV
2011-08-31 13:27:59 +02:00
Anton Khirnov 9bb2d1a3f0 h263p encoder: add 'umv' private option.
Deprecate CODEC_FLAG_H263P_UMV
2011-08-31 13:27:36 +02:00
Anton Khirnov 0e5d37309f mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option.
Deprecate CODEC_FLAG_ALT_SCAN
2011-08-31 13:26:26 +02:00
Anton Khirnov 1f0c7020a1 mjpegdec: add 'extern_huff' private option.
Deprecate CODEC_FLAG_EXTERN_HUFF
2011-08-31 13:25:54 +02:00
Anton Khirnov 4623420d84 mpeg4enc: add 'data_partitioning' private option.
Deprecate CODEC_FLAG_PART
2011-08-31 13:25:18 +02:00
Anton Khirnov 0cc06b9e23 snow: add 'memc_only' private option.
Deprecate CODEC_FLAG2_MEMC_ONLY
2011-08-31 13:24:16 +02:00
Anton Khirnov 0dc5e12f1e libx264: add 'mbtree' private option.
Deprecate CODEC_FLAG2_MBTREE
2011-08-31 13:24:02 +02:00
Anton Khirnov 38934f19fe libx264: add 'psy' private option.
Deprecate CODEC_FLAG2_PSY
2011-08-31 13:23:37 +02:00
Anton Khirnov a7cec3a094 libmp3lame: add 'reservoir' private option.
Deprecate CODEC_FLAG2_BIT_RESERVOIR
2011-08-31 13:22:53 +02:00
Anton Khirnov 88262ca87d mpeg2enc: add 'non_linear_quant' private option
Deprecate CODEC_FLAG2_NON_LINEAR_QUANT
2011-08-31 13:21:59 +02:00
Anton Khirnov 2c5e1efc09 mpeg12enc: add drop_frame_timecode private option.
Deprecate CODEC_FLAG2_DROP_FRAME_TIMECODE
2011-08-31 13:21:05 +02:00
Anton Khirnov 297d9cb3dc mpeg12enc: add intra_vlc private option.
Deprecate CODEC_FLAG2_INTRA_VLC.
2011-08-31 13:19:14 +02:00
Alberto Delmás d2f119a1f2 VC1: Support dynamic dimension changes
Fixes SA00072, SA00073, SA10150, SA10151, Issue2076

Improves SA10153

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-31 13:11:23 +02:00
Dustin Brody a18e04bcf9 mjpeg: treat external huffman table setup failure as codec init failure if external huffman table use requested
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-31 10:28:29 +02:00
Anton Khirnov 7485e54708 lavc: deprecate CODEC_FLAG2_BRDO
It's been unused for the last 3 years.
2011-08-31 10:26:21 +02:00
Anton Khirnov cf90c5d0e0 libx264: add 'aud' private option.
Deprecate CODEC_FLAG2_AUD.
2011-08-31 10:26:11 +02:00
Anton Khirnov 3b82aeeec0 libx264: add 'fast-pskip' private option.
Deprecate CODEC_FLAG2_FASTPSKIP.
2011-08-31 10:25:54 +02:00
Anton Khirnov 373257fa79 libx264: add '8x8dct' private option.
Deprecate CODEC_FLAG2_8X8DCT.
2011-08-31 10:25:34 +02:00
Anton Khirnov eab21c32e3 libx264: add 'mixed-refs' private option.
Deprecate CODEC_FLAG2_MIXED_REFS.
2011-08-31 10:25:06 +02:00
Anton Khirnov 0f29699db7 libx264: add 'weightb' private option.
Deprecate CODEC_FLAG2_BPYRAMID.
2011-08-31 10:24:56 +02:00
Anton Khirnov 34dda1251d libx264: add 'b-pyramid' private option.
Deprecate CODEC_FLAG2_BPYRAMID.
2011-08-31 10:24:17 +02:00
Anton Khirnov 5d4a1048ee libx264: add 'intra-refresh' private option.
Deprecate CODEC_FLAG2_INTRA_REFRESH.
2011-08-31 10:23:26 +02:00
Anton Khirnov faaecd4708 libx264: add 'ssim' private option.
Deprecate CODEC_FLAG2_SSIM.
2011-08-31 10:23:03 +02:00
Anton Khirnov 3b81636f33 libx264: make options compatible with x264
Replace '_' with '-', merge psy-trellis into psy-rd and rename cqp->qp
Also fix typo pdy-rd -> psy-rd
2011-08-31 10:21:36 +02:00
Luca Barbato dde372934a avcodec: remove misleading comment
coded_width is the width before lowres scaling,
coded_height is the height before lowres scaling.
2011-08-31 09:57:46 +02:00
Kostya Shishkov a80852316e RV40: reuse some H.264 motion compensation functions in RV40.
Since RV40 is based on H.264, it uses the same interpolation filters and
functions for halfpel interpolation in one direction can be reused.
Unfortunately other cases are implemented differently and produce slightly
different output because of rounding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-08-30 12:04:46 +01:00
Luca Barbato 22141917a9 Revert "h264: Properly set coded_{width, height} when parsing H.264."
This reverts commit b47904d158.

coded_{width, height} overwrites width and height in avcodec_open and
it currently just report the non-lowres size.
2011-08-29 18:32:31 +02:00
Diego Biurrun 0249478756 doxygen: fix wrong comment syntax, //< vs. ///< 2011-08-26 18:34:28 +02:00
Diego Biurrun 0138a8dead doxygen: drop pointless star from pointer variable names 2011-08-26 18:08:38 +02:00
Dustin Brody f913eeea43 vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 15:49:56 -07:00
Dustin Brody 09c274e067 mpeg12: propagate chunk decode errors and fix conditional indentation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-25 15:49:28 -07:00