]> git.sesse.net Git - ffmpeg/log
ffmpeg
9 years agoMerge remote-tracking branch 'rbultje/vp9-bugfixes'
Michael Niedermayer [Mon, 18 May 2015 00:35:12 +0000 (02:35 +0200)]
Merge remote-tracking branch 'rbultje/vp9-bugfixes'

* rbultje/vp9-bugfixes:
  vp9: match another find_ref_mvs() bug in libvpx.
  vp9: fix scaled motion vector clipping for sub8x8 blocks.
  vp9: improve signbias check.
  vp9: don't allow compound references if error_resilience is enabled.
  vp9: clamp segmented lflvl before applying ref/mode deltas.
  vp9: reset loopfilter mode/ref deltas on keyframe.
  vp9: fix crash when playing back 440/440 content with width%64<56.
  vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.
  vp9: clip motion vectors in the same way as libvpx does.
  vp9: set skip flag if the block had no coded coefficients.
  vp9: apply mv scaling workaround only when subsampling is enabled.
  vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.
  vp9: fix segmentation map referencing upon framesize change.
  vp9: disable more pmulhrsw optimizations in idct16/32.
  vp9: disable all pmulhrsw in 8/16 iadst x86 optimizations.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocmdutils: Fix sign error in display matrix auto-rotation code
Michael Niedermayer [Sun, 17 May 2015 23:11:02 +0000 (01:11 +0200)]
cmdutils: Fix sign error in display matrix auto-rotation code

This makes the sample from Ticket4560 behave consistently with either branch

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: Do not copy the display matrix if rotation meta-data is manually added
Michael Niedermayer [Sun, 17 May 2015 22:28:57 +0000 (00:28 +0200)]
ffmpeg: Do not copy the display matrix if rotation meta-data is manually added

Fixes Ticket4560

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/golomb: fix reading huge signed rice golomb values
Michael Niedermayer [Sun, 17 May 2015 17:08:38 +0000 (19:08 +0200)]
avcodec/golomb: fix reading huge signed rice golomb values

No testcase is known, nor any case where such huge values would occur

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
Michael Niedermayer [Sun, 17 May 2015 17:07:17 +0000 (19:07 +0200)]
avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/hlsenc: do not append an endlist tag when the stream ends
MrBoogs [Tue, 21 Apr 2015 21:53:57 +0000 (15:53 -0600)]
avformat/hlsenc: do not append an endlist tag when the stream ends

Reviewed-by: Thomas Volkert <silvo@gmx.net>
9 years agoavformat/hlsenc: Add hls flag for starting a playlist with a discontinuity on startup
MrBoogs [Tue, 21 Apr 2015 21:52:03 +0000 (15:52 -0600)]
avformat/hlsenc: Add hls flag for starting a playlist with  a discontinuity on startup

Reviewed-by: Thomas Volkert <silvo@gmx.net>
9 years agoavformat/hlsenc: Add hls flag for rounding m3u8 durations to whole numbers, problems...
MrBoogs [Tue, 21 Apr 2015 21:46:17 +0000 (15:46 -0600)]
avformat/hlsenc: Add hls flag for rounding m3u8 durations to whole numbers, problems with floats on some devices

Reviewed-by: Thomas Volkert <silvo@gmx.net>
9 years agoavcodec/flacdec: Attempt to auto-detect old buggy flac
Michael Niedermayer [Sun, 17 May 2015 11:10:33 +0000 (13:10 +0200)]
avcodec/flacdec: Attempt to auto-detect old buggy flac

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavc/vc1: Never decode vc1 as gray if gray decoding was not enabled.
Carl Eugen Hoyos [Sun, 17 May 2015 10:58:44 +0000 (12:58 +0200)]
lavc/vc1: Never decode vc1 as gray if gray decoding was not enabled.

9 years agolavf/mpeg: Do not detect unknown audio in Hikvision streams as alaw.
Carl Eugen Hoyos [Sun, 17 May 2015 10:57:27 +0000 (12:57 +0200)]
lavf/mpeg: Do not detect unknown audio in Hikvision streams as alaw.

