Commit Graph

72 Commits

Author SHA1 Message Date
Michael Niedermayer
2d15554850 avcodec/mlp_parser: check ff_combine_frame() return code
Fixes CID602338

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04 20:29:40 +02:00
Michael Niedermayer
4040b56f5a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mlp_parser: fix request_channel_layout behavior.

Conflicts:
	libavcodec/mlp_parser.c

See: bd35d58463
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 02:37:17 +01:00
Tim Walker
c1e7de8f62 mlp_parser: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Thanks to Michael Niedermayer for spotting.

Also fix a mismatch between the parser and
decoder when request_channel_layout is a
subset of Stereo.
2014-02-08 20:10:51 +01:00
Michael Niedermayer
bd35d58463 avcodec/mlp_parser: fix multichannel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 18:13:34 +01:00
Michael Niedermayer
aedc10137d Merge commit 'c0c45188e56cfa3050bb39f8299025345b8a204c'
* commit 'c0c45188e56cfa3050bb39f8299025345b8a204c':
  mlp: improve request_channel_layout behavior.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 17:31:30 +01:00
Tim Walker
c0c45188e5 mlp: improve request_channel_layout behavior.
Don't decode further substreams if request_channel_layout
is a subset of the current substream's channel_layout.

Before, we would only discard further substreams if
request_channel_layout matched the substream's
channel_layout extactly, thus decoding additional
channels which the caller would probably end up downmixing.
2014-02-08 13:39:37 +01:00
Michael Niedermayer
b4107f7805 Merge commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09'
* commit '4b7f1a7ced0e98f2cc698d896f7ebab8d30eaa09':
  mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream.

Conflicts:
	libavcodec/mlp_parser.h
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 22:53:13 +01:00
Tim Walker
4b7f1a7ced mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream. 2014-01-05 16:41:56 +01:00
Michael Niedermayer
1607a98545 avcodec/mlp: Fix bugs in libavs warning fixes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:27:42 +02:00
Michael Niedermayer
20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Michael Niedermayer
6747b0be9b mlp: fix channel order.
This fixes a regression introduced with todays merge

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 19:39:42 +01:00
Michael Niedermayer
826188d27a Merge commit 'ed1b01131e662c9086b27aaaea69684d8575fbea'
* commit 'ed1b01131e662c9086b27aaaea69684d8575fbea':
  mlp: implement support for AVCodecContext.request_channel_layout.

Conflicts:
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:44:30 +01:00
Michael Niedermayer
86b892af19 Merge commit 'b0c7e3ffd09f68022429920da483ad7abed84aa1'
* commit 'b0c7e3ffd09f68022429920da483ad7abed84aa1':
  mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 16:34:52 +01:00
Michael Niedermayer
fa36270c4c Merge commit '99ccd2ba10eac2b282c272ad9e75f082123c765a'
* commit '99ccd2ba10eac2b282c272ad9e75f082123c765a':
  mlp: store the channel layout for each substream.

Conflicts:
	libavcodec/mlp_parser.c
	libavcodec/mlpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 15:52:39 +01:00
Tim Walker
ed1b01131e mlp: implement support for AVCodecContext.request_channel_layout.
Also wrap usage of AVCodecContext.request_channels in FF_API_REQUEST_CHANNELS directives.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker
b0c7e3ffd0 mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.
Allows users to configure the output based on what's actually decoded, rather than the full native layout.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2013-01-22 16:10:02 -05:00
Tim Walker
99ccd2ba10 mlp: store the channel layout for each substream.
Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
2013-01-22 16:10:02 -05:00
Michael Niedermayer
03b078721c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'
* commit '97bf7c03b1338a867da52c159a2afecbdedcfa88':
  doc: git-howto: Leave reviewers time to react before pushing patches
  Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
  lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/git-howto.texi
	ffmpeg_filter.c
	libavcodec/flacdec.c
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c
	libavcodec/utils.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffer.c
	libavutil/Makefile
	libavutil/audioconvert.h
	libavutil/channel_layout.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 11:32:11 +01:00
Justin Ruggles
a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Michael Niedermayer
df727d408c mlp_parser: print error when ff_combine_frame() fails to add the current buffer
Fixes part of CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 00:05:03 +02:00
Michael Niedermayer
2a672652bb mlp_parser: dont override existing channel geometry.
This prevents race conditions
And partly fixes Ticket1726

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 22:35:26 +02:00
Michael Niedermayer
e3e09f2bad Merge remote-tracking branch 'qatar/master'
* qatar/master:
  os_support: Choose between direct.h and io.h using a configure check
  os_support: Include io.h instead of direct.h on mingw32ce
  x86: ac3dsp: Only refer to the ac3_downmix_sse symbol if it has been declared
  swscale: Remove two bogus asserts
  ac3: move ac3_downmix() from dsputil to ac3dsp
  lavr/audio_mix_matrix: acknowledge the existence of LFE2.
  mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
  lavu/audioconvert: add a second low frequency channel.

