1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

33140 Commits

Author SHA1 Message Date
Niklesh
93e80a343b movtextenc.c: Reorganize the code for easier maintenance
This patch reorganizes the code to make it easier to add support for different text modifier boxes and other styles in the future.

Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-07-21 20:13:40 -07:00
Michael Niedermayer
8fe00dd18a Merge commit '6b2b26e7af3ede0abfb46eb5725c26d1083f50bc'
* commit '6b2b26e7af3ede0abfb46eb5725c26d1083f50bc':
  dds: Decode using optimal slices sizes

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 20:35:59 +02:00
Michael Niedermayer
2de5737ee2 Merge commit '977105407cae55876041dddbf4ce0934cdd4cd6c'
* commit '977105407cae55876041dddbf4ce0934cdd4cd6c':
  hap: Decode using optimal slices sizes

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 20:21:54 +02:00
James Almer
d32547a24a avcodec/utils: silence some deprecation warnings
And prevent eventual compilation failures once the relevant functions
and fields are removed.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-21 13:03:29 -03:00
James Almer
3e46c7dbbe avcodec/options-test: don't alloc avctx->coded_frame
It's done automatically by avcodec_open2() now.
Fixes memleaks in fate-libavcodec-options.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-21 13:03:25 -03:00
周晓勇
c303ad85a9 avcodec: loongson optimize blockdsp with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 17:50:19 +02:00
Tom Butterworth
5d0616ce0e avcodec/hapdec: log reason for failure when texture type doesn't match stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 14:54:25 +02:00
周晓勇
b50910e9a9 avcodec: loongson optimize xvid idct with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 14:48:23 +02:00
周晓勇
21e2f030bf avcodec: loongson move simple idct functions to a separate file
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 14:48:18 +02:00
Rostislav Pehlivanov
331c1e7494 aacenc: move the generation of ff_aac_pow34sf_tab[]
This commit moves the generation of ff_aac_pow34sf_tab[] out of the
encoder and into the table generator. The original commit log for
this table in 2011 actually mentions that it should be moved outside
but this never happened.

This is the first commit which cleans up the encoder a little.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 13:53:04 +02:00
Luca Barbato
6b2b26e7af dds: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About the same speedup provided to HAP.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Luca Barbato
977105407c hap: Decode using optimal slices sizes
Enjoy some cache locality and use less threads.
About 5x speedup (from 60ms to 12ms to decode a 4k frame).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-21 12:14:25 +02:00
Tom Butterworth
6b96c70f2d avcodec/hapdec: don't log texture format every frame, do it once per decode session
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 03:25:01 +02:00
Tom Butterworth
440c26e9c4 libavcodec/hap: remove unused struct member
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 03:15:04 +02:00
Tom Butterworth
d8488090e5 libavcodec/hap: Name enums
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 03:14:53 +02:00
James Almer
651448a8a7 avcodec/aacsbr: fix compilation with hardcoded tables
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-20 21:01:19 -03:00
Michael Niedermayer
5d5f8b29b4 Merge commit 'f56d8d8dd72b1ab52aa814c5a0fccabf8040ef68'
* commit 'f56d8d8dd72b1ab52aa814c5a0fccabf8040ef68':
  h264: aarch64: intra prediction optimisations

Conflicts:
	libavcodec/h264pred.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 01:39:30 +02:00
Michael Niedermayer
495eee0123 Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'
* commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370':
  Deprecate avctx.coded_frame

Conflicts:
	ffmpeg.c
	libavcodec/a64multienc.c
	libavcodec/asvenc.c
	libavcodec/cljrenc.c
	libavcodec/dpxenc.c
	libavcodec/gif.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nvenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/pthread_frame.c
	libavcodec/rawenc.c
	libavcodec/sunrastenc.c
	libavcodec/tiffenc.c
	libavcodec/version.h
	libavcodec/xbmenc.c
	libavcodec/xwdenc.c
	libavdevice/v4l2.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 01:17:15 +02:00
Michael Niedermayer
809780ca42 avcodec/utils: Do not merge side data for encoders
With side data now being added to every MPEG*/H26* video encoder
in the form of a quality scalar, software which simply stores
the pkt->data to get an ES stream would break.
This also as a side-effect makes the code faster

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 00:54:59 +02:00
Michael Niedermayer
e5bae39f46 Merge commit '5d3addb937946eca5391e40b5e6308e74ac6f77b'
* commit '5d3addb937946eca5391e40b5e6308e74ac6f77b':
  Add a quality factor packet side data

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/avcodec.h
	libavcodec/mpegvideo_enc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 00:54:42 +02:00
Michael Niedermayer
b1fad7ac20 Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'
* commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534':
  Gather all coded_frame allocations and free functions to a single place

Conflicts:
	libavcodec/a64multienc.c
	libavcodec/asvenc.c
	libavcodec/cljrenc.c
	libavcodec/dpxenc.c
	libavcodec/dvenc.c
	libavcodec/gif.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/libtheoraenc.c
	libavcodec/libvpxenc.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nvenc.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/sunrastenc.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/v210enc.c
	libavcodec/v410enc.c
	libavcodec/xbmenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 23:43:05 +02:00
