Commit Graph

32118 Commits

Author SHA1 Message Date
Clément Bœsch
5c219e289e 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.
2015-05-14 12:11:34 +02:00
Clément Bœsch
56bc0a6736 avcodec/ass: make default playback resolution available to decoders 2015-05-14 12:11:34 +02:00
Rong Yan
a2cd07d22a 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>
2015-05-14 11:08:07 +02:00
Shivraj Patil
8252f63d1b 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>
2015-05-14 02:24:01 +02:00
Michael Niedermayer
50d878d930 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>
2015-05-14 01:16:49 +02:00
Michael Niedermayer
22f15f5735 avcodec/on2avc: Check run more carefully
Fixes CID1239106

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-14 01:01:35 +02:00
Michael Niedermayer
93cfa7d169 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>
2015-05-14 00:12:34 +02:00
Michael Niedermayer
cc48409b51 Merge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'
* commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623':
  vda: Make output CVPixelBuffer format configurable

Conflicts:
	doc/APIchanges
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 22:42:49 +02:00
Michael Niedermayer
3bf81d3896 Merge commit '85ca012ba680bdf942d95ab98c74f6a28f447588'
* commit '85ca012ba680bdf942d95ab98c74f6a28f447588':
  mjpegenc: Fix JFIF header byte ordering

Conflicts:
	libavcodec/mjpegenc_common.c

See: b19313218c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 22:19:05 +02:00
Michael Niedermayer
53d2b69b72 Merge commit 'd84429d41e24437536907af1e6b73197ecf3f6db'
* commit 'd84429d41e24437536907af1e6b73197ecf3f6db':
  dnxhd: Print unknown header when found

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 22:11:04 +02:00
Michael Niedermayer
4b28907e4a avcodec/qdrw: cleanup skip code
Skip 512 byte sectors until a non zero resolution is found

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 21:49:21 +02:00
Michael Niedermayer
b6e8166a48 Merge commit '0348e74c01a099a3787ae21df1c2a742fc846163'
* commit '0348e74c01a099a3787ae21df1c2a742fc846163':
  quickdraw: Skip the empty 512 byte header for images

See: b453e76842
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 21:13:52 +02:00
Michael Niedermayer
5d9873ecda Merge commit 'd0dce15da34c0e4eee6c683be299de0221db00d3'
* commit 'd0dce15da34c0e4eee6c683be299de0221db00d3':
  quickdraw: Make the palette opaque

Conflicts:
	libavcodec/qdrw.c

See: 9f9a1f424e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 20:38:49 +02:00
Michael Niedermayer
81cf910856 avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 18:36:50 +02:00
Michael Niedermayer
cf9ab119d0 avcodec/mjpegdec: Check len in ff_mjpeg_decode_dht()
Fixes CID1239167

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 17:44:35 +02:00
Stefano Pigozzi
e7c5e17d4f vda: Make output CVPixelBuffer format configurable
This is useful for client programs to ask for nv12 surfaces instead of the
current default (uyvy), since those are more efficient to decode to.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:39:37 +02:00
Michael Niedermayer
dc35a58149 avcodec/mjpegdec: Check len in ff_mjpeg_decode_dqt()
Fixes CID1239060

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 17:39:11 +02:00
Gopu Govindaswamy
3b5e5e6a29 libx265: Use the Multi-library Interface
Use the Multi-library interface to load at runtime x265 libraries
supporting alternative bit depths (e.g. 8bit and 16bit).

The linked library will try to load the library supporting the
pixel format if it is not supported by itself.

Fallback requesting the native library (passing 0 to x265_api_get) if
a library supporting the requested bit depth is not available.

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-13 17:14:50 +02:00
Michael Niedermayer
6d3f17838d avcodec/jpeglsdec: assert that overflows end at exactly x=w
If that ever was untrue, there would be a bug in the code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 15:48:17 +02:00
Michael Niedermayer
f8f155a18a avcodec/jpeg2000dec: fix boolean operator
Fixes CID1271791 #7-6

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 15:15:55 +02:00
Michael Niedermayer
04da0d2586 avcodec/hevc_ps: Move log2_ctb_size checks up to prevent undefined shift operations
Fixes CID1292293

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:38:11 +02:00
Michael Niedermayer
65e5032955 avcodec/hevc_ps: Explicitly check num_tile_* for negative values
This fixes nothing but maybe helps coverity which does not see that this is failing later

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Michael Niedermayer
b195aa5d52 avcodec/hevc_ps: Check vps_num_hrd_parameters
Fix CID1239052 part2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Michael Niedermayer
16c95b1073 avcodec/hevc_ps: More completely check vps_num_layer_sets
Fixes CID1239052  part1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Michael Niedermayer
6679d5f29a avcodec/hevc: Simplify entry_point_offset parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Michael Niedermayer
1c6ae98d4a avcodec/hevc: Check num_entry_point_offsets
Fixes CID1239099 part 2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Michael Niedermayer
3e9d5e16ad avcodec/hevc: Check offset_len
Fixes CID1239099 part 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 14:26:17 +02:00
Andreas Cadhalpun
a7c0c79333 aacdec: remove a duplicated line
got_frame_ptr is set again after the if block.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 01:59:51 +02:00
Michael Niedermayer
93b0ee21a2 avcodec/hevc_sei: Check num_sps_ids_minus1 value
Fixes CID1271794

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 01:42:52 +02:00
Michael Niedermayer
8a62b80ce6 avcodec/vqavideo: Check chunk size
Fixes CID1239154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 00:41:38 +02:00
Andreas Cadhalpun
ec38a1ba40 aacdec: don't return frames without data
Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.