9 years agolavc: Print a warning if gray decoding was requested but not enabled.
Carl Eugen Hoyos [Sun, 17 May 2015 08:22:03 +0000 (10:22 +0200)]
lavc: Print a warning if gray decoding was requested but not enabled.

9 years agolavf/wav: Read files >4G if no smaller filesize was written.
Carl Eugen Hoyos [Sat, 16 May 2015 21:33:48 +0000 (23:33 +0200)]
lavf/wav: Read files >4G if no smaller filesize was written.

Fixes second part of ticket #4543.

9 years agolavf/wav: Print an error if files >4G are written.
Carl Eugen Hoyos [Sat, 16 May 2015 21:32:56 +0000 (23:32 +0200)]
lavf/wav: Print an error if files >4G are written.

Additionally, don't write an incorrect shorter size for such files.

Fixes part of ticket #4543.

9 years agolavc/h263: Set color_range for gray decoding.
Carl Eugen Hoyos [Sat, 16 May 2015 21:32:27 +0000 (23:32 +0200)]
lavc/h263: Set color_range for gray decoding.

9 years agolavc/vc1: Set color_range for gray decoding.
Carl Eugen Hoyos [Sat, 16 May 2015 21:32:14 +0000 (23:32 +0200)]
lavc/vc1: Set color_range for gray decoding.

9 years agolavf/mov: Tell users about the use_absolute_path option.
Carl Eugen Hoyos [Sat, 16 May 2015 21:31:44 +0000 (23:31 +0200)]
lavf/mov: Tell users about the use_absolute_path option.

Fixes ticket #4539.

9 years agolavc/qdrw: Fix overwrite when reading invalid Quickdraw images.
Carl Eugen Hoyos [Sat, 16 May 2015 20:51:16 +0000 (22:51 +0200)]
lavc/qdrw: Fix overwrite when reading invalid Quickdraw images.

9 years agolavc/flac: Fix encoding and decoding with high lpc.
Carl Eugen Hoyos [Tue, 12 May 2015 11:00:29 +0000 (13:00 +0200)]
lavc/flac: Fix encoding and decoding with high lpc.

Based on an analysis by trac user lvqcl.

Fixes ticket #4421, reported by Chase Walker.

9 years agolavc/flacdec: Sanitize FLACSTREAMINFO usage.
Carl Eugen Hoyos [Tue, 12 May 2015 10:47:57 +0000 (12:47 +0200)]
lavc/flacdec: Sanitize FLACSTREAMINFO usage.

9 years agoavformat/avidec: add mp2 to the list of exceptions instead of generally treating...
Michael Niedermayer [Sat, 16 May 2015 23:34:35 +0000 (01:34 +0200)]
avformat/avidec: add mp2 to the list of exceptions instead of generally treating dshow_block_align==1 special

Fixes Ticket4552

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: only apply last picture flush code at EOF
Michael Niedermayer [Sat, 16 May 2015 21:08:09 +0000 (23:08 +0200)]
ffmpeg: only apply last picture flush code at EOF

Fixes Ticket4562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/buffersink: return EOF if closed link in av_buffersink_get_frame_flags()
Michael Niedermayer [Sat, 16 May 2015 22:22:09 +0000 (00:22 +0200)]
avfilter/buffersink: return EOF if closed link in av_buffersink_get_frame_flags()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '732dd658687bd9a2e5c622e38c481825b57af250'
Michael Niedermayer [Sat, 16 May 2015 19:14:01 +0000 (21:14 +0200)]
Merge commit '732dd658687bd9a2e5c622e38c481825b57af250'

* commit '732dd658687bd9a2e5c622e38c481825b57af250':
  doc: Add $branch to FATE config template

Conflicts:
doc/fate.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/aacenc: use < 0 instead of != 0 for error checks
Michael Niedermayer [Sat, 16 May 2015 17:07:31 +0000 (19:07 +0200)]
avcodec/aacenc: use < 0 instead of != 0 for error checks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/j2kenc: Use ret < 0 instead of ret != 0 for error checks
Michael Niedermayer [Sat, 16 May 2015 16:37:55 +0000 (18:37 +0200)]
avcodec/j2kenc: Use ret < 0 instead of ret != 0 for error checks