Janne Grunau
9ed6f9a17c arm: use a local label instead of the function symbol in ff_prefetch_arm
Avoids a relocation which might end out of range for thumb2.

Reported-By: Ludovic Fauvet <etix@videolan.org>
Bug-Id: https://bugs.webkit.org/show_bug.cgi?id=137022
CC: libav-stable@libav.org
2015-07-20 23:10:29 +02:00
Janne Grunau
f56d8d8dd7 h264: aarch64: intra prediction optimisations 2015-07-20 23:10:29 +02:00
Michael Niedermayer
439c9760b0 Merge commit '91f9b6579ac684c4b51c4cd0dbaed0a4f8295edf'
* commit '91f9b6579ac684c4b51c4cd0dbaed0a4f8295edf':
  flashsvenc: Keep coded_frame.key_frame a write-only variable

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:36:22 +02:00
Michael Niedermayer
b97e3e11a9 Merge commit '10a9149de242c7bbc4e130d3d7c593b89e20f80e'
* commit '10a9149de242c7bbc4e130d3d7c593b89e20f80e':
  ffv1enc: Keep coded_frame.key_frame a write-only variable

Conflicts:
	libavcodec/ffv1.h
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:25:53 +02:00
Michael Niedermayer
256430cf38 Merge commit 'efc618aff9d68d2ddc323a5c5f892ac71951f162'
* commit 'efc618aff9d68d2ddc323a5c5f892ac71951f162':
  qtrleenc: Keep coded_frame.key_frame a write-only variable

Conflicts:
	libavcodec/qtrleenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:14:29 +02:00
Michael Niedermayer
bde7f5b135 Merge commit 'f3b4a92241a33d444f7f6018ebc12e2e3a2d335f'
* commit 'f3b4a92241a33d444f7f6018ebc12e2e3a2d335f':
  libtheoraenc: Keep coded_frame.key_frame a write-only variable

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:13:42 +02:00
Michael Niedermayer
96504b3f72 Merge commit 'd6006dd9f0d4d01023359230212f1f9fa4800e5b'
* commit 'd6006dd9f0d4d01023359230212f1f9fa4800e5b':
  libvpxenc: Do not entangle coded_frame

Conflicts:
	libavcodec/libvpxenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:05:27 +02:00
Michael Niedermayer
70c648db89 Merge commit '7fc8d8a1b3da1666176b3d92e989ee74f3ef014e'
* commit '7fc8d8a1b3da1666176b3d92e989ee74f3ef014e':
  libxvid: Do not entangle coded_frame

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 22:01:44 +02:00
Michael Niedermayer
033144c0d1 Merge commit '56672aeaee19216d2fd8eeb9964b1f71f0af2919'
* commit '56672aeaee19216d2fd8eeb9964b1f71f0af2919':
  svq1enc: Do not entangle coded_frame

Conflicts:
	libavcodec/svq1enc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 21:53:09 +02:00
Michael Niedermayer
f2a581e2ee Merge commit '05fb4c9aaf84b59f8ab1ce8d4c0f49dd12113024'
* commit '05fb4c9aaf84b59f8ab1ce8d4c0f49dd12113024':
  proresenc: Do not entangle coded_frame

Conflicts:
	libavcodec/proresenc_kostya.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 21:44:53 +02:00
Michael Niedermayer
a99f0ad194 Merge commit '91767360d86ac786571593ab11c7291010ab3829'
* commit '91767360d86ac786571593ab11c7291010ab3829':
  a64multienc: Do not entangle coded_frame

Conflicts:
	libavcodec/a64multienc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 21:40:34 +02:00
Michael Niedermayer
6497aab022 Merge commit '95e2317ed85502dd8d96bcd9b12084dbfb8f9e8e'
* commit '95e2317ed85502dd8d96bcd9b12084dbfb8f9e8e':
  roqvideoenc: Drop unneeded initialization

Conflicts:
	libavcodec/roqvideoenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 21:31:42 +02:00
Michael Niedermayer
16b68bd2ee Merge commit '1f171de8cae9d0c527c5f0bae2a597dbd65fd3a4'
* commit '1f171de8cae9d0c527c5f0bae2a597dbd65fd3a4':
  mpegvideo_enc: Drop unnneded initialization

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 21:20:51 +02:00
Ivan Uskov
264ba3d847 libavcodec/qsvdec.c: missed MFXVideoDECODE_Close() call
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 19:57:57 +02:00
Djordje Pesut
f85bc147fb avcodec: Implementation of AAC_fixed_decoder (SBR-module)
Add fixed poind code.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 17:20:16 +02:00
Jovan Zelincevic
b0414da90d avcodec: Table creation for AAC_fixed_decoder (SBR-module)
Create tables for fixed point code.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 17:20:16 +02:00
Djordje Pesut
5499467d5d avcodec: Template creation for AAC decoder (SBR-module)
Move the existing code to a new template file.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 17:20:16 +02:00
Niklesh
a927aacbe6 movtextdec.c: Correct the highlight tags
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-07-20 08:16:19 -07:00
Vittorio Giovara
40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Vittorio Giovara
5d3addb937 Add a quality factor packet side data
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:47 +01:00
Donny Yang
0030613d69 avcodec/apngdec: Fix typos in decoder causing incorrect results
Signed-off-by: Donny Yang <work@kota.moe>
2015-07-20 13:46:50 +00:00
Vittorio Giovara
d6604b29ef Gather all coded_frame allocations and free functions to a single place
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().

