Commit Graph

995 Commits

Author SHA1 Message Date
Laurent Aimar 0333d234b0 h264: do not let invalid values in h->ref_count after a decoder reset.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-05 00:07:39 +02:00
Laurent Aimar 253d18b352 h264: bit depth/chroma idc changes must go through a full format negociation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-05 00:07:39 +02:00
Laurent Aimar a51fbb56bb h254: explicitly initialize bit depth/chroma idc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-05 00:07:39 +02:00
Michael Niedermayer eaa21b6870 H264: hotfix for speedloss on frame threading and h264 files with slices.
This fix is not ideal as it still limits the multithreading on field pictures
to the 2nd field only.
Ill try to fix it properly to allow both fields to decode concurrently but this
needs more work.

This bug exists since and was caused by:
commit ea6331f8bb
Author: Ronald S. Bultje <rsbultje@gmail.com>
Date:   Mon Jun 20 10:24:33 2011 -0400

    h264-mt: fix deadlock in packets with multiple slices (e.g. MP4).
2011-10-04 00:26:18 +02:00
Laurent Aimar a4fd95b5d5 h264: fix intra 16x16 mode check when using mbaff and constrained_intra_pred.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 21:20:57 +02:00
Laurent Aimar 2428b53f6d h264: do not let invalid values in h->ref_count on ff_h264_decode_ref_pic_list_reordering() errors.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 16:48:58 +02:00
Michael Niedermayer 3af2de76ac h264: set unused ref_counts to 0 as a precautionary meassure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-02 00:45:41 +02:00
Michael Niedermayer c9c7a776db h264: try reading SPS with wrong escaping, it sometimes works better
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 17:59:27 +02:00
Michael Niedermayer dc9ce40069 h264: More correct ref_count check in decode_slice_header()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 22:28:47 +02:00
Michael Niedermayer 5a6e7771ed h264: dont set key_frame when the frame is not a real keyframe.
Fixes Ticket514

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 03:47:39 +02:00
Michael Niedermayer f85c9b7771 h264dec: fix decoding problems introduced with baad01d8b4.
This affected cases where extradata was not set.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 23:51:32 +02:00
Alexander Strasser baad01d8b4 h264: improve checks before calling ff_h264_decode_extradata
The ff_h264_decode_extradata routine now checks for the buffer size
and pointer internally. This makes it possible to remove the external
checks in ff_h264_decode_init.

  In decode_frame there was a size check missing because the buffer
gets tested prior to the invocation of ff_h264_decode_extradata().

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2011-09-25 17:16:44 +02:00
Alexander Strasser 715f259bf9 h264: ff_h264_decode_extradata: check buffer args
The buffer size and pointer were not checked prior to testing the first
byte of the buffer. These were sometimes checked before calling, but it is
better to add it inside the function as it takes buf and size arguments.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2011-09-25 17:16:44 +02:00
Laurent Aimar 57764c6996 h264: Check for out of bounds reads in ff_h264_decode_extradata().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 16:54:16 +02:00
Michael Niedermayer 9b73fbcff6 h264dec: Decode in stream avc extradata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 06:01:45 +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
Michael Niedermayer 3e1a7ae44a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swfdec: Add support for sample_rate_code 0 (5512 Hz)
  dct-test: factor out some common code and do whas was likely intended
  doc: library versions need to be bumped in version.h
  Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
  Remove some forgotten AVCodecContext.palctrl usage.
  lavc/utils: move avcodec_init() higher in the file.
  lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_*
  ac3dec: actually use drc_scale private option
  lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros
  alsa: add missing header
  msmpeg4: remove leftover unused debug variable declaration
  Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
  Fix av_dlog invocations with wrong or missing logging context.
  vf_yadif: add support to yuva420p
  vf_yadif: correct documentation on the parity parameter
  vf_yadif: copy buffer properties like aspect for second frame as well
  oma: support for encrypted files
  id3v2: add support for non-text and GEOB type tag frames
  des: add possibility to calculate DES-CBC-MAC with small buffer

