Commit Graph

21433 Commits

Author SHA1 Message Date
Michael Niedermayer 623cfc93d9 pngdec: check that format matches too not just dimensions
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 19:59:05 +01:00
Michael Niedermayer 02a325cb6f tiffdec: check rps, fix infinite loop.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 19:28:57 +01:00
Michael Niedermayer b8dc5f8bb3 twinvq: check bitrate for validity avoid division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 18:46:17 +01:00
Michael Niedermayer fb6a72cde5 iff: avoid out of array reads, due to too many planes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 17:47:51 +01:00
Michael Niedermayer 9195377bc5 vp56dec: Fix handling of alpha configuration changes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 17:03:47 +01:00
Michael Niedermayer 4c6e7c2d4d ivi_common: dont dereference null pointers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 14:17:42 +01:00
Michael Niedermayer 13451f5520 atrac3dec: Check coding mode against channels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 13:26:20 +01:00
Michael Niedermayer 5ee008e01d qdm2: check that coding_method is valid before using it.
Fixes out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 13:13:50 +01:00
Michael Niedermayer 909a18f73b mjpegbdec: dont return a picture when there is no picture.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:44:26 +01:00
Michael Niedermayer 6d1c5ea04a tiffdec: check count in metadata reading.
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:14:28 +01:00
Michael Niedermayer ce1ebb31a9 tiffdec: use checked reads for tget*()
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 12:05:03 +01:00
Michael Niedermayer 1b5a6d3c49 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flacenc: ensure the order is within the min/max range in LPC order search
  avconv: rescale packet duration to muxer time base when flushing encoders
  add 24-bit FLAC encoding to Changelog
  rtpenc_aac: Fix calculation of the header size
  x86: h264_intrapred: port to cpuflags

Conflicts:
	Changelog
	libavformat/rtpenc_aac.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-09 10:29:51 +01:00
Justin Ruggles 3a2731cbd3 flacenc: ensure the order is within the min/max range in LPC order search
This fixes use of uninitialized values when the FLAC encoder uses the
2-level, 4-level, and 8-level search methods. Fixes failure of the
fate-flac-24-comp-8 test when run using valgrind.
2012-11-08 13:57:34 -05:00
Michael Niedermayer 3affcc99a8 frame_thread_encoder: silence integer to pointer without cast warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 18:25:24 +01:00
Diego Biurrun 6ca60d4ddd x86: h264_intrapred: port to cpuflags 2012-11-08 18:05:23 +01:00
Michael Niedermayer 4a28962454 libopencore-amr: fix av_log() argument
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 15:46:51 +01:00
Michael Niedermayer bc17a6f5c0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libvpxenc: Allow enabling constrained quality (CQ) mode

Conflicts:
	configure
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-08 08:07:05 +01:00
James Zern 12776d5d2a libvpxenc: Allow enabling constrained quality (CQ) mode
The CQ mode was introduced in libvpx 0.9.6.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 00:01:54 +02:00
Michael Niedermayer 4d2f83f8ac gsm_parser: fix infinite loop
Fixes Ticket1894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 18:08:23 +01:00
Paul B Mahol 08101e62cb adpcm: improve smjpeg decoding
Previous version had significant artifacts.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-07 13:03:50 +00:00
Michael Niedermayer fdfbb793c3 ffv1dec: propagate return code from ffv1_common_init()
Fixes Ticket1824
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 13:27:01 +01:00
Michael Niedermayer dd11615bbc ffv1dec: more completely check slice count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 13:26:37 +01:00
Michael Niedermayer cb395929e3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopencore-amr: Check the return value of amr_decode_fix_avctx

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 10:26:40 +01:00
Michael Niedermayer de0aa9e5a4 kgv1dec: fix end condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-07 01:51:24 +01:00
Martin Storsjö ad961726dc libopencore-amr: Check the return value of amr_decode_fix_avctx
This allows getting rid of redundant checks later in the codec
specific init functions.

Move the check to before actually initializing the decoder lib,
to simplify error handling.

This fixes a case of returning a value from a void function, present since
d40dab907.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-07 00:48:50 +02:00
Paul B Mahol 4744f67d4f wavpack: check if number of samples is not too big
Wavpack format documentation mentions that 131072 is
max number of samples.

