Commit Graph

91 Commits

Author SHA1 Message Date
Michael Niedermayer 5bac83dae8 shorten: fix U8 to be planar too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 15:09:46 +02:00
Michael Niedermayer ae237a117a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: try to use mmap only if available
  configure: check for mprotect
  wmapro: use planar sample format
  wmalossless: output in planar sample format
  wmadec: use float planar sample format output
  shorten: use planar sample format
  lavc: update documentation for AVFrame.extended_data

Conflicts:
	libavcodec/shorten.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 14:09:35 +02:00
Justin Ruggles 977eb7d567 shorten: use planar sample format 2012-10-14 16:48:22 -04:00
Michael Niedermayer 7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Michael Niedermayer e6b9903d82 shorten: fix cmd type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 09:24:59 +02:00
Lou Logan 6851130fd6 cosmetics: minor libavcodec spelling errors
Also update some common misspelled words in patcheck

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-29 14:54:15 +02:00
Paul B Mahol 672f8226bb shorten: fix lossy decoding
Closes #1299, #1300 and #1301.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-05-22 11:56:18 +00:00
Michael Niedermayer b4b5848513 shorten: increase max_frame_size.
Fixes Ticket1250

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-08 20:18:53 +02:00
Paul B Mahol b7159877b1 shorten: unsigned 8bit support 2012-05-04 09:56:18 +00:00
Carl Eugen Hoyos ae0591f913 Add missing newline in shorten decoder. 2012-04-24 17:23:43 +02:00
Michael Niedermayer 6101e5322f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
  asfdec: Add an option for not searching for the packet markers
  cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
  cosmetics: Align codec declarations
  cosmetics: Convert mimic.c to utf-8
  avconv: remove an unused function parameter.
  avconv: remove now pointless variables.
  avconv: drop support for building without libavfilter.
  nellymoserenc: fix crash due to memsetting the wrong area.
  libavformat: Only require first packet to be known for audio/video streams
  avplay: Don't try to scale timestamps if the tb isn't set

Conflicts:
	Changelog
	configure
	ffmpeg.c
	libavcodec/aacenc.c
	libavcodec/bmpenc.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/ffv1.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/libopenjpegdec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/pamenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngenc.c
	libavcodec/qtrleenc.c
	libavcodec/rawdec.c
	libavcodec/sgienc.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.c
	libavcodec/wmv2dec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 22:41:37 +02:00
Martin Storsjö 00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Michael Niedermayer 8c1ebdcea2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  shorten: Use separate pointers for the allocated memory for decoded samples.
  atrac3: Fix crash in tonal component decoding.
  ws_snd1: Fix wrong samples counts.
  movenc: Don't set a default sample duration when creating ismv
  rtp: Factorize the check for distinguishing RTCP packets from RTP
  golomb: avoid infinite loop on all-zero input (or end of buffer).
  bethsoftvid: synchronize video timestamps with audio sample rate
  bethsoftvid: add audio stream only after getting the first audio packet
  bethsoftvid: Set video packet duration instead of accumulating pts.
  bethsoftvid: set packet key frame flag for audio and I-frame video packets.
  bethsoftvid: fix read_packet() return codes.
  bethsoftvid: pass palette in side data instead of in a separate packet.
  sdp: Ignore RTCP packets when autodetecting RTP streams
  proresenc: initialise 'sign' variable
  mpegaudio: replace memcpy by SIMD code
  vc1: prevent using last_frame as a reference for I/P first frame.

Conflicts:
	libavcodec/atrac3.c
	libavcodec/golomb.h
	libavcodec/shorten.c
	libavcodec/ws-snd1.c
	tests/ref/fate/bethsoft-vid

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-17 00:35:06 +01:00
Michael Niedermayer 204cb29b3c shorten: Use separate pointers for the allocated memory for decoded samples.
Fixes invalid free() if any of the buffers are not allocated due to either
not decoding a header or an error prior to allocating all buffers.

Fixes CVE-2012-0858
CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-16 15:18:45 -05:00
Michael Niedermayer 5e9a56a035 shorten: validate values in fmt chunk search
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-25 18:55:43 +01:00
Michael Niedermayer 18bcfc912e shorten: Fix invalid free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-25 18:55:43 +01:00
Michael Niedermayer 25b9eef410 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cljr: K&R cosmetics
  cljr: return a more sensible value when encountering invalid headers
  cljr: drop unnecessary emms_c() calls without MMX code
  cljr: remove useless casts
  cljr: group encode/decode parts under single ifdefs
  cljr: remove stray semicolon
  cljr: add missing return statement in decode_end()
  doc: add pulseaudio to the input list
  avconv: remove unsubstantiated comment
  shorten: avoid abort() on unknown audio types
  cljr: add encoder
  build: merge lists of HTML documentation targets
  tests/examples: Mark some variables only used within their files as static.
  tests/tools/examples: Replace direct exit() calls by return.
  x86 cpuid: set vendor union members separately
  cljr: release picture at end of decoding
  rv40: NEON optimised rv40 qpel motion compensation

