Commit Graph

32227 Commits

Author SHA1 Message Date
Michael Niedermayer
561d3a57aa avcodec/mpegvideo_enc: Update the buffer size as more slices are merged
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 05:14:02 +02:00
Michael Niedermayer
e4c2ec879b avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 04:55:37 +02:00
Michael Niedermayer
1cacecce79 avcodec/libutvideoenc: Fix memleak
Fixes: CID1257657

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 00:32:46 +02:00
James Almer
c5a07f1f84 libdcadec: search for frames that start late in a packet
Based on commit 4ae15605f6

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-24 13:06:42 -03:00
Michael Niedermayer
db5ea69d80 avcodec/ituh263enc: Pass PutBitContext into h263p_encode_umotion() instead of MpegEncContext
This avoids the need to dereference MpegEncContext->pb if it is
already available outside h263p_encode_umotion()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 17:27:47 +02:00
Michael Niedermayer
404fe63e23 avcodec: Pass PutBitContext into ff_h263_encode_motion() instead of MpegEncContext
This avoids the need to dereference MpegEncContext->pb if it is
already available outside ff_h263_encode_motion()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 17:15:18 +02:00
Michael Niedermayer
b71dc29729 avcodec/h263: Remove unused argument of h263_get_motion_length()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 16:58:55 +02:00
Michael Niedermayer
39de31ccb6 avcodec/mpeg4video: Reorder operations to reduce accesses to err_recognition
About 9 cpu cycle faster mpeg4_decode_mb()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 16:11:38 +02:00
Michael Niedermayer
de0d3fe562 avcodec/y41pdec: Avoid using float for size test
Floats are not bitexact

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 21:46:07 +02:00
James Almer
8952254ffe libwebp: simplify AVCodec.close functions
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 14:46:46 -03:00
Michael Niedermayer
4ae15605f6 avcodec/dcadec: Search and decode frame in case it starts later in a packet
This fixes decoding the first frame of some dts files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 16:37:16 +02:00
James Almer
1096c46c55 libwebp: use a separate AVClass for each encoder
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:52:16 -03:00
James Almer
44ca8a6adb libwebpenc_common: add header guards
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:44:54 -03:00
James Almer
98be2d94ea libwebp: remove unneeded defines
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:29:23 -03:00
Urvang Joshi
02cf59f3a6 WebP encoder: use WebPAnimEncoder API when available.
WebPAnimEncoder API is a combination of encoder (WebPEncoder) and muxer
(WebPMux). It performs several optimizations to make it more efficient
than the combination of WebPEncode() and native ffmpeg muxer.

When WebPAnimEncoder API is used:
- In the encoder layer: we use WebPAnimEncoderAdd() instead of
  WebPEncode().
- The muxer layer: works like a raw muxer.

On the other hand, when WebPAnimEncoder API isn't available, the old code is
used as it is:
- In the codec layer: WebPEncode is used to encode each frame
- In the muxer layer:  ffmpeg muxer is used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 03:31:28 +02:00
Michael Niedermayer
f275f9eaee Merge commit '4e17946f10d39eec6cc03fb249ae8147373141b6'
* commit '4e17946f10d39eec6cc03fb249ae8147373141b6':
  mpegvideo: Rework various functions not to use MpegEncContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 22:39:47 +02:00
Michael Niedermayer
179527f34e Merge commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2'
* commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2':
  mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:17:34 +02:00
Michael Niedermayer
a25ee5f922 Merge commit 'd528045558825f01472e9bee873f60c98d661e53'
* commit 'd528045558825f01472e9bee873f60c98d661e53':
  mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

The memset is left in place

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:15:32 +02:00
Michael Niedermayer
bc373595f2 Merge commit '6f54dc43cee6b2f5d183acf98b32a3cf8be4a4fc'
* commit '6f54dc43cee6b2f5d183acf98b32a3cf8be4a4fc':
  mpegvideo: Drop stream_codec_tag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:49:16 +02:00
Michael Niedermayer
d5227ceff1 Merge commit '9c1db92ad372d4cd69e0490e691c56e4097cb193'
* commit '9c1db92ad372d4cd69e0490e691c56e4097cb193':
  mpegvideo: Drop err_recognition

Conflicts:
	libavcodec/h263dec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg4video.h
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:38:42 +02:00
Michael Niedermayer
d9b264bc73 Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
  mpegvideo: Drop flags and flags2