This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:16:15 +01:00
Vittorio Giovara
91f9b6579a flashsvenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara
10a9149de2 ffv1enc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara
efc618aff9 qtrleenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara
f3b4a92241 libtheoraenc: Keep coded_frame.key_frame a write-only variable 2015-07-20 14:13:42 +01:00
Vittorio Giovara
d6006dd9f0 libvpxenc: Do not entangle coded_frame
Keep coded_frame.key_frame a write-only variable.
2015-07-20 14:13:42 +01:00
Vittorio Giovara
7fc8d8a1b3 libxvid: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara
56672aeaee svq1enc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara
05fb4c9aaf proresenc: Do not entangle coded_frame 2015-07-20 14:13:42 +01:00
Vittorio Giovara
75c1ed2e4c ffv1enc: Use input frame to set SAR and interlacing 2015-07-20 14:13:42 +01:00
Vittorio Giovara
91767360d8 a64multienc: Do not entangle coded_frame
This change (and the following ones of the same kind) is mainly to
simplify wrapping this section with an #if FF_API block later on.

No functional changes are applied, the fields of the context coded_frame
fields are directly initialized, instead of keeping a reference to the
coded_frame itself.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:12:48 +01:00
Vittorio Giovara
95e2317ed8 roqvideoenc: Drop unneeded initialization
Its fields are never initialized to begin with.
2015-07-20 13:57:25 +01:00
Vittorio Giovara
1f171de8ca mpegvideo_enc: Drop unnneded initialization
coded_frame is already initialized where needed.
2015-07-20 13:57:18 +01:00
周晓勇
fdac5ff682 avcodec: loongson relocate constants of idctdsp and h264pred
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 14:29:22 +02:00
周晓勇
4bd6193397 avcodec: loongson constants redefined with macros
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 14:29:22 +02:00
Michael Niedermayer
749f85496c avcodec/ffv1enc: fix assertion failure with unset bits per raw sample
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 02:11:48 +02:00
Carl Eugen Hoyos
c239fcb948 lavc/jpeg2000: Signal lossless / bit-exact video stream. 2015-07-20 00:28:13 +02:00
Carl Eugen Hoyos
d8d2f934bd lavc: Improve documentation for rc_max_rate and bit_rate.
Both may be set by user (libavformat) on decoding.
2015-07-20 00:27:51 +02:00
Michael Niedermayer
5c583b1419 avcodec/dds: Flip more R<->B cases
Fixes Ticket4665

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 00:03:11 +02:00
Michael Niedermayer
36a87c2dc7 avcodec/dds: fix paletted files
Fixes Ticket4664

The changed fate tests lack red/blue shades and thus look correct
either way

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 23:26:59 +02:00
Michael Niedermayer
ea8785ceda avcodec/utils: Check that channel count is valid in avcodec_open2();
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 18:17:45 +02:00
Michael Niedermayer
9c943e077b Merge commit '69b92f1b99f3f210be19ee6ec06f6c0de1733031'
* commit '69b92f1b99f3f210be19ee6ec06f6c0de1733031':
  qsvenc: properly handle asynchronous encoding

Conflicts:
	libavcodec/qsvenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 16:34:12 +02:00
Michael Niedermayer
f929081f2e Merge commit 'f5c4d38c78347b09478e21a661befff4b2d44643'
* commit 'f5c4d38c78347b09478e21a661befff4b2d44643':
  qsvdec: properly handle asynchronous decoding

Conflicts:
	libavcodec/qsvdec.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 16:13:35 +02:00
Anton Khirnov
69b92f1b99 qsvenc: properly handle asynchronous encoding
Wait for async_depth frames before syncing.
2015-07-19 10:06:53 +02:00
Anton Khirnov
f5c4d38c78 qsvdec: properly handle asynchronous decoding
Wait for async_depth frames before syncing.
2015-07-19 09:47:45 +02:00
Michael Niedermayer
54882156dd avcodec/hevc_parser: Treat extradata parsing differently, as it should not contain an AU
Fixes ticket4718

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 03:24:25 +02:00
Michael Niedermayer
599d746e07 avcodec/vp8: Check buffer size in vp8_decode_frame_header()
avoids null pointer dereference
Fixes: signal_sigsegv_d5de40_964_vp80-00-comprehensive-010.ivf with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 19:37:04 +02:00
Michael Niedermayer
a84f0e8d8f avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()
Fixes: signal_sigsegv_d5de23_967_vp80_00_comprehensive_010.ivf with memlimit 524288

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 19:03:23 +02:00
Michael Niedermayer
1c5b712c0a avcodec/diracdec: Check for hpel_base allocation failure
Fixes null pointer dereference
Fixes: signal_sigsegv_b02a96_280_RL_420p_ffdirac.drc with memlimit of 67108864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 18:05:41 +02:00
Michael Niedermayer
3197c0aa87 avcodec/rv34: Clear pointers in ff_rv34_decode_init_thread_copy()
Avoids leaving stale pointers
Fixes: signal_sigabrt_7ffff70eccc9_819_sabtriple.rm with memlimit 536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 11:28:17 +02:00
Michael Niedermayer
f8e4d37983 avcodec/hevc_ps: Also print depth in failure path of map_pixel_format()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 05:12:00 +02:00
Michael Niedermayer
c0894e6288 Merge commit '256ef19844892c6cf8e0386e3287bae970ec6320'
* commit '256ef19844892c6cf8e0386e3287bae970ec6320':
  h264: arm: use intra pred8x8 functions only for chroma_format_idc <= 1