Conflicts:
	doc/examples/muxing.c
	libavcodec/cljr.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-09 00:05:51 +01:00
John Brooks 8562d9bd6c shorten: avoid abort() on unknown audio types
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-08 11:30:24 +01:00
Michael Niedermayer 707138593a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcmenc: cosmetics: pretty-printing
  ac3dec: cosmetics: pretty-printing
  yuv4mpeg: cosmetics: pretty-printing
  shorten: remove dead initialization
  roqvideodec: set AVFrame reference before reget_buffer.
  bmp: fix some 1bit samples.
  latmdec: add fate test for audio config change
  oma: PCM support
  oma: better format detection with small probe buffer
  oma: clearify ambiguous if condition
  wavpack: Properly clip samples during lossy decode
  Code clean-up for crc.c, lfg.c, log.c, random_see.d, rational.c and tree.c.
  Cleaned pixdesc.c file in libavutil
  zmbv.c: coding style clean-up.
  xan.c: coding style clean-up.
  mpegvideo.c: code cleanup - first 500 lines.

Conflicts:
	Changelog
	libavcodec/adpcmenc.c
	libavcodec/bmp.c
	libavcodec/zmbv.c
	libavutil/log.c
	libavutil/pixdesc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-05 00:11:57 +01:00
Paul B. Mahol eda8731285 shorten: remove dead initialization
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-04 15:12:05 -05:00
Michael Niedermayer e4de71677f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aac_latm: reconfigure decoder on audio specific config changes
  latmdec: fix audio specific config parsing
  Add avcodec_decode_audio4().
  avcodec: change number of plane pointers from 4 to 8 at next major bump.
  Update developers documentation with coding conventions.
  svq1dec: avoid undefined get_bits(0) call
  ARM: h264dsp_neon cosmetics
  ARM: make some NEON macros reusable
  Do not memcpy raw video frames when using null muxer
  fate: update asf seektest
  vp8: flush buffers on size changes.
  doc: improve general documentation for MacOSX
  asf: use packet dts as approximation of pts
  asf: do not call av_read_frame
  rtsp: Initialize the media_type_mask in the rtp guessing demuxer
  Cleaned up alacenc.c

Conflicts:
	doc/APIchanges
	doc/developer.texi
	libavcodec/8svx.c
	libavcodec/aacdec.c
	libavcodec/ac3dec.c
	libavcodec/avcodec.h
	libavcodec/nellymoserdec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/wmadec.c
	libavformat/asfdec.c
	tests/ref/seek/lavf_asf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 03:00:30 +01:00
Justin Ruggles 0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Michael Niedermayer 29582df797 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vble: remove vble_error_close
  VBLE Decoder
  tta: use an integer instead of a pointer to iterate output samples
  shorten: do not modify samples pointer when interleaving
  mpc7: only support stereo input.
  dpcm: do not try to decode empty packets
  dpcm: remove unneeded buf_size==0 check.
  twinvq: add SSE/AVX optimized sum/difference stereo interleaving
  vqf/twinvq: pass vqf COMM chunk info in extradata
  vqf: do not set bits_per_coded_sample for TwinVQ.
  twinvq: check for allocation failure in init_mdct_win()
  swscale: add padding to conversion buffer.
  rtpdec: Simplify finalize_packet
  http: Handle proxy authentication
  http: Print an error message for Authorization Required, too
  AVOptions: don't return an invalid option when option list is empty
  AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio)

Conflicts:
	libavcodec/avcodec.h
	libavcodec/tta.c
	libavcodec/vble.c
	libavcodec/version.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-12 02:50:25 +01:00
Justin Ruggles 5c210e2cb9 shorten: do not modify samples pointer when interleaving 2011-11-11 14:18:22 -05:00
Michael Niedermayer dd8ffc1925 Merge remote-tracking branch 'qatar/master'
* qatar/master: (47 commits)
  lavc: hide private symbols.
  lavc: deprecate img_get_alpha_info().
  lavc: use avpriv_ prefix for ff_toupper4.
  lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
  lavc: use avpriv_ prefix for ff_ac3_parse_header.
  lavc: use avpriv_ prefix for ff_frame_rate_tab.
  lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
  lavc: use avpriv_ prefix for ff_split_xiph_headers.
  lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
  lavc: use avpriv_ prefix for some dv symbols used in lavf.
  lavc: use avpriv_ prefix for some flac symbols used in lavf.
  lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
  lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
  lavc: use avpriv_ prefix for ff_aac_parse_header().
  lavf: hide private symbols.
  lavf: use avpriv_ prefix for some dv functions.
  lavf: use avpriv_ prefix for ff_new_chapter().
  avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation
  avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2()
  avcodec: clarify documentation of CODEC_CAP_DELAY
  ...

Conflicts:
	configure
	doc/general.texi
	libavcodec/Makefile
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dv.c
	libavcodec/dvdata.c
	libavcodec/dvdata.h
	libavcodec/libspeexenc.c
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavformat/avidec.c
	libavformat/dv.c
	libavformat/dv.h
	libavformat/flvenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/oggparsespeex.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 02:01:26 +02:00