This is how most code in FFmpeg checks for failures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mux: use <0 instead of != 0 for error check of init_muxer()
Michael Niedermayer [Sat, 16 May 2015 16:33:51 +0000 (18:33 +0200)]
avformat/mux: use <0 instead of != 0 for error check of init_muxer()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: match another find_ref_mvs() bug in libvpx.
Ronald S. Bultje [Sat, 16 May 2015 15:59:01 +0000 (11:59 -0400)]
vp9: match another find_ref_mvs() bug in libvpx.

If we find a second non-sub8x8 motion vector for a non-first sub8x8
block, and the clamped value is identical to the first non-sub8x8
motion vector, then the resulting nearmv motion vector is forced to
zero.

9 years agodoc: Add $branch to FATE config template
Timothy Gu [Wed, 13 May 2015 23:46:47 +0000 (16:46 -0700)]
doc: Add $branch to FATE config template

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years agovp9: fix scaled motion vector clipping for sub8x8 blocks.
Ronald S. Bultje [Sat, 16 May 2015 12:36:19 +0000 (08:36 -0400)]
vp9: fix scaled motion vector clipping for sub8x8 blocks.

To match the obscure clipping bug behaviour in libvpx.

9 years agoavdevice/v4l2: Fix vertical alignment in list_formats() output
Michael Niedermayer [Sat, 16 May 2015 12:35:36 +0000 (14:35 +0200)]
avdevice/v4l2: Fix vertical alignment in list_formats() output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mov: Fix parsing short loci
Michael Niedermayer [Sat, 16 May 2015 11:51:18 +0000 (13:51 +0200)]
avformat/mov: Fix parsing short loci

Fixes Ticket4557

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mov: Print reason of loci parsing failure
Michael Niedermayer [Sat, 16 May 2015 11:50:38 +0000 (13:50 +0200)]
avformat/mov: Print reason of loci parsing failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: Support preserving the source key frame timings
anatolschwarz [Tue, 5 May 2015 13:14:35 +0000 (16:14 +0300)]
ffmpeg: Support preserving the source key frame timings

Added option "source" to force_key_frames

9 years agovp9: improve signbias check.
Ronald S. Bultje [Sat, 16 May 2015 01:14:08 +0000 (21:14 -0400)]
vp9: improve signbias check.

Otherwise it will still scale motion vectors, which leads to corrupted
prediction.

9 years agoffmpeg: Remove another unneeded ost->filter_graph check
Michael Niedermayer [Fri, 15 May 2015 20:30:42 +0000 (22:30 +0200)]
ffmpeg: Remove another unneeded ost->filter_graph check

Fixes CID1241508

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: Fix typo in num_entry_point_offsets check
Michael Niedermayer [Fri, 15 May 2015 20:12:08 +0000 (22:12 +0200)]
avcodec/hevc: Fix typo in num_entry_point_offsets check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/libtheoraenc: Check for av_malloc failure
Michael Niedermayer [Fri, 15 May 2015 20:02:12 +0000 (22:02 +0200)]
avcodec/libtheoraenc: Check for av_malloc failure

Fixes CID1257799

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: don't allow compound references if error_resilience is enabled.
Ronald S. Bultje [Fri, 15 May 2015 18:15:46 +0000 (14:15 -0400)]
vp9: don't allow compound references if error_resilience is enabled.