This fixes huge memory allocations in sample from ticket #1889.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-06 16:15:19 +00:00
Paul B Mahol 0fe8c9f458 wavpack: use more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-06 12:56:44 +00:00
Michael Niedermayer 6493842900 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: add a 24-bit FLAC encoding test
  FATE: rename FLAC tests from flac-* to flac-16-*
  flacenc: use RICE2 entropy coding mode for 24-bit
  flacenc: add 24-bit encoding
  flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 23:01:34 +01:00
Michael Niedermayer 7d26be63c2 Merge commit '5ff998a233d759d0de83ea6f95c383d03d25d88e'
* commit '5ff998a233d759d0de83ea6f95c383d03d25d88e':
  flacenc: use uint64_t for bit counts
  flacenc: remove wasted trailing 0 bits
  lavu: add av_ctz() for trailing zero bit count
  flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
  fate: aac: Place LATM tests and general AAC tests in different groups
  build: The A64 muxer depends on rawenc.o for ff_raw_write_packet()

Conflicts:
	doc/APIchanges
	libavutil/version.h
	tests/fate/aac.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 22:51:20 +01:00
Michael Niedermayer e859339e7a Merge commit '930e26a3ea9d223e04bac4cdde13697cec770031'
* commit '930e26a3ea9d223e04bac4cdde13697cec770031':
  x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
  x86: PABSW: port to cpuflags
  x86: vc1dsp: port to cpuflags
  rtmp: Use av_strlcat instead of strncat

Conflicts:
	libavcodec/x86/h264_qpel.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 22:36:05 +01:00
Paul B Mahol 10ac70d249 avrndec: use more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-05 20:47:22 +00:00
Paul B Mahol efbe162f7d cljr: use meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-05 20:47:13 +00:00
Justin Ruggles 5ff998a233 flacenc: use uint64_t for bit counts
Needed to avoid integer overflows for 24-bit encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles e783316322 flacenc: remove wasted trailing 0 bits 2012-11-05 15:32:30 -05:00
Justin Ruggles 2e76f34387 flacenc: use RICE2 entropy coding mode for 24-bit 2012-11-05 15:32:30 -05:00
Justin Ruggles 13e1ee6c84 flacenc: add 24-bit encoding 2012-11-05 15:32:30 -05:00
Justin Ruggles 799e232490 flacdsp: move lpc encoding from FLAC encoder to FLACDSPContext
Also, templatize the functions for 16-bit and 32-bit sample range. This will
be used for 24-bit FLAC encoding.
2012-11-05 15:32:30 -05:00
Justin Ruggles 6a744d2619 flacenc: use a separate buffer for byte-swapping for MD5 checksum on big-endian
This is much faster than calculating the MD5 one sample at a time.
2012-11-05 15:32:29 -05:00
Diego Biurrun 930e26a3ea x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled
This fixes compilation with --disable-everything and components enabled.
2012-11-05 20:48:43 +01:00
Piotr Bandurski 8d88920578 dpcm: use AV_LOG_ERROR for error message. 2012-11-05 17:44:24 +01:00
Diego Biurrun dbb37e7711 x86: PABSW: port to cpuflags 2012-11-05 14:51:10 +01:00
Diego Biurrun 6c104826bd x86: vc1dsp: port to cpuflags 2012-11-05 14:51:10 +01:00
Michael Niedermayer f4aaf987a5 frame_thread_encoder: fix handling of case where the encoder does not output a packet.
This case could cause a deadlock

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 13:30:08 +01:00
Carl Eugen Hoyos c673ef1288 Write tiff tag YCbCrPositioning if chroma_sample_location is top-left. 2012-11-05 04:43:17 +01:00
Paul B Mahol cc5bcaa48e pnm: cosmetics: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:35:09 +00:00
Paul B Mahol ae5ecb8e60 pnm: remove duplicated check for maxval > 255
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:33:17 +00:00
Paul B Mahol a0348d0966 pnm: remove nonsense code
If maxval is more than 255 than each value takes 2 bytes with most
significant byte first.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 23:17:12 +00:00
Michael Niedermayer 5eaeb4237b ivi_common: dc_transform is needed for intra
Fixes CID90582 CID90536
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 19:27:15 +01:00
Michael Niedermayer 712287ef45 ff_ac3_apply_rematrixing: set flags to NULL
This makes the code more robust