Justin Ruggles 1baa25c7da shorten: fix end-of-stream decoding.
enable CODEC_CAP_DELAY to flush any remaining frames in the buffer.

Stop decoding when the FN_QUIT command is found so that a trailing seek table
isn't decoded as a normal frame.

decode all channels in the same call to avcodec_decode_audio3() so that
decoding will not stop after the first channel of the last frame.

Updated FATE reference. More valid audio is now decoded.
2011-10-20 13:09:46 -04:00
Justin Ruggles d03f9f65c0 shorten: do not use block size to determine whether to read the header. 2011-10-20 13:09:46 -04:00
Justin Ruggles 882dafe9b6 shorten: check output buffer size before decoding 2011-10-20 13:09:26 -04:00
Justin Ruggles bd7f7d6c78 shorten: use av_clip_int16() for output sample clipping 2011-10-20 13:09:26 -04:00
Justin Ruggles 069ada46c1 shorten: use bytestream functions to decode the embedded WAVE header 2011-10-20 13:09:25 -04:00
Justin Ruggles c25762fcf1 shorten: add some comments 2011-10-20 13:09:25 -04:00
Justin Ruggles 15d146c958 shorten: merge decoding of FN_DIFF* subblocks into decode_subframe_lpc() 2011-10-20 13:09:25 -04:00
Justin Ruggles 034f42dfce cosmetics: remove some needless commented-out stuff 2011-10-20 13:09:25 -04:00
Justin Ruggles cfa317f67d shorten: validate block size 2011-10-20 13:09:25 -04:00
Justin Ruggles 45d7d31fb9 shorten: move declaration of 'ret' to top of shorten_decode_frame() 2011-10-20 13:09:25 -04:00
Justin Ruggles a8055992c0 shorten: pass on error value from allocate_buffers() instead of returning -1 2011-10-20 13:09:25 -04:00
Justin Ruggles 9e5e2c2d01 shorten: check for realloc failure 2011-10-20 13:09:25 -04:00
Justin Ruggles fe31a637f1 shorten: move decoding of prediction order and applying of global offset to
decode_subframe_lpc().
2011-10-20 13:09:25 -04:00
Justin Ruggles 0f97c5014b shorten: only calculate output size when returning decoded samples, otherwise
just set data_size to zero.
2011-10-20 13:09:25 -04:00
Justin Ruggles e9e37f2d10 cosmetics: reindent 2011-10-20 13:09:25 -04:00
Justin Ruggles 9000b6db22 shorten: separate processing of audio commands from non-audio commands 2011-10-20 13:09:25 -04:00
Justin Ruggles 07745485ef shorten: skip some fields in the WAV header embedded in the shorten header.
fixes incorrect bitrate reporting and potential misreporting of the number of
channels.
2011-10-20 13:09:25 -04:00
Justin Ruggles a1f7885a8b shorten: split reading of file header into a separate functions 2011-10-20 13:09:25 -04:00
Michael Niedermayer 91eb1b1525 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  prores: add FATE tests
  id3v2: reduce the scope of some non-globally-used symbols/structures
  id3v2: cosmetics: move some declarations before the places they are used
  shorten: remove the flush function.
  shn: do not allow seeking in the raw shn demuxer.
  avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK.
  avformat: update AVInputFormat allowed flags
  avformat: don't unconditionally call ff_read_frame_flush() when trying to seek.
  truespeech: use sizeof() instead of hardcoded sizes
  truespeech: remove unneeded variable, 'consumed'
  truespeech: simplify truespeech_read_frame() by using get_bits()
  truespeech: decode directly to output buffer instead of a temp buffer
  truespeech: check to make sure channels == 1
  truespeech: check for large enough output buffer rather than truncating output
  truespeech: remove unneeded zero-size packet check.
  mlpdec: return meaningful error codes instead of -1
  mlpdec: remove unnecessary wrapper function
  mlpdec: only calculate output size once
  mlpdec: validate that the reported channel count matches the actual output channel count
  pcm: reduce pointer type casting
  ...

Conflicts:
	libavformat/avformat.h
	libavformat/id3v2.c
	libavformat/id3v2.h
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-14 03:48:22 +02:00
Justin Ruggles 617a51f9b7 shorten: remove the flush function.
The shorten decoder does not support seeking.
2011-10-13 16:31:16 -04:00
Laurent Aimar 5f05cf4ea9 shorten: Fix out of bound writes in fix_bitshift()
The data pointers s->decoded[*] already take into account s->nwrap.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar 95010d18b2 shorten: Prevent block size from increasing
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar b399cbfba5 Prevent block size from inreasing in the shorten decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 03:24:17 +02:00
Laurent Aimar f42b3195d3 Fix out of bound writes in fix_bitshift() of the shorten decoder.
The data pointers s->decoded[*] already take into account s->nwrap.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-30 04:14:23 +02:00