Commit Graph

68 Commits

Author SHA1 Message Date
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun 9c6cf7f2c9 avcodec: Drop silly and/or broken printf debug output 2012-10-01 10:24:28 +02: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 dc30c27eb1 h264_parser: use av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-25 23:10:45 +02:00
Reinhard Tartler 790a367d9e Fix parser not to clobber has_b_frames when extradata is set.
Because in contrast to the decoder, the parser does not setup low_delay.
The code in parse_nal_units would always end up setting has_b_frames
to "1", except when stream is explicitly marked as low delay.
Since the parser itself would create 'extradata', simply reopening
the parser would cause this.

This happens for instance in estimate_timings_from_pts(), which causes the
parser to be reopened on the same stream.

This fixes Libav #22 and FFmpeg (trac) #360

CC: libav-stable@libav.org

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(commit 31ac0ac29b)

Comments and description adapted by Reinhard Tartler.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-02-26 15:50:59 +01:00
Reimar Döffinger 3fa6d20533 H264 parser: enable header parsing/frame type detection for is_avc.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-19 15:29:10 +01:00
Michael Niedermayer 6a56f4e634 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flicvideo: fix invalid reads
  vorbis: Avoid some out-of-bounds reads
  vqf: add more known extensions
  cabac: remove unused function renorm_cabac_decoder
  h264: Only use symbols from the SVQ3 decoder under proper conditionals.
  add bytestream2_tell() and bytestream2_seek() functions
  parsers: initialize MpegEncContext.slice_context_count to 1
  spdifenc: use special alignment for DTS-HD length_code

Conflicts:
	libavcodec/flicvideo.c
	libavcodec/h264.c
	libavcodec/mpeg4video_parser.c
	libavcodec/vorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 02:30:27 +01:00
Janne Grunau f907615f08 parsers: initialize MpegEncContext.slice_context_count to 1
The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly)
a MpegEncContext in their private context. Since they do not call the
common mpegvideo init function slice_context_count has explicitly set
to 1.
Prevents a null pointer dereference in the h264 parser and fixes
bug 193.
2012-01-06 01:47:45 +01:00
Janne Grunau 358ea75e9e Revert "h264: skip start code search if the size of the nal unit is known"
This reverts commit 87eebb3454.
2011-12-19 03:24:32 +01:00
Janne Grunau 87eebb3454 h264: skip start code search if the size of the nal unit is known
Start code emulation prevention is only required in Annex B bytestream
packed NAL units. For other coding formats the size is already known.
Looking for a start code prefix can result in false positives like in
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4
which has a false positive in the SPS.
2011-12-18 23:52:53 +01:00
Michael Niedermayer 38331d2036 h264: disable checking reader, overreads are not possible
in ffmpegs h264 decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-18 03:17:44 +01:00
Carl Eugen Hoyos 2d6a45c12a Silence warnings when decoding QNAP Systems H264 codec.
Fixes ticket #571.
2011-12-03 03:34:23 +01: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 4ffed61b49 h264_parser: fully parse first_mb_in_slice to more reliably detect AU boundaries.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 17:53:29 +02:00
Michael Niedermayer 23040e2e3d h264: use long reading for first_mb_in_slice
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 17:53:08 +02: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
Anton Khirnov 773375c3d0 lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
It's used in lavf.
2011-10-20 21:06:58 +02:00
Michael Niedermayer 360a3d8991 h264_parser: print AU size on error.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-03 23:43:22 +02:00
Michael Niedermayer d5c0e89e7a h264_parser: AVC support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-03 23:43:22 +02:00
Michael Niedermayer 4ba396834d h264: pass buffer & size to ff_h264_decode_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 06:01:45 +02:00
Reimar Döffinger 31ac0ac29b Fix parser not to clobber has_b_frames when extradata is set.
Due to it in contrast to the decoder not setting up low_delay,
the code in parse_nal_units would always end up setting has_b_frames
to 1 (except when stream is explicitly marked as low delay).
Since the parser itself would create extradata, simply reopening
the parser would cause this.
estimate_timings_from_pts would cause the parser to be reopened
on the same stream.

This fixes trac issue #360.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-08-20 12:29:03 +02:00
Michael Niedermayer 686959e87e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: Consistently use '@' instead of '\' for Doxygen markup.
  Use av_printf_format to check the usage of printf style functions
  Add av_printf_format, for marking printf style format strings and their parameters
  ARM: enable thumb for Cortex-M* CPUs
  nsvdec: Propagate error values instead of returning 0 in nsv_read_header().
  build: remove SRC_PATH_BARE variable
  build: move basic rules and variables to main Makefile
  build: move special targets to end of main Makefile
  lavdev: improve feedback in case of invalid frame rate/size
  vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
  v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters()
  fbdev: prefer "framerate_q" over "fps" in device context
  bktr: prefer "framerate" over "fps" for grab_read_header()
  ALSA: implement channel layout for playback.
  alsa: support unsigned variants of already supported signed formats.
  alsa: add support for more formats.
  ARM: allow building in Thumb2 mode