Related to CID703820
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 19:26:54 +01:00
Paul B Mahol 1b3dbe3f75 lcldec: fix decoding of uncompressed rgb24 sample
Sample from ticket #1216 does not use any compression but bitstream
claims it is. Reference decoder decodes sample just fine.

Fixes #1216.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 16:58:14 +00:00
Michael Niedermayer a15adabdd3 aacsbr: fix integer overflow
Fixes CID603186
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 17:37:28 +01:00
Carl Eugen Hoyos b5d496f3a4 Support new transparency colour-spaces with libopenjpeg.
Reviewed-by: Michael Bradshaw
2012-11-04 17:32:31 +01:00
Paul B Mahol b0428741c6 indeo3: move get_buffer() above decode_plane() calls
This ensure that decode_plane() mmx code like AV_COPY64()
does not interfere with possible float instructions in
release_buffer/get_buffer.

Found-by: Carl Eugen Hoyos

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-04 14:42:32 +00:00
Michael Niedermayer bbd7b46b94 sab_diamond_search: add assert to double check the minima_count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 13:00:20 +01:00
Michael Niedermayer c9e4554329 cook: fix use of uninitialized variable
Fixes CID741418
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-04 01:03:52 +01:00
Stefano Sabatini aa48446c9a lavc/xfaceenc: prefer do{}while() over for(){} construct in xface_encode_frame() loop
Slightly simplify readability, since the initial check is unnecessary.
2012-11-03 23:35:50 +01:00
Xidorn Quan 0ecef3a0ef amr_decode_fix_avctx should not return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 21:38:37 +01:00
Stefano Sabatini 0372ecfa48 lavc/options_table: force non-negative bitrate range
It does not make sense to set a negative bitrate.
2012-11-03 20:38:02 +01:00
Michael Niedermayer 930226cf52 crystalhd: fix missing braces warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 20:22:53 +01:00
Michael Niedermayer 37e81996dc Merge commit '9221efef7968463f3e3d9ce79ea72eaca082e73f'
* commit '9221efef7968463f3e3d9ce79ea72eaca082e73f':
  lavf: fix av_interleaved_write_frame() doxy.
  lavf: clarify the lifetime of demuxed packets.
  avconv: do not free muxed packet on streamcopy.
  crc: move doxy to the header
  vf_drawtext: do not use deprecated av_tree_node_size
  x86: Refactor PSWAPD fallback implementations and port to cpuflags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 14:24:11 +01:00
Michael Niedermayer 1885ffb03d Merge commit '9a07c1332cfe092b57b5758f22b686ca58806c60'
* commit '9a07c1332cfe092b57b5758f22b686ca58806c60':
  parser: Move Doxygen documentation to the header files
  PGS subtitles: Expose forced flag
  x86: PMINUB: port to cpuflags

Conflicts:
	libavcodec/avcodec.h
	libavcodec/pgssubdec.c
	libavcodec/version.h
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 14:13:45 +01:00
Michael Niedermayer 1dad486714 Merge commit '9ce02e14f01de50fcc6f7f459544b140be66d615'
* commit '9ce02e14f01de50fcc6f7f459544b140be66d615':
  x86: ac3dsp: port to cpuflags
  x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
  x86inc: Only define program_name if the macro is unset

Conflicts:
	libavcodec/x86/ac3dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 13:38:38 +01:00
Stefano Sabatini 1c755f7667 lavc/options_table: make "request_sample_fmt" an AV_OPT_TYPE_SAMPLE_FMT option
Simplify, increase robustness in case a new sample format is added.
2012-11-03 12:15:42 +01:00
Michael Niedermayer d3dfe99bc5 libgsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 00:50:22 +01:00
Michael Niedermayer 6e6033b793 gsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-03 00:50:22 +01:00
Paul B Mahol 20ac916e6d indeo3: release buffer before calling decode_plane 2012-11-02 23:43:23 +00:00
Paul B Mahol b02116cc4a Revert "Partly revert f174fba: indeo3 decoder does not support direct rendering."
f174fba did not introduce DR1 flag it was already available before that.