Conflicts:
	libavcodec/arm/h264pred_init_arm.c

See: 565cabf5c8
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 02:13:22 +02:00
Janne Grunau
256ef19844 h264: arm: use intra pred8x8 functions only for chroma_format_idc <= 1 2015-07-18 00:28:49 +02:00
Michael Niedermayer
52b6d96268 Merge commit 'a344e5d094ebcf9a23acf3a27c56cbbbc829db42'
* commit 'a344e5d094ebcf9a23acf3a27c56cbbbc829db42':
  x86: bswapdsp: Don't treat 32-bit integers as 64-bit

Conflicts:
	libavcodec/x86/bswapdsp.asm

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 23:20:14 +02:00
Michael Niedermayer
c7c33ab721 Merge commit 'f5ee23004d1177ca6dd99b92cb4ff4b94b2eae09'
* commit 'f5ee23004d1177ca6dd99b92cb4ff4b94b2eae09':
  configure: Factor out g722dsp module

Conflicts:
	configure
	libavcodec/arm/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 23:04:47 +02:00
Michael Niedermayer
65b0f7ce08 Merge commit 'a623aa0069dff586241ad2ffedcd45ed840e2553'
* commit 'a623aa0069dff586241ad2ffedcd45ed840e2553':
  configure: Factor out wmv2dsp module

Conflicts:
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 22:56:00 +02:00
Michael Niedermayer
115a9b5091 Merge commit 'd42191c78befc1983f23b1899b2dda513b72f1ed'
* commit 'd42191c78befc1983f23b1899b2dda513b72f1ed':
  configure: Factor out vp8dsp module

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 22:45:34 +02:00
Michael Niedermayer
3500eccb8e Merge commit 'd4aea1aa4060fb5ba7f5f426823b697d2a5af08b'
* commit 'd4aea1aa4060fb5ba7f5f426823b697d2a5af08b':
  configure: Factor out vp56dsp module

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 22:31:45 +02:00
Michael Niedermayer
fd29dd432c Merge commit '5cb4bdb2a03c3643f8f1e7d21d7094e61e0a4418'
* commit '5cb4bdb2a03c3643f8f1e7d21d7094e61e0a4418':
  configure: Factor out rv34dsp module

Conflicts:
	libavcodec/Makefile
	libavcodec/x86/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 22:21:36 +02:00
Michael Niedermayer
189f2ed902 avcodec/libx264: fix MPEG2 support
Found-by: rcombs
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 22:14:00 +02:00
Michael Niedermayer
77cd5193a5 Merge commit '575ec60e542114b2ef5b2f88b28eeb72389dda45'
* commit '575ec60e542114b2ef5b2f88b28eeb72389dda45':
  configure: Factor out mss34dsp module

Conflicts:
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 21:59:45 +02:00
Michael Niedermayer
ccd3edf81f Merge commit '2edc77dc7be5f4a006c6295f4c827e5471f85262'
* commit '2edc77dc7be5f4a006c6295f4c827e5471f85262':
  configure: Factor out ividsp module

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 21:51:19 +02:00
Michael Niedermayer
948a15195c Merge commit 'b075869bc1e1aadea0a8dc819ebfb758adb9e3d0'
* commit 'b075869bc1e1aadea0a8dc819ebfb758adb9e3d0':
  configure: Factor out flacdsp module

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/arm/Makefile

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 21:42:14 +02:00
Michael Niedermayer
e56f14659f Merge commit 'e1319aa1c1be9b64117c19170344fb78841dd67c'
* commit 'e1319aa1c1be9b64117c19170344fb78841dd67c':
  libx264: Add support for the MPEG2 encoder

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/libx264.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 21:21:03 +02:00
Henrik Gramner
a344e5d094 x86: bswapdsp: Don't treat 32-bit integers as 64-bit
The upper halves are not guaranteed to be zero in x86-64.

Also use `test` instead of `and` when the result isn't used for anything other
than as a branch condition, this allows some register moves to be eliminated.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-17 20:02:28 +02:00
Vittorio Giovara
f5ee23004d configure: Factor out g722dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
a623aa0069 configure: Factor out wmv2dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
d42191c78b configure: Factor out vp8dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
d4aea1aa40 configure: Factor out vp56dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
5cb4bdb2a0 configure: Factor out rv34dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
575ec60e54 configure: Factor out mss34dsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
2edc77dc7b configure: Factor out ividsp module 2015-07-17 18:46:24 +01:00
Vittorio Giovara
b075869bc1 configure: Factor out flacdsp module 2015-07-17 18:46:23 +01:00
Michael Niedermayer
1cdfae0b3e Merge commit '0cf5588d69922aa3e063bac6304c09c543a9ef52'
* commit '0cf5588d69922aa3e063bac6304c09c543a9ef52':
  hq_hqa: Fix decoding when INFO section is absent

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 14:59:18 +02:00
Michael Niedermayer
441d5a7084 Merge commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37'
* commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37':
  h264: Add support for Closed Caption export

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_sei.c