In this case a bogus frame without any data, but non-zero nb_samples is
returned.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-12 21:19:35 +02:00
Shiina Hideaki
85ca012ba6 mjpegenc: Fix JFIF header byte ordering
The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-12 16:30:48 +01:00
Vittorio Giovara
d84429d41e dnxhd: Print unknown header when found 2015-05-12 16:30:48 +01:00
Vittorio Giovara
0348e74c01 quickdraw: Skip the empty 512 byte header for images
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2015-05-12 15:28:31 +01:00
Carl Eugen Hoyos
d0dce15da3 quickdraw: Make the palette opaque
Additional overflow fix by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-12 15:28:31 +01:00
Michael Niedermayer
85bbe1dbd1 Merge commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9'
* commit '0670acc4f1c4ceb16968818a654e07a3f550a8c9':
  dca_parser: Extend DTS core sync word and fix existing check

Conflicts:
	libavcodec/dca_parser.c

See: e80b2b9c81
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-12 12:07:19 +02:00
foo86
0670acc4f1 dca_parser: Extend DTS core sync word and fix existing check
The previous version checked for 14-bit streams and did not properly
work across buffer boundaries.

Use the 64-bit parser state to make extended sync word detection work
across buffer boundary and check the extended sync word for 16-bit LE
and BE core streams to reduce probability of alias sync detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-12 03:20:25 +02:00
Michael Niedermayer
3ecc063322 avcodec/hevc: Fix order of operations in hls_decode_neighbour()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-12 00:52:03 +02:00
Gopu Govindaswamy
94c20de429 avcodec/libx265: use x265 Multi-library Interface to query the API
ffmpeg can now use the x265 multi-library interface to make a runtime
selection between a number of libx265 libraries (perhaps 8bpp and 16bpp).

ffmpeg will link to one build of libx265 (statically or
dynamically) and this linked version of libx265 will support one
bit-depth (8 or 10 bits). At runtime, ffmpeg now has the option to request the
encoder to use a different bit depth(8 or 10). If the requested bitdepth
is zero, or if it matches the bitdepth of the system default libx265 (the
currently linked library), then this library will be used for encode.
If ffmpeg requests a different bit-depth, the linked libx265 will attempt
to dynamically bind a shared library with the requested bit-depth from the install
location (default or user-specified).

new x265 API:
     const x265_api* api = x265_api_get(int bitDepth);
     x265_api - holds the libx265 public API functions
     bitDepth - requested API for 8bpp or 16bpp

     note: Use 0 to indicate native bit depth of the linked libx265 and
           x265_api_get(0) is guaranteed to return a non-null pointer

Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-05-11 16:15:23 +01:00
Michael Niedermayer
f230451b7a Merge commit 'b9f7a677083647d85e583d6d7384938766a293d7'
* commit 'b9f7a677083647d85e583d6d7384938766a293d7':
  png: Set the color range as full range

Conflicts:
	libavcodec/pngdec.c

See: 72e7553125
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 22:42:56 +02:00
Michael Niedermayer
ce1c0e99e9 Merge commit '243e8443cd9e83c887e3f5edf09a169e7783d14e'
* commit '243e8443cd9e83c887e3f5edf09a169e7783d14e':
  alac: Reject rice_limit 0 if compression is used

Conflicts:
	libavcodec/alac.c

See: 4b657a1b1e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 22:00:40 +02:00
Michael Niedermayer
d0b294286c avcodec/ppc/h264qpel_template: Fix alignment assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 18:09:39 +02:00
Michael Niedermayer
729108515d avcodec/snowenc: set dia_size for the first pass of motion estimation too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 14:19:56 +02:00
Michael Niedermayer
58201c6e9e avcodec/snowenc: correct fullpel search pattern
No real difference in quality, its a bit slower for the same dia_size as more
vectors are searched for the same dia_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 02:38:05 +02:00
Michael Niedermayer
db6d0a5bd2 avcodec/snowenc: Fix used reference MV in fullpel iterative ME
This very very slightly improves quality, no measurable speed change

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 01:05:42 +02:00
Michael Niedermayer
f349703e1d avcodec/snowenc: change log level for iterative ME information to debug level
The printed stuff should be useless to the average user and its certainly
not an error.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 00:46:02 +02:00
Michael Niedermayer
b62297805b avcodec/snowenc: add intra_penalty AVOption
This allows favoring intra or inter blocks by a user specified amount.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 23:52:36 +02:00
Michael Niedermayer
cf31e2df08 avcodec/mpegvideo: Fix null pointer dereference with grayscale decoding with mpeg2_field_encoding.ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 17:10:26 +02:00
Michael Niedermayer
33529104e5 avcodec/mpeg12dec: Fix "-flags +gray"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 15:58:02 +02:00
wm4
b9f7a67708 png: Set the color range as full range
The format uses full range for the gray formats.

CC: libav-stable@libav.org
2015-05-09 15:55:50 +02:00