Conflicts:
	common.mak
	doc/APIchanges
	libavcodec/vdpau.h
	libavdevice/alsa-audio-common.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-24 03:07:04 +02:00
Diego Biurrun adbfc605f6 doxygen: Consistently use '@' instead of '\' for Doxygen markup.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-06-24 00:37:49 +02:00
Philip Langdale 25f05ddb1a h264_parser: Fix whitespace after previous change.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:51:58 +02:00
Philip Langdale a26ce1e2df h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.
Currently, the parser is buggy and only processes the stream extradata
when the flag is set. This fixes it to actually inspect the frames.

Whitespce will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-06-13 20:51:42 +02:00
Stefano Sabatini ce5e49b0c2 replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_* 2011-05-02 16:41:41 +02:00
Stefano Sabatini 975a1447f7 Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 12:18:44 +02:00
Philip Langdale 9c09dead87 h264_parser: Fix whitespace after previous change.
'git diff -w' confirmed to return nothing.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-04 20:32:33 -07:00
Philip Langdale 01f5b9c51e h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set.
Currently, the parser is buggy and only processes the stream extradata
when the flag is set. This fixes it to actually inspect the frames.

Whitespce will be fixed in a separate change.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-04 20:32:33 -07: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
Janne Grunau 94e3e83f13 h264: Add Intra and Constrained Baseline profiles to avctx.profile
(cherry picked from commit fe9a3fbe42)
2011-02-02 03:40:50 +01:00
Janne Grunau fe9a3fbe42 h264: Add Intra and Constrained Baseline profiles to avctx.profile 2011-02-01 20:37:02 +01: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
Diego Elio Pettenò d36beb3f69 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>
2011-01-26 16:08:45 +00:00
Diego Elio Pettenò 877937b382 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 13eb6b9097)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò 13eb6b9097 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:07:29 +01:00
Baptiste Coudurier 9479415e4e In h264 parser, return immediately if buf_size is 0, avoid printing
erroneous message for last frame.

Originally committed as revision 24450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 00:34:09 +00:00
Howard Chu 82f1ffc7ba Cleanup prev commit, flag variable should start with 0
Originally committed as revision 23364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 20:14:14 +00:00
Howard Chu 23584bec87 Parse avctx->extradata if available.
Fixes many "non-existing PPS referenced" error messages

Originally committed as revision 23363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 18:50:39 +00:00
Alex Converse 74a6df59e3 Add an AVSTREAM_PARSE_FULL_ONCE parsing mode to parse headers and combine packets once and only once.
Originally committed as revision 23332 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 04:20:32 +00:00
Diego Biurrun ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Rafaël Carré dd0cd3d273 Export H264 profile and level in AVCodecContext.
Patch by Rafaël Carré, rafael D carre A gmail

Originally committed as revision 21517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 20:57:29 +00:00
Rafaël Carré e9ca315dd1 Initialize thread_context[0] with h264 parser context.
This allows freeing the parser memory in the thread_context freeing loop.

Patch by Rafaël Carré gmailify(rafael, carre)

Originally committed as revision 21508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 13:04:25 +00:00
Baptiste Coudurier 8fa0ae060b Init state to -1 in h264 parser.
Fix:
==22063== Conditional jump or move depends on uninitialised value(s)
==22063==    at 0x811A4B7: ff_find_start_code (mpegvideo.c:99)
==22063==    by 0x82F5B74: parse_nal_units (h264_parser.c:132)
==22063==    by 0x82F5A68: h264_parse (h264_parser.c:261)
[...]
==22063==  Uninitialised value was created by a stack allocation
==22063==    at 0x82F5AF5: parse_nal_units (h264_parser.c:112)

Originally committed as revision 18479 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 03:29:19 +00:00
Reimar Döffinger 15861962a7 Add a ff_h264_free_context function and call it from the H.264 parser.
This ensures that the parser will no longer leak memory for all SPS/PPS it encounters.

Originally committed as revision 18406 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-10 07:01:55 +00:00
John Cox 9e85f9c526 Fix SEIs when splitting H264 input.
Patch by John Cox, jc A kynesim D co D uk

Originally committed as revision 18020 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-16 22:38:27 +00:00
Carl Eugen Hoyos 26aedb4ab3 Cosmetics: Fix indentation after last commit.
Originally committed as revision 17621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-26 20:36:47 +00:00
Ivan Schreter 2c0c5e1249 Initialize H264 parser context correctly if the optional SEI messages
are not present.

Patch by Ivan Schreter, schreter gmx net

Originally committed as revision 17620 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-26 20:36:02 +00:00