Conflicts:
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/ratecontrol.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:24:41 +02:00
Niklesh
337aa17e61 avcodec/movtextdec: Add support for large boxes(>32 bit)
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-05-22 08:32:20 -07:00
Vittorio Giovara
4e17946f10 mpegvideo: Rework various functions not to use MpegEncContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
a3f4c930ac mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
d528045558 mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
6f54dc43ce mpegvideo: Drop stream_codec_tag
The field is unused.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
9c1db92ad3 mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
848e86f74d mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
Michael Niedermayer
d09321b68e avcodec/mpeg12dec: Fix chroma location
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 15:30:31 +02:00
Urvang Joshi
f99fed733d WebP encoder: extract out some methods into a separate helper library.
This is the 2nd patch in preparation for using WebPAnimEncoder API for encoding
and muxing WebP images.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 03:16:59 +02:00
周晓勇
33e9473366 avcodec/mips: loongson fix bugs in mathops optimization
the incorrect UMULH, ff_sqrt, MAC64 and MLS64 to be optimized later, delete them just for now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 17:46:33 +02:00
Michael Niedermayer
737b0ca65b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavc/qdrw: Do not fail decoding valid Quickdraw images.
  lavf/mov: Use AVCOL_SPC constants when checking color_space.
  lavf/mov: Write colour matrix "6" for color_space bt470bg.
  lavf/mkv: Only skip prores header if the packet is large enough.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 01:26:36 +02:00
James Almer
40bf3687a1 libvpx: add support for yuv440p and yuv440p10/12 encoding
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-20 20:08:56 -03:00
Carl Eugen Hoyos
209e91cbc4 lavc/qdrw: Do not fail decoding valid Quickdraw images. 2015-05-21 01:05:13 +02:00
Vittorio Giovara
265d884eb0 avcodec/vmnc: Add back adapted comment about 24bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 19:24:54 +02:00
Michael Niedermayer
b6ca7bfc7c avcodec/vmnc: Simplify "24bit" support
This also makes the code more robust, removing potential out of
array writes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:50:38 +02:00
Michael Niedermayer
a4c7aeaf82 Merge commit 'eafbc6716cede6d4a652f8bedf82f2901c68d06d'
* commit 'eafbc6716cede6d4a652f8bedf82f2901c68d06d':
  vmnc: Delay pixel size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:41:43 +02:00
Michael Niedermayer
6d1935d1b9 avcodec/hevc: Remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:15:22 +02:00
Michael Niedermayer
50965e0673 avcodec: add mathops test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 15:50:58 +02:00
Carl Eugen Hoyos
eb0c08bc69 lavc/vmnc: Fix 32bit colour-space, there is no transparency. 2015-05-20 14:59:38 +02:00
Niklesh
b44a55ad2d Fix movtext crashes caused due to lack of proper bounds checking
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-05-19 20:15:15 -07:00
Michael Niedermayer
b8e7f2b277 avcodec/flacenc: Support Multi dimensional quantization
Now with exact bit computations if exact_rice_parameters is enabled

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 01:35:29 +02:00
wm4
3efe0393e4 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>
2015-05-19 18:59:06 +01:00
Vittorio Giovara
eafbc6716c vmnc: Delay pixel size check
Some clients incorrectly set 24 as bits_per_coded_sample, while
the actual value is preserved in one of the codec headers.
In order to work around this, delay the check until decode_frame().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 18:55:30 +01:00
Michael Niedermayer
215410860f avcodec/flacenc: Mark pointers/array arguments const which are not changed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 19:47:22 +02:00
Michael Niedermayer
5dfcb4f74d avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 19:41:44 +02:00
Michael Niedermayer
7786a91b47 avcodec/flacenc: Move udata and sums to FlacSubframe
This significantly reduces the amount of stack space needed and
also permits to simply copy the rice context again without speed
penalty

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 13:48:30 +02:00
Michael Niedermayer
80f9d6e0ab avcodec/flacenc: Support calculating rice parameters exactly
Some files benefit by about 0.3% from this, and speedwise its ok
other files do not benefit and encode to the same size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 13:42:56 +02:00
Michael Niedermayer
d3dcd28812 avcodec/flacenc: Do not copy unused udata array -> 5x faster calc_rice_params()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 12:11:27 +02:00
Michael Niedermayer
d0ac2f59aa avcodec/golomb: Remove disabled and broken code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 03:25:53 +02:00