Conflicts:
	doc/APIchanges
	libavcodec/ac3dsp.c
	libavcodec/ac3dsp.h
	libavcodec/mlp_parser.c
	libavutil/audioconvert.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 15:35:50 +02:00
Tim Walker
3844572887 mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-09-12 18:26:53 -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
5c44c2de80 mlp_parser: use av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 20:20:23 +02:00
Tim Walker
0a9efe4c6e mlp_parser: fix the channel mask value used for the top surround channel
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-25 17:24:43 -05:00
Michael Niedermayer
e99f1a8cc8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxva2: don't check for DXVA_PictureParameters->wDecodedPictureIndex
  img2: split muxer and demuxer into separate files
  rm: prevent infinite loops for index parsing.
  aac: fix infinite loop on end-of-frame with sequence of 1-bits.
  mov: Add more HDV and XDCAM FourCCs.
  lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
  rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
  cdxl: correctly synchronize video timestamps to audio
  mlpdec_parser: fix a few channel layouts.
  Add channel names to channel_names[] array for channels added in b2890f5
  movenc: Buffer the mdat for the initial moov fragment, too
  flvdec: Ignore the index if the ignidx flag is set
  flvdec: Fix indentation
  movdec: Don't parse all fragments if ignidx is set
  movdec: Restart parsing root-level atoms at the right spot
  prores: use natural integer type for the codebook index
  mov: Add support for MPEG2 HDV 720p24 (hdv4)
  swscale: K&R formatting cosmetics (part I)
  swscale: variable declaration and placement cosmetics

Conflicts:
	configure
	libavcodec/aacdec.c
	libavcodec/mlp_parser.c
	libavformat/flvdec.c
	libavformat/img2.c
	libavformat/isom.h
	libavformat/mov.c
	libavformat/movenc.c
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-23 04:31:55 +01:00
Tim Walker
6bbaf6e0dd mlpdec_parser: fix a few channel layouts.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-22 10:50:22 -05:00
Michael Niedermayer
eadd4264ee Merge remote-tracking branch 'qatar/master'
* qatar/master: (36 commits)
  adpcmenc: Use correct frame_size for Yamaha ADPCM.
  avcodec: add ff_samples_to_time_base() convenience function to internal.h
  adx parser: set duration
  mlp parser: set duration instead of frame_size
  gsm parser: set duration
  mpegaudio parser: set duration instead of frame_size
  (e)ac3 parser: set duration instead of frame_size
  flac parser: set duration instead of frame_size
  avcodec: add duration field to AVCodecParserContext
  avutil: add av_rescale_q_rnd() to allow different rounding
  pnmdec: remove useless .pix_fmts
  libmp3lame: support float and s32 sample formats
  libmp3lame: renaming, rearrangement, alignment, and comments
  libmp3lame: use the LAME default bit rate
  libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing
  libmp3lame: cosmetics: remove some pointless comments
  libmp3lame: convert some debugging code to av_dlog()
  libmp3lame: remove outdated comment.
  libmp3lame: do not set coded_frame->key_frame.
  libmp3lame: improve error handling in MP3lame_encode_init()
  ...

Conflicts:
	doc/APIchanges
	libavcodec/libmp3lame.c
	libavcodec/pcxenc.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/sgienc.c
	libavcodec/utils.c
	libavformat/hls.c
	libavutil/avutil.h
	libswscale/x86/swscale_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-21 05:10:12 +01:00
Justin Ruggles
b3a4c7e0f1 mlp parser: set duration instead of frame_size 2012-02-20 15:08:41 -05:00
Michael Niedermayer
e146ad95d7 mlp_parser: Fix infinite loop with 0 bytes_left.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 22:32:42 +01:00
Hendrik Leppkes
b7bf93b923 mlp: Use correct speaker locations in TrueHD channel layout.
(cherry picked from commit d7787835ad737d4f4d8b6f17e04d981632eeaa91)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-10 02:11:24 +01:00
Michael Niedermayer
022f8d27dd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: Readd #define _SVID_SOURCE
  Fix av_get_channel_layout_string() for positions >31
  configure: Store vda lib flags in extralibs instead of ldflags
  Make channel layout masks unsigned
  dca: ARMv6 optimised decode_blockcode()
  nullenc: drop AVFMT_RAWPICTURE from the flags
  frame-mt: return consumed packet size in ff_thread_decode_frame
  aacdec: add more fate tests covering SBR and PS
  MK(BE)TAG: avoid undefined shifts