libvpx (probably accidentally) clears the bits if error_res is set,
along with keyframe/intraonly. This probably wasn't the intention
(since it's local data), but it's behaviour we have to copy...

9 years agovp9: clamp segmented lflvl before applying ref/mode deltas.
Ronald S. Bultje [Fri, 15 May 2015 15:43:09 +0000 (11:43 -0400)]
vp9: clamp segmented lflvl before applying ref/mode deltas.

9 years agovp9: reset loopfilter mode/ref deltas on keyframe.
Ronald S. Bultje [Fri, 15 May 2015 15:42:39 +0000 (11:42 -0400)]
vp9: reset loopfilter mode/ref deltas on keyframe.

9 years agovp9: fix crash when playing back 440/440 content with width%64<56.
Ronald S. Bultje [Fri, 15 May 2015 02:48:59 +0000 (22:48 -0400)]
vp9: fix crash when playing back 440/440 content with width%64<56.

9 years agovp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.
Ronald S. Bultje [Fri, 15 May 2015 02:40:26 +0000 (22:40 -0400)]
vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.

9 years agoavformat/rtsp: print a debug level note if time parsing fails
Michael Niedermayer [Fri, 15 May 2015 18:19:21 +0000 (20:19 +0200)]
avformat/rtsp: print a debug level note if time parsing fails

Fixes CID733718 again

This partly reverts commit eb7ddb5066843ab16caf33b05eafb2576648b797.

9 years agoavcodec/svq1dec: Remove duplicate buf_size check
Michael Niedermayer [Fri, 15 May 2015 18:06:24 +0000 (20:06 +0200)]
avcodec/svq1dec: Remove duplicate buf_size check

Fixes CID1297573

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dcadec: Check active_bands
Michael Niedermayer [Fri, 15 May 2015 16:29:40 +0000 (18:29 +0200)]
avcodec/dcadec: Check active_bands

Fixes CID1297594 part2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dcadec: Check scale table index
Michael Niedermayer [Fri, 15 May 2015 16:04:12 +0000 (18:04 +0200)]
avcodec/dcadec: Check scale table index

Fixes CID1297594 part 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/sonic: More completely check sample_rate_index and channels
Michael Niedermayer [Fri, 15 May 2015 15:31:58 +0000 (17:31 +0200)]
avcodec/sonic: More completely check sample_rate_index and channels

Fixes CID1271783

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/sonic: check memory allocations
Michael Niedermayer [Fri, 15 May 2015 15:26:25 +0000 (17:26 +0200)]
avcodec/sonic: check memory allocations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/smvjpegdec: check avcodec_decode_video2() return code
Michael Niedermayer [Fri, 15 May 2015 15:21:10 +0000 (17:21 +0200)]
avcodec/smvjpegdec: check avcodec_decode_video2() return code

Fixes CID1271810

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/shorten: More complete pred_order check
Michael Niedermayer [Fri, 15 May 2015 15:02:28 +0000 (17:02 +0200)]
avcodec/shorten: More complete pred_order check

Fixes CID1239055

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/shorten: Fix code depending on signed overflow behavior
Michael Niedermayer [Fri, 15 May 2015 14:58:51 +0000 (16:58 +0200)]
avcodec/shorten: Fix code depending on signed overflow behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/shorten: Check skip_bytes()
Michael Niedermayer [Fri, 15 May 2015 14:48:31 +0000 (16:48 +0200)]
avcodec/shorten: Check skip_bytes()

Fixes CID1210526

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/put_bits: Remove dead code in put_bits()
Michael Niedermayer [Fri, 15 May 2015 14:19:53 +0000 (16:19 +0200)]
avcodec/put_bits: Remove dead code in put_bits()

Fixes CID1297574

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/proresdec2: Reset slice_count on deallocation
Michael Niedermayer [Fri, 15 May 2015 13:23:32 +0000 (15:23 +0200)]
avcodec/proresdec2: Reset slice_count on deallocation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vp9: Use separate memset for counts.eob
Michael Niedermayer [Fri, 15 May 2015 09:10:10 +0000 (11:10 +0200)]
avcodec/vp9: Use separate memset for counts.eob

Makes no real difference, but maybe scares coverity less (CID1297578)

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: Print an error if avfilter_graph_queue_command() failed
Michael Niedermayer [Fri, 15 May 2015 10:41:28 +0000 (12:41 +0200)]
ffmpeg: Print an error if avfilter_graph_queue_command() failed

Fixes CID1271809

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: remove unneeded ost->filter check
Michael Niedermayer [Fri, 15 May 2015 10:34:20 +0000 (12:34 +0200)]
ffmpeg: remove unneeded ost->filter check

Fixes CID1241508

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()
Michael Niedermayer [Fri, 15 May 2015 10:16:36 +0000 (12:16 +0200)]
avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vp3: Cleanup order of operations for current_run check
Michael Niedermayer [Fri, 15 May 2015 08:42:22 +0000 (10:42 +0200)]
avcodec/vp3: Cleanup order of operations for current_run check

This shouldnt make a difference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: clip motion vectors in the same way as libvpx does.
Ronald S. Bultje [Fri, 15 May 2015 02:13:46 +0000 (22:13 -0400)]
vp9: clip motion vectors in the same way as libvpx does.

The practical effect of this is that the scaling will wrongly not be
applied to the interpolation edge (the 3/4 constants in this patch).
In other words, we clip to the pre-scaling interpolation, even though
these should be clipped post-scaling. The resulting out-of-frame MVs
are thus automatically clipped within the visible portion of the frame,
which is probably not the intention, but is unfortunately what libvpx
does, so we need to copy that behaviour.

9 years agofate: increase the number of filtered frames to 20 for edgedetect* & hue
Michael Niedermayer [Fri, 15 May 2015 01:05:20 +0000 (03:05 +0200)]
fate: increase the number of filtered frames to 20 for edgedetect* & hue

Suggested-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: set skip flag if the block had no coded coefficients.
Ronald S. Bultje [Fri, 15 May 2015 00:13:43 +0000 (20:13 -0400)]
vp9: set skip flag if the block had no coded coefficients.

This reproduces libvpx behaviour. It seems like it originally only
targeted loopfilter behaviour, but this unfortunately effects following
block contexting and thus directs bitstream sync.

9 years agolavf/webmdashenc: fix unchecked strftime
Vignesh Venkatasubramanian [Thu, 14 May 2015 17:32:24 +0000 (10:32 -0700)]
lavf/webmdashenc: fix unchecked strftime

Fix unchecked strftime return value. This patch fixes Coverity
CID 1295086.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264_slice: Fix ranges in assert
Michael Niedermayer [Thu, 14 May 2015 22:30:32 +0000 (00:30 +0200)]
avcodec/h264_slice: Fix ranges in assert

Fixes CID1297592, CID1297593

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure
Michael Niedermayer [Thu, 14 May 2015 21:25:39 +0000 (23:25 +0200)]
avcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/diracdec: Make data_unit_size unsigned
Michael Niedermayer [Thu, 14 May 2015 21:16:06 +0000 (23:16 +0200)]
avcodec/diracdec: Make data_unit_size unsigned

Fixes CID1271788

with this change the value is more explicitly checked, it was fully checked
before though

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: apply mv scaling workaround only when subsampling is enabled.
Ronald S. Bultje [Thu, 14 May 2015 21:05:18 +0000 (17:05 -0400)]
vp9: apply mv scaling workaround only when subsampling is enabled.

9 years agovp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.
Ronald S. Bultje [Thu, 14 May 2015 20:38:53 +0000 (16:38 -0400)]
vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.

9 years agovp9: fix segmentation map referencing upon framesize change.
Ronald S. Bultje [Thu, 14 May 2015 20:37:49 +0000 (16:37 -0400)]
vp9: fix segmentation map referencing upon framesize change.

9 years agoavcodec/dcadec: Check subsubframes
Michael Niedermayer [Thu, 14 May 2015 19:29:19 +0000 (21:29 +0200)]
avcodec/dcadec: Check subsubframes

Fixes: CID1239152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dcadec: Check nchans
Michael Niedermayer [Thu, 14 May 2015 18:49:25 +0000 (20:49 +0200)]
avcodec/dcadec: Check nchans

Fixes CID1239110

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agovp9: disable more pmulhrsw optimizations in idct16/32.
Ronald S. Bultje [Thu, 14 May 2015 18:15:27 +0000 (14:15 -0400)]
vp9: disable more pmulhrsw optimizations in idct16/32.

For idct16, only when called from a adst16x16 variant, so impact is
minor. For idct32, for all, so relatively major impact.

9 years agovp9: disable all pmulhrsw in 8/16 iadst x86 optimizations.
Ronald S. Bultje [Thu, 14 May 2015 17:39:37 +0000 (13:39 -0400)]
vp9: disable all pmulhrsw in 8/16 iadst x86 optimizations.

They all overflow in various samples that are considered valid input.

9 years agohevc: make avcodec_decode_video2() fail if get_format() fails
wm4 [Thu, 14 May 2015 16:27:31 +0000 (18:27 +0200)]
hevc: make avcodec_decode_video2() fail if get_format() fails

Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/cavsdec: Use ff_set_dimensions()
Michael Niedermayer [Thu, 14 May 2015 16:08:33 +0000 (18:08 +0200)]
avcodec/cavsdec: Use ff_set_dimensions()

Fixes CID1239111 part2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/cavsdec: Check frame_rate_code
Michael Niedermayer [Thu, 14 May 2015 16:00:09 +0000 (18:00 +0200)]
avcodec/cavsdec: Check frame_rate_code

Fixes CID1239111 part1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/cavsdec: Check esc_code
Michael Niedermayer [Thu, 14 May 2015 15:54:40 +0000 (17:54 +0200)]
avcodec/cavsdec: Check esc_code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolibavutil/softfloat: Add test case for av_add_sf
Nedeljko Babic [Thu, 14 May 2015 13:36:36 +0000 (15:36 +0200)]
libavutil/softfloat: Add test case for av_add_sf

Recently normalization (av_normalize_sf) of output was added to av_add_sf.
This normalization is used for better precision for small values and the
purpose of this (quite simple) test case is to test difference between double
and softfloat.

The values used are tailored to maximally highlighte problem with precison when
normalization is not used.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/qdrw: Fix the code which asks for version 1 samples
Michael Niedermayer [Thu, 14 May 2015 10:25:05 +0000 (12:25 +0200)]
avcodec/qdrw: Fix the code which asks for version 1 samples

The new code only asks for version 1 if its actually version 1 and
prints the version bytes if its something else

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/qdrw: another try at skipping the first 512 bytes
Michael Niedermayer [Thu, 14 May 2015 10:14:52 +0000 (12:14 +0200)]
avcodec/qdrw: another try at skipping the first 512 bytes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/srtdec: attempt to correct SubRip positioning
Clément Bœsch [Sun, 8 Feb 2015 11:38:06 +0000 (12:38 +0100)]
avcodec/srtdec: attempt to correct SubRip positioning

The positioning was completely wrong. First, the coordinates are
expressed in ASS playback resolution (which is by default 384x288).
Secondly, the coordinates define a drawing rectangle, not a moving area.
The previous code was making subtitles move from a random position to
another random position.

Here we rescale assuming the video resolution is a DVD one (720x480). We
can't really do anything better so far, but since this positioning
information is often from a DVD rip we can consider them relatively
safe.

9 years agoavcodec/ass: make default playback resolution available to decoders
Clément Bœsch [Sun, 8 Feb 2015 11:32:54 +0000 (12:32 +0100)]
avcodec/ass: make default playback resolution available to decoders

9 years agoavcodec/ppc/h264dsp: POWER LE support in h264_idct_dc_add_internal() fix vec_lvsl bug
Rong Yan [Thu, 14 May 2015 06:43:44 +0000 (06:43 +0000)]
avcodec/ppc/h264dsp: POWER LE support in h264_idct_dc_add_internal() fix vec_lvsl bug

We got defective video when use GCC 4.9.2 instead of GCC 4.9.1 to compile FFMEPG. And further found
that GCC 4.8 and 4.9 need patch to fix the lvsl/lvsr bug on POWER LE, and GCC 5.1 contains
the correct code since its release. The message on gcc-patches requesting approval for lvsl/lvsr
patch is at https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00228.html.

The fixed code avoids using lvsl and will not depends on GCC version, also it uses less instructions on POWER LE.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni hv mc functions
Shivraj Patil [Fri, 8 May 2015 08:02:01 +0000 (13:32 +0530)]
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni hv mc functions

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/nutdec: Remove unused variable
Michael Niedermayer [Thu, 14 May 2015 00:23:08 +0000 (02:23 +0200)]
avformat/nutdec: Remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agonutdec: Remove unused label
Timothy Gu [Wed, 13 May 2015 23:23:09 +0000 (16:23 -0700)]
nutdec: Remove unused label

Added in 361702660d2c37a63b7d6381d39e1e1de8405260. Modified version that
doesn't use this label merged in 55231323b0fdc84a529418d673148cf1f3157229,
thus obsoleting this label.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/msrledec: Ask for sample that uses a branch with a unused byte
Michael Niedermayer [Wed, 13 May 2015 23:15:20 +0000 (01:15 +0200)]
avcodec/msrledec: Ask for sample that uses a branch with a unused byte

Finding out if this is correct or buggy is easiest with a sample

Fixes: CID1297620
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/on2avc: Check run more carefully
Michael Niedermayer [Wed, 13 May 2015 23:01:35 +0000 (01:01 +0200)]
avcodec/on2avc: Check run more carefully

Fixes CID1239106

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mpeg4audio: add some padding/alignment to MAX_PCE_SIZE
Michael Niedermayer [Wed, 13 May 2015 22:09:56 +0000 (00:09 +0200)]
avcodec/mpeg4audio: add some padding/alignment to MAX_PCE_SIZE

This avoids potential accesses over the end

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswr: fix alignment issue caused by 8ch sse functions
Rainer Hochecker [Wed, 13 May 2015 16:31:27 +0000 (18:31 +0200)]
swr: fix alignment issue caused by 8ch sse functions

Fix crash when doing 8 ch conversion from apps compiled with MSVS
Thanks to Ronald for giving this hint:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'
Michael Niedermayer [Wed, 13 May 2015 20:34:59 +0000 (22:34 +0200)]
Merge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'

* commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623':
  vda: Make output CVPixelBuffer format configurable

Conflicts:
doc/APIchanges
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b'
Michael Niedermayer [Wed, 13 May 2015 20:25:50 +0000 (22:25 +0200)]
Merge commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b'

* commit '3b5e5e6a29d62462d0505287042fa4c2b99c4f2b':
  libx265: Use the Multi-library Interface

See: 94c20de429420f541aba2d371c6175e8658f8353
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '85ca012ba680bdf942d95ab98c74f6a28f447588'
Michael Niedermayer [Wed, 13 May 2015 20:18:08 +0000 (22:18 +0200)]
Merge commit '85ca012ba680bdf942d95ab98c74f6a28f447588'

* commit '85ca012ba680bdf942d95ab98c74f6a28f447588':
  mjpegenc: Fix JFIF header byte ordering

Conflicts:
libavcodec/mjpegenc_common.c

See: b19313218c32fa9446d474cbddb11c0776868cd3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd84429d41e24437536907af1e6b73197ecf3f6db'
Michael Niedermayer [Wed, 13 May 2015 20:10:54 +0000 (22:10 +0200)]
Merge commit 'd84429d41e24437536907af1e6b73197ecf3f6db'

* commit 'd84429d41e24437536907af1e6b73197ecf3f6db':
  dnxhd: Print unknown header when found

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90'
Michael Niedermayer [Wed, 13 May 2015 20:04:02 +0000 (22:04 +0200)]
Merge commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90'

* commit '8fc11abe1fea4f211cc7dbd58a173d1221627d90':
  mkv: Print unsupported mov tags when found

Conflicts:
libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/qdrw: cleanup skip code
Michael Niedermayer [Wed, 13 May 2015 19:12:28 +0000 (21:12 +0200)]
avcodec/qdrw: cleanup skip code

Skip 512 byte sectors until a non zero resolution is found

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '0348e74c01a099a3787ae21df1c2a742fc846163'
Michael Niedermayer [Wed, 13 May 2015 18:47:20 +0000 (20:47 +0200)]
Merge commit '0348e74c01a099a3787ae21df1c2a742fc846163'

* commit '0348e74c01a099a3787ae21df1c2a742fc846163':
  quickdraw: Skip the empty 512 byte header for images

See: b453e768427969b170820e8e8fe51c84856563b2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd0dce15da34c0e4eee6c683be299de0221db00d3'
Michael Niedermayer [Wed, 13 May 2015 18:38:15 +0000 (20:38 +0200)]
Merge commit 'd0dce15da34c0e4eee6c683be299de0221db00d3'

* commit 'd0dce15da34c0e4eee6c683be299de0221db00d3':
  quickdraw: Make the palette opaque

Conflicts:
libavcodec/qdrw.c

See: 9f9a1f424ed4db992f8a773b2eaad4941de3e9e6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocafdec: free extradata before allocating it
Andreas Cadhalpun [Tue, 12 May 2015 22:22:03 +0000 (00:22 +0200)]
cafdec: free extradata before allocating it

This fixes a memleak if read_kuki_chunk is executed more than once.

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>