This reverts commit 8bf44d5c96.
2012-11-02 23:36:57 +00:00
Michael Niedermayer 4ad6ef00a2 libvo-amrwbenc: allow sampling rates other than 16khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer b30f4510d8 libopencore-amr: allow sampling rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer 0aaf0a07d4 libopencore-amrdec: allow sampling rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer 2c1e9383a2 amrwbdec: allow sample rates other than 16khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Michael Niedermayer d8aaec38fc amrnbdec: allow sample rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 23:47:58 +01:00
Paul B Mahol f58f600c68 lclenc: make compression level user selectable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-02 22:14:14 +00:00
Heesuk Jung 25b7aa980b Fix bit_rate in MPEG1/2 Video
In ISO/IEC 13818-2, bit rate is differently determined according to video type

1) MPEG1 Video
 Bit_rate and vbv_delay are set to 3FFFF and FFFF respectively
 to indicate variable bitrate. Other values are for constant bitrate.
 VBV is only defined for constant bit rate operation.
 Ths STD supersedes the VBV model for vbr.

2) MPEG2 Video
 Even if the bitrate is constant, the value of bit_rate may not be the actual bitrate
 since bit_rate need only be an upper bound to that actual bitrate.
 VBV is only defined for variable bit rate operation.
 Constant bit rate is viewed as a special case of vbr.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 22:27:17 +01:00
Paul B Mahol 77d89a5b16 apedec: consume packet after it has been fully decoded
Timestamp handling of decoded frames are much simpler now.

Fixes #1675.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-02 19:44:49 +00:00
Diego Biurrun 0a7a94f2e5 x86: Refactor PSWAPD fallback implementations and port to cpuflags 2012-11-02 17:05:29 +01:00
Diego Biurrun 9a07c1332c parser: Move Doxygen documentation to the header files 2012-11-02 16:44:23 +01:00
John Stebbins 85f67c4865 PGS subtitles: Expose forced flag
Useful for detection of subtitles displayed during foreign language
scenes.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-02 16:13:35 +01:00
Diego Biurrun 26f01bd106 x86: PMINUB: port to cpuflags 2012-11-02 15:38:15 +01:00
Diego Biurrun 9ce02e14f0 x86: ac3dsp: port to cpuflags 2012-11-02 15:24:50 +01:00
Nicolas George 805b57001f lavc/pngdec: decode textual data (tEXt and zTXt).
Requested in trac ticket #1857.
2012-11-02 15:12:29 +01:00
Michael Niedermayer 8551c6bec0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv1394: Swap the min and max values of the 'standard' option
  rtpdec_vp8: Don't parse fields that aren't used
  lavc: add some AVPacket doxy.
  audiointerleave: deobfuscate a function call.
  rtpdec: factorize identical code used in several handlers
  a64: remove interleaved mode.
  doc: Point to the new location of the c99-to-c89 tool
  decode_audio3: initialize AVFrame
  ws-snd1: set channel layout
  wmavoice: set channel layout
  wmapro: use AVCodecContext.channels instead of keeping a private copy
  wma: do not keep private copies of some AVCodecContext fields

Conflicts:
	libavcodec/wmadec.c
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:57:36 +01:00
Michael Niedermayer 6788350281 Merge commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff'
* commit '50a65e7a540ce6747f81d6dbf6a602ad35be77ff': (24 commits)
  vmdaudio: set channel layout
  twinvq: validate sample rate code
  twinvq: set channel layout
  twinvq: validate that channels is not <= 0
  truespeech: set channel layout
  sipr: set channel layout
  shorten: validate that the channel count in the header is not <= 0
  ra288dec: set channel layout
  ra144dec: set channel layout
  qdm2: remove unneeded checks for channel count
  qdm2: make sure channels is not <= 0 and set channel layout
  qcelpdec: set channel layout
  nellymoserdec: set channels to 1
  libopencore-amr: set channel layout for amr-nb or if not set by the user
  libilbc: set channel layout
  dpcm: use AVCodecContext.channels instead of keeping a private copy
  imc: set channels to 1 instead of validating it
  gsmdec: always set channel layout and sample rate at initialization
  libgsmdec: always set channel layout and sample rate at initialization
  g726dec: do not validate sample rate
  ...