Conflicts:
	configure
	libavcodec/arm/dca.h
	libavcodec/dca.c
	libavcodec/mlp_parser.c
	libavcodec/version.h
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/defaults.c
	libavutil/audioconvert.c
	libavutil/avutil.h
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-26 01:12:08 +01:00
Mans Rullgard
cc276c85d1 Make channel layout masks unsigned
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.

Fixes a few invalid shifts.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 13:19:54 +00:00
Michael Niedermayer
988f585fcb Merge remote-tracking branch 'qatar/master'
* qatar/master: (44 commits)
  replacement Indeo 3 decoder
  gsm demuxer: do not allocate packet twice.
  flvenc: use first packet delay as global delay.
  ac3enc: doxygen update.
  imc: return error codes instead of 0 for error conditions.
  imc: return meaningful error codes instead of -1
  imc: do not set channel layout for stereo
  imc: validate channel count
  imc: check for ff_fft_init() failure
  imc: check output buffer size before decoding
  imc: use DSPContext.bswap16_buf() to byte-swap packet data
  rtsp: add allowed_media_types option
  libgsm: add flush function to reset the decoder state when seeking
  libgsm: simplify decoding by using a loop
  gsm: log error message when packet is too small
  libgsmdec: do not needlessly set *data_size to 0
  gsmdec: do not needlessly set *data_size to 0
  gsmdec: add flush function to reset the decoder state when seeking
  libgsmdec: check output buffer size before decoding
  gsmdec: log error message when output buffer is too small.
  ...

Conflicts:
	Changelog
	ffplay.c
	libavcodec/indeo3.c
	libavcodec/mjpeg_parser.c
	libavcodec/vp3.c
	libavformat/cutils.c
	libavformat/id3v2.c
	libavutil/parseutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:16:26 +01:00
Anton Khirnov
5511ad14fe lavc: use designated initialisers for parsers. 2011-11-02 10:03:43 +01: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
82be06bbb3 mlpdec: return meaningful error codes instead of -1 2011-10-13 15:13:02 -04:00
Carl Eugen Hoyos
0aac0403c5 Map mlp surround channels to FFmpeg rear channels.
This allows more 3rd party applications to correctly read
the resulting wav files.
2011-05-13 00:22:05 +02:00
Carl Eugen Hoyos
9b53bb8b3b Only ask once in the code for a TrueHD sample with strange channel layout. 2011-04-19 03:23:46 +02:00
Carl Eugen Hoyos
280a789fe2 Make MLP/TrueHD channel layout functions visible to the decoder. 2011-04-19 03:09:11 +02:00
Michael Niedermayer
f35439699f Merge remote branch 'qatar/master'
* qatar/master:
  Fixed-point MDCT with 32-bit unscaled output
  lavc: deprecate rate_emu
  lavc: mark hurry_up for removal on next major bump
  parser: mark av_parser_parse() for removal on next major bump
  lavc: add missing audioconvert includes
  jvdec: don't use deprecated CODEC_TYPE_*/PKT_FLAG_KEY

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 02:28:01 +02:00
Anton Khirnov
6f3d3eacf6 lavc: add missing audioconvert includes 2011-04-02 16:17:01 +02:00
Carl Eugen Hoyos
2a0bd2bfc9 Make a plausibility check when setting channel layout for TrueHD.
TrueHD supports more channels than FFmpeg, so a valid sample
could set the channel layout to a value that represents less
channels than the sample actually consists of.
2011-04-02 00:48:43 +02:00
Michael Niedermayer
1caa4123bd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers
  mlp_parse.c: set AVCodecContext channel_layout
  APIChanges: mark the place where 0.6 was branched.
  avio: make get_checksum() internal.
  avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h
  avio: make init_checksum() internal.
NOT MERGED  Add MxPEG decoder
NOT MERGED  Add support for picture_ptr field in MJpegDecodeContext
NOT MERGED  Move MJPEG's input buffer preprocessing in separate public function
NOT MERGED  Support reference picture defined by bitmask in MJPEG's SOS decoder
  sndio bug fix

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-31 12:48:41 +02:00
John Stebbins
4b6f097b21 mlp_parse.c: set AVCodecContext channel_layout
The channel layout isn't getting set for mlp and truehd audio.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-03-30 17:41:48 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Diego Elio Pettenò
e7e2df27f8 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
2011-01-28 03:15:34 +01:00