See: 8234f0e3b4
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 14:13:19 +02:00
Luca Barbato
e1319aa1c1 libx264: Add support for the MPEG2 encoder 2015-07-17 10:47:48 +02:00
Vittorio Giovara
0cf5588d69 hq_hqa: Fix decoding when INFO section is absent 2015-07-17 01:49:42 +01:00
Kieran Kunhya
b0017579b6 h264: Add support for Closed Caption export
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-17 01:44:22 +01:00
Carl Eugen Hoyos
7f0d540188 lavc: Allow 64 channels internally. 2015-07-17 00:16:45 +02:00
Ivan Uskov
6e127990fa Refactoring to move common QSV-related code part into libavcodec/qsvdec.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 21:30:45 +02:00
Tom Butterworth
17ee24af7e avcodec/snappy: refactor so ff_snappy_uncompress uses an existing buffer
Some uses of Snappy require uncompressing to positions within an existing buffer. Also adds a function to get the uncompressed length of Snappy data.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 20:41:07 +02:00
Tom Butterworth
6074956fa1 avcodec/hap: move some per-stream setup into decoder init rather than per-frame
This change will reject frames with a texture type which doesn't match the stream description.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 16:04:06 +02:00
Shivraj Patil
012ba786e6 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions in new file vp9_mc_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 15:03:02 +02:00
周晓勇
0bfa176c64 avcodec: loongson optimized idctdsp with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 14:27:53 +02:00
周晓勇
dcd14db806 avcodec: loongson add constant definition
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 14:27:49 +02:00
Michael Niedermayer
f1a38264f2 avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case
Fixes: b4b47bc2b3fb7ca710bfffe5aa969e37_signal_sigabrt_7ffff70eccc9_744_nc_sample2.avi with memlimit of 4194304

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 12:18:30 +02:00
Carl Eugen Hoyos
8dad213143 lavc: Add properties field to AVCodecContext.
The new field can hold information about losslessness and closed captions for now.
2015-07-16 12:18:30 +02:00
Luca Barbato
c88c5eef53 hevc: Split the struct setup from the pps parsing 2015-07-15 19:39:44 +02:00
Michael Niedermayer
4e160ecdbc Merge commit 'c88c5eef53ff1619724ba47b722da64ec0593dab'
* commit 'c88c5eef53ff1619724ba47b722da64ec0593dab':
  hevc: Split the struct setup from the pps parsing

Conflicts:
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 21:21:40 +02:00
Michael Niedermayer
269a71b68a avcodec/mpeg4videodec: Clarify the mpeg4_unpack_bframes reference.
This should avoid misunderstandings like in Ticket4618

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 21:05:24 +02:00
Michael Niedermayer
4a6b8289e6 avcodec/mips/mpegvideo_mmi: Use av_assert2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 17:25:42 +02:00
ZhouXiaoyong
95418634b1 avcodec: loongson optimized mpegvideo dct unquantize with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 15:51:07 +02:00
周晓勇
a0ad6c85ac avcodec: loongson optimized h264pred with mmi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 15:51:02 +02:00
Michael Niedermayer
dffae122d0 avcodec/mjpegdec: Fix DC overflow in decode_block()
Fixes Ticket4683

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 05:05:25 +02:00
Michael Niedermayer
bfd17046c1 avcodec/mpeg12dec: Fix decoding of faulty interlaced mpeg2
Fixes Ticket4721

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 00:09:15 +02:00
Timo Rothenpieler
550e872bcd avcodec/nvenc: Fix build with older gcc versions
Aparently anonymous structs weren't always supported, not even sure if
they are standard conformant.
2015-07-14 23:00:44 +02:00
Arttu Ylä-Outinen
b90b6af710 avcodec: add libkvazaar HECV encoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 18:00:36 +02:00
Ivan Uskov
ce91bab70f libavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under linux platform.
Reviewed-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 02:02:55 +02:00
Michael Niedermayer
3edc6d1cd9 Merge commit '32c8d89c036b0e75ece74aea638df587099def0b'
* commit '32c8d89c036b0e75ece74aea638df587099def0b':
  hevc: Print the non-supported chroma_format_idc

Conflicts:
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 01:33:58 +02:00
Michael Niedermayer
e17a459af0 Merge commit '8e373fe048812a25b238ea60a7052b8c07639a42'
* commit '8e373fe048812a25b238ea60a7052b8c07639a42':
  hevc: Factor out the pixel format mapping from the sps parser