Conflicts:
	ffmpeg.c
	libavcodec/dct-test.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-21 21:25:43 +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
Michael Niedermayer 4832ed4c62 h264: do not increase recovery frame which would lead to endless moving away of the recovery point.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 02:52:17 +02:00
Michael Niedermayer a8a9844a3c h264: reset recovery frame on seeks.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 02:52:17 +02:00
John Stebbins 53e37840bf calculate frame_num for recovery point "keyframe"
recovery points that have non-zero recovery_frame_cnt resulted in
flagging incomplete frames as keyframes. This delays setting the
keyframe flag till the frame has been fully constructed.
2011-09-18 23:13:50 +02:00
Michael Niedermayer ba5ff1b31e h264dec: add forgotten copying of h->sync
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-18 21:53:30 +02:00
Michael Niedermayer 0812ad01c8 h264dec: Support CODEC_FLAG2_SHOW_ALL.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-18 15:33:50 +02:00
Michael Niedermayer a64b028aeb h264dec: Dont display trash before a keyframe.
Fixes Ticket472
This may (or may not) cause problems with files that have no keyframes.
Plese open a bugreport or mail me if you have a file for which this fails.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-17 21:20:44 +02:00
Michael Niedermayer 205c13685f h264: allow disabling bitstream overread protection by using the fast flag.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-14 20:48:00 +02:00
Michael Niedermayer 716c1f7b2a h264: improve MAX_SLICES too small check so it gives less false positives.
Fixes Ticket273

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 06:07:58 +02:00
Michael Niedermayer ea0ac11e52 h264: prevent an out of array read in decode_nal_units()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 07:23:00 +02:00
Michael Niedermayer 23f5cff92c h264dec: Prevent CABAC and CAVLC bitsteram overreading
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 04:57:46 +02:00
Michael Niedermayer 66ce282df5 h264: clean all non null elements of delayed_pic[]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-31 05:04:14 +02:00
Michael Niedermayer b955ab2f49 h264: change MAX_DELAYED_PIC_COUNT check to av_assert0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-31 05:00:39 +02:00
Michael Niedermayer db5effe1a4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Revert "h264: Properly set coded_{width, height} when parsing H.264."
  isom: add missing AVC-Intra tags, rearrange list and update comments
  avconv: remove stubs of crop* and pad* options
  avconv: re-add nb_streams to InputFile.

Conflicts:
	avconv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 22:24:01 +02: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
Michael Niedermayer 13e9a0fbfb h264: fixup indention
issue spoted in last merge (probably indention fixed there by diego)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-20 00:38:26 +02:00
Jeff Downs 6581e161c5 h264: fix PCM intra-coded blocks in monochrome case
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-19 16:02:33 +02:00
Michael Niedermayer ada49f936e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: correct implicit weight table computation for long ref pics
  h264: correct the check for invalid long term frame index in MMCO decode

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-19 15:07:12 +02:00
Jeff Downs 87cf70eb23 h264: correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-19 14:36:52 +02:00
Baptiste Coudurier 231a6df9ea h264dec: h264: 4:2:2 intra decoding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-15 00:39:55 +02:00
Michael Niedermayer 0cb233cf46 Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
  Move x86util.asm from libavcodec/ to libavutil/.
  Move x86inc.asm to libavutil/.
  APIchanges: note error_recognition in lavf
  lavf: add support for error_recognition, use it in avidec, and bump minor API version
  avconv: change semantics of -map
  avconv: get rid of new* options.
  cmdutils: allow precisely specifying a stream for AVOptions.
  configure: add missing CFLAGS to fix building on the HURD
  libx264: Include hint for possible values for configuring libx264
  cmdutils: allow ':'-separated modifiers in option names.
  avconv: make -map_metadata work consistently with the other options
  avconv: remove deprecated options.
  avconv: make -map_chapters accept only the input file index.
  Make a copy of ffmpeg under a new name -- avconv.
  ffmpeg: add a warning stating that the program is deprecated.
  Add weighted motion compensation for RV40 B-frames
  RV3/4: calculate B-frame motion weights once per frame
  Move RV3/4-specific DSP functions into their own context
  mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
  h264: notice memory allocation failure