Conflicts:
	libavcodec/dpcm.c
	libavcodec/qdm2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:20:33 +01:00
Michael Niedermayer 00aa7fa786 pcm: fix handling of more than 8 channels for planar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:00:23 +01:00
Michael Niedermayer db9f426cab Merge commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03'
* commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03':
  dcadec: allow the decoder to change the channel layout mid-stream
  cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR
  cook: move samples_per_frame from COOKSubpacket to where it is used
  cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels()
  cook: reverse a condition so that the code makes more sense
  cook: remove unneeded COOKContext variable, sample_rate
  cook: remove unneeded COOKContext variable, bit_rate
  cook: use AVCodecContext.channels instead of keeping a private copy
  bmvaudio: set channel layout at init() rather than validating it
  atrac1: do not keep a copy of channel count in the private context
  dsicinaudio: set channels and channel layout
  g722dec: set channel layout at initialization instead of validating it
  amrwbdec: set channels, channel_layout, and sample_rate
  amrnbdec: set channels, channel_layout, and sample_rate
  dca_parser: allow the parser to change the sample rate
  lavc: check channel count after decoder init
  lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders

Conflicts:
	libavcodec/dcadec.c
	libavcodec/pcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 13:43:57 +01:00
Anton Khirnov 0876c28080 lavc: add some AVPacket doxy. 2012-11-02 07:58:38 +01:00
Ilkka Ollakka 6d1270a0f9 decode_audio3: initialize AVFrame
Same fix and issue as in a25d912dca

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-01 19:43:05 +01:00
Justin Ruggles 5459848b14 ws-snd1: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles f7b8506573 wmavoice: set channel layout 2012-11-01 11:30:04 -04:00
Justin Ruggles 50a65e7a54 vmdaudio: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles 002097a00b wmapro: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:19 -04:00
Justin Ruggles b5f628e227 twinvq: validate sample rate code
A large invalid value could cause undefined behavior when left-shifted
by 8 later in the function.
2012-11-01 11:29:19 -04:00
Justin Ruggles 2ed40608e9 wma: do not keep private copies of some AVCodecContext fields
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
2012-11-01 11:29:19 -04:00
Justin Ruggles 335826cf5f twinvq: set channel layout 2012-11-01 11:29:19 -04:00
Justin Ruggles 8cc72ce5a0 twinvq: validate that channels is not <= 0
This could occur due to integer overflow when reading the channel count from
the extradata.
2012-11-01 11:29:19 -04:00
Justin Ruggles cebea00c8a truespeech: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles 523734eb6a sipr: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles 4c53f4aed3 shorten: validate that the channel count in the header is not <= 0 2012-11-01 11:29:18 -04:00
Justin Ruggles 4e13e50432 ra288dec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles 6159f64364 ra144dec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles eb38d8fe92 qdm2: remove unneeded checks for channel count 2012-11-01 11:29:18 -04:00
Justin Ruggles be2ab8b75a qdm2: make sure channels is not <= 0 and set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles e3d6ab5704 qcelpdec: set channel layout 2012-11-01 11:29:18 -04:00
Justin Ruggles d26701ce2f nellymoserdec: set channels to 1 2012-11-01 11:29:17 -04:00
Justin Ruggles d40dab907a libopencore-amr: set channel layout for amr-nb or if not set by the user 2012-11-01 11:29:17 -04:00
Justin Ruggles 30f8da29bf libilbc: set channel layout 2012-11-01 11:29:17 -04:00
Justin Ruggles 0fd1ddf155 dpcm: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:17 -04:00
Justin Ruggles 1c7a016153 imc: set channels to 1 instead of validating it 2012-11-01 11:29:17 -04:00
Justin Ruggles 32c7769e5c gsmdec: always set channel layout and sample rate at initialization
Only mono 8kHz is supported.
2012-11-01 11:29:17 -04:00
Justin Ruggles 8ac0f6767b dcadec: allow the decoder to change the channel layout mid-stream 2012-11-01 11:29:16 -04:00
Justin Ruggles c5b8acad73 libgsmdec: always set channel layout and sample rate at initialization
Only mono 8kHz is supported.
2012-11-01 11:29:16 -04:00
Justin Ruggles a346aaf148 g726dec: do not validate sample rate
For decoding it does not really matter what the sample rate is.
2012-11-01 11:29:16 -04:00
Justin Ruggles e00eb03cd8 g726dec: set channel layout at initialization instead of validating it 2012-11-01 11:29:16 -04:00
Justin Ruggles 99d8686357 flacdec: do not warn on sample rate change 2012-11-01 11:29:16 -04:00
Justin Ruggles 90fcac0e95 flacdec: allow mid-stream channel layout change
Although the libFLAC decoder cannot handle such a change, it is allowed by the
spec and could potentially occur with live streams.
2012-11-01 11:29:16 -04:00
Justin Ruggles 268f8ba112 flacdec: use av_samples_* functions for sample buffer allocation
Also, return an error on allocation failure.
2012-11-01 11:29:16 -04:00
Justin Ruggles 93e27f86f1 cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR 2012-11-01 11:29:15 -04:00
Justin Ruggles 8f173ef019 cook: move samples_per_frame from COOKSubpacket to where it is used 2012-11-01 11:29:15 -04:00
Justin Ruggles 7efbba2e36 cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels() 2012-11-01 11:29:15 -04:00
Justin Ruggles d21b2e4726 cook: reverse a condition so that the code makes more sense 2012-11-01 11:29:15 -04:00
Justin Ruggles 926e9d28f1 cook: remove unneeded COOKContext variable, sample_rate 2012-11-01 11:29:15 -04:00
Justin Ruggles 8aa5b8c5c8 cook: remove unneeded COOKContext variable, bit_rate 2012-11-01 11:29:15 -04:00
Justin Ruggles 3509eee19c cook: use AVCodecContext.channels instead of keeping a private copy 2012-11-01 11:29:14 -04:00
Justin Ruggles a3145d0335 bmvaudio: set channel layout at init() rather than validating it 2012-11-01 11:29:14 -04:00
Justin Ruggles a38eadf7ed atrac1: do not keep a copy of channel count in the private context 2012-11-01 11:29:14 -04:00
Justin Ruggles 4f56f9c48f dsicinaudio: set channels and channel layout 2012-11-01 11:29:14 -04:00
Justin Ruggles ec2694d259 g722dec: set channel layout at initialization instead of validating it 2012-11-01 11:29:14 -04:00
Justin Ruggles ee0e9678e7 amrwbdec: set channels, channel_layout, and sample_rate
Only mono 16kHz is supported.
2012-11-01 11:29:14 -04:00
Justin Ruggles b24a4449a5 amrnbdec: set channels, channel_layout, and sample_rate
Only mono 8kHz is supported.
2012-11-01 11:29:14 -04:00
Justin Ruggles a4202003b2 dca_parser: allow the parser to change the sample rate 2012-11-01 11:29:13 -04:00
Justin Ruggles 0366664ef9 lavc: check channel count after decoder init
Ensures the decoder did not set channel count to an insanely high value
during initialization, which could cause large memory usage when it tries to
get a buffer during decoding.
2012-11-01 11:29:13 -04:00
Justin Ruggles bb6941af2a lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders 2012-11-01 11:29:13 -04:00
Michael Niedermayer 7fd9d49ba7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: add ac3/eac3 tests to FATE_SAMPLES_AVCONV
  avconv_opt, cmdutils: Add missing function parameter Doxygen
  x86: Move optimization suffix to end of function names