Conflicts:
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 01:23:39 +02:00
Michael Niedermayer
4bde1a4a37 avcodec/mpegvideo: Fix null pointer dereference of picture array
Fixes: 0d0a2bace067d09c08f0fa5340496c23_signal_sigsegv_7ffff713351a_342_WobblyWindowsIntro.avi with memlimit of 67108864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 00:31:57 +02:00
Michael Niedermayer
85b7456efe avcodec/hevc_parser: Fix memleaks in parser mix
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 22:26:53 +02:00
Michael Niedermayer
5d346feafa avcodec/pthread_frame: check avctx on deallocation
Fixes null pointer dereferences
Fixes: af1a5a33e67e479f439239097bd0d4fd_signal_sigsegv_7ffff713351a_152_Dolby_Rain_Logo.pmp with memlimit of 8388608

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 22:09:50 +02:00
Luca Barbato
32c8d89c03 hevc: Print the non-supported chroma_format_idc
And drop the spurious newline.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-13 21:59:53 +02:00
Luca Barbato
8e373fe048 hevc: Factor out the pixel format mapping from the sps parser
The function will grow larger as more formats are supported.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-13 21:59:53 +02:00
James Almer
84e847c7c8 avcodec/hevc_parser: use the old parser only when hevc decoder is available
If it's not, then the new dependence-free parser will be used instead

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-13 14:57:54 -03:00
Michael Niedermayer
cc0380222a avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()
Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 19:26:37 +02:00
Michael Niedermayer
697160366f avcodec/vp3: check current_frame before accessing it
Fixes null pointer dereference
Fixes: b15eb06e0111e94bc59123c86db7aff9_signal_sigsegv_a0500f_45_320vp3.nsv with allocation limit  536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 19:11:56 +02:00
Michael Niedermayer
5be07d0206 Merge commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b'
* commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b':
  hevc_parser: fix standalone build with the hevc decoder disabled

Conflicts:
	libavcodec/Makefile
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 17:04:13 +02:00
Michael Niedermayer
afa97144cf Merge commit '077b55943330150db0eafd36bbee614697cabd98'
* commit '077b55943330150db0eafd36bbee614697cabd98':
  hevc: handle a NULL sps in set_sps() properly

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 16:41:09 +02:00
Michael Niedermayer
d13fc98247 Merge commit '18156b53f9b642b71c182c5c9818175a61572d2b'
* commit '18156b53f9b642b71c182c5c9818175a61572d2b':
  hevc: do not pass an entire HEVCContext into export_stream_params()

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 16:31:10 +02:00
Michael Niedermayer
39bbdebb1e avcodec/sanm: Reset sizes in destroy_buffers()
Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 16:06:37 +02:00
Michael Niedermayer
f7068bf277 avcodec/alac: Clear pointers in allocate_buffers()
Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 15:47:49 +02:00
James Almer
1b9a8e5f1d dxva2_hevc: unbreak compilation after recent sps/pps changes
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-13 09:00:37 +02:00
Anton Khirnov
a062a55d37 hevc_parser: fix standalone build with the hevc decoder disabled
The parser depends on hevc_ps, which in turn needs some data tables.

Found-by: James Almer <jamrial@gmail.com>
2015-07-13 08:58:21 +02:00
Anton Khirnov
b9f76d19d8 hevc_ps: make sure failing to decode an SPS always returns an error
Some of the goto err clauses do not set the error code. It seems better
to fall back on INVALIDDATA instead of adding it everywhere explicitly.
2015-07-13 07:49:03 +02:00
James Almer
1aab5d8ab1 avcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-13 00:06:02 -03:00
Philip Langdale
b11c3fce38 avcodec/vdpau_hevc: unbreak compilation after sps/pps changes
There was some reorganisation in the HEVC headers so the sps and pps
now live in a different place.
2015-07-12 19:56:54 -07:00
Michael Niedermayer
10d7d0880c avcodec/utils: Check that the sample rate is not negative when opening an encoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 03:51:33 +02:00
Michael Niedermayer
d6ff68ad85 Factor duplicated ff_fast_malloc() out into mem_internal.h
internal.h is difficult to use due to circular dependancies
mem.h is a public header ff_* is not public
Alternative solutions probably are possible too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 02:41:43 +02:00
Michael Niedermayer
4496ccc724 avcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define
Feel free to use either, they both work but the old one provides
more information but needs the hevc decoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 02:14:58 +02:00
Michael Niedermayer
9e810a98a2 Merge commit '650060dfb665552442ec11b456660e3e9a9d9016'
* commit '650060dfb665552442ec11b456660e3e9a9d9016':
  hevc_parser: parse and export some stream parameters

Conflicts:
	configure
	libavcodec/hevc_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 01:28:57 +02:00
Michael Niedermayer
99558270ed avcodec/hevc: Simplify skipped_bytes_pos code further
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 01:09:21 +02:00
Michael Niedermayer
ad92410d90 avcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:43:25 +02:00
Michael Niedermayer
bcc6c7bb65 avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:38:15 +02:00
Michael Niedermayer
5620ed3557 avcodec/hevc: Remove skipped_bytes_nal, simplify code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:03:45 +02:00
Michael Niedermayer
93aa84c1ea Merge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'
* commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4':
  hevc: improve a comment

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 23:45:56 +02:00
Michael Niedermayer
4690a63632 Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'
* commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0':
  hevc: move splitting the packet into NALUs into a separate function

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc.h
	libavcodec/hevc_parse.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 23:44:24 +02:00