Conflicts:
	.gitignore
	Makefile
	cmdutils.c
	configure
	doc/ffplay.texi
	doc/ffprobe.texi
	doc/ffserver.texi
	libavcodec/libx264.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/lavfi-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-13 02:56:08 +02:00
Dustin Brody bac3ab13ea h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-11 15:59:07 -07:00
Michael Niedermayer a9aa88df1d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: make avcodec_init() static on next bump.
  ac3enc: remove unneeded #include
  ac3enc: restructure coupling coordinate reuse calculation
  ac3enc: allow new coupling coordinates to be sent independently for each channel.
  ac3enc: separate exponent bit counting from exponent grouping.
  h264: propagate error return values for AV_LOG_ERROR-triggering events
  aac: Don't attempt to output configure an invalid channel configuration.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-10 16:29:51 +02:00
Dustin Brody 12fe759423 h264: propagate error return values for AV_LOG_ERROR-triggering events
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-08-09 12:29:13 -07:00
Michael Niedermayer faba79e080 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
  H.264: tweak some other x86 asm for Atom
  probe: Fix insane flow control.
  mpegts: remove invalid error check
  s302m: use nondeprecated audio sample format API
  lavc: use designated initialisers for all codecs.
  x86: cabac: add operand size suffixes missing from 6c32576

Conflicts:
	libavcodec/ac3enc_float.c
	libavcodec/flacenc.c
	libavcodec/frwu.c
	libavcodec/pictordec.c
	libavcodec/qtrleenc.c
	libavcodec/v210enc.c
	libavcodec/wmv2dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-30 06:46:08 +02:00
Anton Khirnov ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Jeff Downs 4105443872 h264 - Correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.
2011-07-28 15:11:16 -04:00
Jeff Downs 188694b2f5 h264 - Fix PCM intra coded blocks in monochrome case 2011-07-28 15:11:16 -04:00
Michael Niedermayer 2fb9fc0f6c h264: improve max slices error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-28 11:50:02 +02:00
Michael Niedermayer 4095fa9038 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dnxhddec: optimise dnxhd_decode_dct_block()
  rtp: remove disabled code
  eac3enc: use different numbers of blocks per frame to allow higher bitrates
  dnxhd: add regression test for 10-bit
  dnxhd: 10-bit support
  dsputil: update per-arch init funcs for non-h264 high bit depth
  dsputil: template get_pixels() for different bit depths
  dsputil: create 16/32-bit dctcoef versions of some functions
  jfdctint: add 10-bit version
  mov: add clcp type track as Subtitle stream.
  mpeg4: add Mpeg4 Profiles names.
  mpeg4: decode Level Profile for MPEG4 Part 2.
  ffprobe: display bitstream level.
  imgconvert: remove unused glue and xglue macros

Conflicts:
	libavcodec/dsputil_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-22 12:08:52 +02:00
Mans Rullgard 5cc2600964 dsputil: create 16/32-bit dctcoef versions of some functions
High bitdepth H.264 needs 32-bit transform coefficients, whereas
dnxhd does not.  This creates a conflict with the templated
functions operating on DCTELEM data.  This patch adds a field
allowing the caller to choose the element size in dsputil_init()
and adds the required functions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:10:58 +01:00
Michael Niedermayer ba99474b1d h264: fix h264-test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-21 16:53:24 +02:00
Michael Niedermayer 7c6c4cf2fb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Remove h264_lowres_idct_put/add functions
  Remove snow/dwt test program
  h264: remove some disabled code
  Fix incorrect max_lowres values
  matroskadec: fix integer underflow if header length < probe length.
  cosmetics: indentation
  eac3enc: use frame exponent strategy when applicable.
  cosmetics: rename eac3dec_data.c/h to eac3_data.c/h since the tables will also be used in the E-AC-3 encoder.
  dsputil: fix ff_check_alignment()

Conflicts:
	libavcodec/Makefile
	libavcodec/h264idct_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-20 18:31:45 +02:00