Conflicts:
	cmdutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-01 13:25:46 +01:00
Michael Niedermayer add7513e64 Merge commit 'fa8fcab1e0d31074c0644c4ac5194474c6c26415'
* commit 'fa8fcab1e0d31074c0644c4ac5194474c6c26415':
  x86: h264_chromamc_10bit: drop pointless PAVG %define
  x86: mmx2 ---> mmxext in function names
  swscale: do not forget to swap data in formats with different endianness

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavfilter/x86/gradfun.c
	libswscale/input.c
	libswscale/utils.c
	libswscale/x86/swscale.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-01 13:11:51 +01:00
Paul B Mahol bb9bc1fc98 flicvideo: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-01 00:29:05 +00:00
Paul B Mahol 010f1ce954 ffv1: assert that there is at least one slice
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-31 19:42:07 +00:00
Diego Biurrun fa8fcab1e0 x86: h264_chromamc_10bit: drop pointless PAVG %define
It is only used in one place so there is no need for the abstraction.
2012-10-31 18:21:55 +01:00
Diego Biurrun c37322e68c x86: Move optimization suffix to end of function names
This simplifies cpuflags porting.
2012-10-31 18:21:55 +01:00
Diego Biurrun d8eda37080 x86: mmx2 ---> mmxext in function names 2012-10-31 17:53:57 +01:00
Nick Brereton 09ea482d5d Fix #1827, segfault with XXCH samples when downsampling.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 14:49:46 +01:00
Michael Niedermayer 84833b028b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacdec: Drop some unused function arguments
  x86: Fix assembly with NASM
  x86: fmtconvert: Refactor cvtps2pi emulation through cpuflags