Michael Niedermayer
4c42c66935 Merge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'
* commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751':
  hevc: eliminate the second call to hls_nal_unit()

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:55:47 +02:00
Michael Niedermayer
760304e4c3 Merge commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9'
* commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9':
  hevc: skip invalid/ignored NALUs when splitting the packet

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:46:06 +02:00
Michael Niedermayer
d5fcca83b9 Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'
* commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2':
  hevc: remove HEVCContext usage from hevc_ps

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_cabac.c
	libavcodec/hevc_filter.c
	libavcodec/hevc_mvs.c
	libavcodec/hevc_ps.c
	libavcodec/hevc_refs.c
	libavcodec/hevcpred_template.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:28:54 +02:00
Michael Niedermayer
ddd86e4747 Merge commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7'
* commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7':
  mpegvideo_parser: export pixel format and dimensions

Conflicts:
	libavcodec/mpegvideo_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 21:34:59 +02:00
Michael Niedermayer
98c7f9741e Merge commit '86eee85daddb682fa072c2e2657c90a514b855e3'
* commit '86eee85daddb682fa072c2e2657c90a514b855e3':
  bytestream2: set the reader to the end when reading more than available

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 21:13:07 +02:00
Niklesh
774ceee17e movtextdec.c: Add support for highlight and hilightcolor box
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-07-12 10:24:17 -07:00
Anton Khirnov
077b559433 hevc: handle a NULL sps in set_sps() properly
This can happen in update_thread_context(), when the previous frame was
corrupted.
2015-07-12 18:57:10 +02:00
Anton Khirnov
18156b53f9 hevc: do not pass an entire HEVCContext into export_stream_params()
It only needs the parameter sets.
2015-07-12 18:52:02 +02:00
James Almer
a3b721d10d avcodec/dcadec: silence request_channels deprecation warnings
This also prevents an eventual compilation failure once request_channels
is removed.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-12 13:32:22 -03:00
Anton Khirnov
650060dfb6 hevc_parser: parse and export some stream parameters
Particularly those that will be needed by the QSV decoder.
More can be added later as necessary.
2015-07-12 18:15:40 +02:00
Anton Khirnov
7f78155dc6 hevc: improve a comment
That loop does the actual full decoding, so 'parse' can be misleading.
2015-07-12 18:15:40 +02:00
Anton Khirnov
d82e1adc20 hevc: move splitting the packet into NALUs into a separate function
This function is independent of the decoding context, so we'll be able
to use it in the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
ae05b48655 hevc: eliminate the second call to hls_nal_unit()
Also, make hls_nal_unit() work only on the provided NAL unit, without
requiring a whole decoding context.

This will allow splitting this code for reuse by the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
d7bebe4805 hevc: skip invalid/ignored NALUs when splitting the packet
There is no need to wait until actually decoding the NALU. This will
allow to get rid of the second hls_nal_unit() call later.
2015-07-12 18:15:39 +02:00
Anton Khirnov
b11acd5732 hevc: remove HEVCContext usage from hevc_ps
Factor out the parameter sets into a separate struct and use it instead.

This will allow us to reuse this code in the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
ab05ed4c32 mpegvideo_parser: export pixel format and dimensions 2015-07-12 18:15:39 +02:00
Anton Khirnov
86eee85dad bytestream2: set the reader to the end when reading more than available
This prevents possible infinite loops with the calling code along the
lines of while (bytestream2_get_bytes_left()) { ... }, where the reader
does not advance.

CC: libav-stable@libav.org
2015-07-12 18:15:39 +02:00
Andreas Cadhalpun
9f4c7397a2 hevc: check slice address length
It is used as get_bits argument and reading 0 bits doesn't make sense.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-12 18:15:39 +02:00
Michael Niedermayer
e72988d3f8 Merge commit '355864ef7a9548ee6491a25de1e0650bd983a667'
* commit '355864ef7a9548ee6491a25de1e0650bd983a667':
  g726: Do not crash on user mistake

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 15:08:30 +02:00
Michael Niedermayer
f8db81074a avcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:36:45 +02:00
Michael Niedermayer
59a07df067 avcodec/utils: Avoid undefined void casts in ff_fast_malloc()
based on code from libavutil/mem.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:24:16 +02:00
Michael Niedermayer
bc976e5793 avcodec/utils: Fix potential overflow in overallocation code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 22:46:44 +02:00
Luca Barbato
355864ef7a g726: Do not crash on user mistake
Properly report the sample rate as invalid