Conflicts:
	libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 14:27:11 +01:00
Michael Niedermayer 28c0678eb7 Merge commit 'be923ed659016350592acb9b3346f706f8170ac5'
* commit 'be923ed659016350592acb9b3346f706f8170ac5':
  x86: fmtconvert: port to cpuflags
  x86: MMX2 ---> MMXEXT in macro names

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 14:16:18 +01:00
Michael Niedermayer 78ec407d5a Merge commit '652f5185945c8405fc57aed353286858df8d066f'
* commit '652f5185945c8405fc57aed353286858df8d066f':
  x86: mmx2 ---> mmxext in comments and messages

Conflicts:
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 14:02:35 +01:00
Michael Niedermayer 9766d9c985 Merge commit '04581c8c77ce779e4e70684ac45302972766be0f'
* commit '04581c8c77ce779e4e70684ac45302972766be0f':
  x86: yasm: Use complete source path for macro helper %includes

Conflicts:
	Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 13:57:09 +01:00
Michael Niedermayer 3174616f59 Merge commit '6860b4081d046558c44b1b42f22022ea341a2a73'
* commit '6860b4081d046558c44b1b42f22022ea341a2a73':
  x86: include x86inc.asm in x86util.asm
  cng: Reindent some incorrectly indented lines
  cngdec: Allow flushing the decoder
  cngdec: Make the dbov variable have the right unit
  cngdec: Fix the memset size to cover the full array
  cngdec: Update the LPC coefficients after averaging the reflection coefficients
  configure: fix print_config() with broke awks

Conflicts:
	libavcodec/x86/ac3dsp.asm
	libavcodec/x86/dct32.asm
	libavcodec/x86/deinterlace.asm
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputilenc.asm
	libavcodec/x86/fft.asm
	libavcodec/x86/fmtconvert.asm
	libavcodec/x86/h264_chromamc.asm
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264_deblock_10bit.asm
	libavcodec/x86/h264_idct.asm
	libavcodec/x86/h264_idct_10bit.asm
	libavcodec/x86/h264_intrapred.asm
	libavcodec/x86/h264_intrapred_10bit.asm
	libavcodec/x86/h264_weight.asm
	libavcodec/x86/vc1dsp.asm
	libavcodec/x86/vp3dsp.asm
	libavcodec/x86/vp56dsp.asm
	libavcodec/x86/vp8dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 13:43:33 +01:00
Diego Biurrun 5707af8d0b aacdec: Drop some unused function arguments 2012-10-31 10:54:52 +01:00
Paul B Mahol dc239b3b40 av_get_audio_frame_duration: add IAC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-31 03:44:37 +00:00
Michael Niedermayer 0e4d34e087 pix_fmt_info: add 9/10 bit YUVA formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31 03:10:35 +01:00
Diego Biurrun be923ed659 x86: fmtconvert: port to cpuflags 2012-10-31 01:05:03 +01:00
Diego Biurrun be2c456e96 x86: fmtconvert: Refactor cvtps2pi emulation through cpuflags 2012-10-31 01:05:03 +01:00