CC: libav-stable@libav.org
2015-07-11 18:45:44 +02:00
Michael Niedermayer
c06e556274 avcodec/mpeg4videodec: Check P cbpy
Fixes undefined behavior
Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 00:22:29 +02:00
Andreas Cadhalpun
75fd5ce4c1 imc: use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-11 00:00:36 +02:00
Michael Niedermayer
d759f7f1d0 avcodec/j2kenc: remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 23:24:20 +02:00
Andreas Cadhalpun
1410eeb6ea imc: Use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-10 23:13:30 +02:00
Andreas Cadhalpun
05cc8c8e4b hevc: check slice address length
It is used as get_bits argument and reading 0 bits isn't supported.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-10 21:28:56 +02:00
Michael Niedermayer
47d077337a avcodec/utils: Document 32 min for h264 width
Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 18:31:42 +02:00
Michael Niedermayer
b1e242bc56 avcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()
Fixes: asan_double-free_d34593_861_smp3.wmv

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 18:11:28 +02:00
Andreas Cadhalpun
3526a120f9 snow: remove an obsolete av_assert2
It asserts that the frame linesize is larger than 37, but it can be
smaller and decoding such frames works.

Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the
blocks were interleaved in the tmp buffer and the last block was added
with an offset of 6*MB_SIZE.
It was changed for src_stride <= 7*MB_SIZE to write the blocks
sequentially, hence the larger tmp_step.
After that the assert was only necessary to make sure that the buffer
remained large enough.
Since commit bd2b6b33 s->scratchbuf is used as tmp buffer.
As part of commit 86e107a7 the minimal scratchbuf size was increased to
256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE.

Also add a comment explaining the tmp_step calculation.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-10 16:21:50 +02:00
Michael Niedermayer
7ef6656b1e avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
Fixes Assertion failure
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 15:18:41 +02:00
Michael Niedermayer
e71ca21f30 avcodec/motion_est_template: Fix undefined behavior in small_diamond_search()
Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 13:42:41 +02:00
Michael Niedermayer
7b404c94f3 avcodec/libopenh264enc: Do not truncate frame rate
Suggested-by: Gregory J Wolfe <gregory.wolfe@kodakalaris.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 04:19:07 +02:00
Michael Niedermayer
033dc39c56 Merge commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7'
* commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7':
  libvpx: Add the library header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 02:32:08 +02:00
Ivan Uskov
5985316fba libavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFrameAsync
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 01:26:16 +02:00
Michael Niedermayer
b160fc290c avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
This ensures that no stale pointers leak through on any path

Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 22:47:16 +02:00
Vittorio Giovara
67c884eb07 libvpx: Add the library header
Unbreak make checkheaders
2015-07-09 21:36:19 +02:00
Luca Barbato
461b45efd0 lavc: Add nvenc.h to the skipheader
Unbreak make checkheaders
2015-07-09 21:34:57 +02:00
Ivan Uskov
dbf8352a2e libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 17:46:18 +02:00
Michael Niedermayer
7ee935ba5c avcodec/qsvenc_hevc: Attempt to fix error: too few arguments to function ff_hevc_extract_rbsp
Found-by: Ivan Uskov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 16:51:51 +02:00
Jovan Zelincevic
f21b4472ef libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]
Build system modified

There are several warnings occurring during build after this patch is
applied. The cause of most of these warnings is in that some definitions
needed here are logical part of sbr module and are added in later patches.
When this patches are applied these warnings stop occurring.

The only warning that is added here and is not fixed with later patches
is warning that warns that type mismatch for table ff_aac_eld_window_480.

The reason for this warning is in that ER AAC ELD 480 is not integrated in
to the fixed point implementation at this moment and there is no fixed point
version of this table.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:41 +02:00
Djordje Pesut
b04f46cb4b libavcodec: Implementation of AAC_fixed_decoder (LC-module) [3/4]
Add fixed point implementation

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:31 +02:00
Jovan Zelincevic
08be74ac81 libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/4]
Add fixed point implementation of functions for generating tables

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:19 +02:00
Jovan Zelincevic
f497a9e84e libavcodec: Implementation of AAC_fixed_decoder (LC-module) [1/4]
Move existing code to the new template files

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:35:44 +02:00
Michael Niedermayer
15893adbdb avcodec/hevc_ps: Remove gotos from ff_hevc_parse_sps()
They are currently unnecessary

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 13:02:07 +02:00
Michael Niedermayer
7871eb4361 Merge commit '66acb76bb0492b263215ca9b4d927a7be39ace02'
* commit '66acb76bb0492b263215ca9b4d927a7be39ace02':
  lavc: add Intel libmfx-based HEVC encoder

Conflicts:
	Changelog
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/qsv.c
	libavcodec/qsvenc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 11:53:14 +02:00
Michael Niedermayer
96ee6b9962 Merge commit '3a85397e8bb477eb34678d9edc52893f57003226'
* commit '3a85397e8bb477eb34678d9edc52893f57003226':
  lavc: add Intel libmfx-based MPEG2 encoder

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 11:17:12 +02:00
Michael Niedermayer
07ae8fa20e Merge commit '69ab9f53f901eac6a649e22d28cf093357870627'
* commit '69ab9f53f901eac6a649e22d28cf093357870627':
  hevc: split bitstream unescaping to a separate file

Conflicts:
	libavcodec/Makefile
	libavcodec/hevc.c

See: afa93d198a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 05:06:48 +02:00
Michael Niedermayer
1dacf26964 avcodec/hevc_ps: Do not return success on failures in ff_hevc_parse_sps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 04:50:05 +02:00