Commit Graph

35480 Commits

Author SHA1 Message Date
Derek Buitenhuis
a82d1a8c7a Merge commit '31fe1f2577f8208f79a4b3ab59465e78dd497555'
* commit '31fe1f2577f8208f79a4b3ab59465e78dd497555':
  lavc: VAAPI H.265 encoder

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-08 22:45:39 +01:00
Derek Buitenhuis
b975aeec02 Merge commit '2c62fcdf5d617791a653d7957d449f75569eede0'
* commit '2c62fcdf5d617791a653d7957d449f75569eede0':
  lavc: VAAPI H.264 encoder

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-08 22:43:52 +01:00
Derek Buitenhuis
508957fd0f Merge commit '104c804bcaac24b52eb51ed17df2fb311e6ae73e'
* commit '104c804bcaac24b52eb51ed17df2fb311e6ae73e':
  lavc: VAAPI encode common infrastructure

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-08 22:41:12 +01:00
Michael Niedermayer
5df703aa1b avcodec/simple_idct_template: Fix strict aliasing violation
Fixes intrax8 test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-08 20:40:27 +02:00
Rostislav Pehlivanov
b6c207f535 vc2enc_dwt: use 32 bit coefficients by default
The problem is that with particularly complex images and especially at
high bit depths and 5-level transforms the coefficients would overflow,
causing huge artifacts to appear. This was discovered thanks to the fate
tests, which will have to be redone as this fixes a multitude of
problems and increases PSNR.

There is a slight performance drop associated with this change, making
the encoder slower by 1.15 times, however this is necessary in order to
avoid undefined behavior and overflows.

It would be worth to template the transforms to keep the performance for
8 bit images as 32 bit coefficients are unnecessary for that case, but
the primary use of the encoder is to encode video at 10 bits.

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-05-08 19:09:42 +01:00
Hendrik Leppkes
64fd62d68a avcodec/dxva2_h264: fix slice offset in long slice struct after ca2f19b9
The GetBitContext now includes the NAL header, which offsets the slice by
one byte, which needs to be accounted for here.
2016-05-08 17:48:19 +02:00
Mark Thompson
617cd45ddc vaapi_h264: Fix bit offset of slice data.
Commit ca2f19b9cc modified the meaning of
H264SliceContext.gb: it is now initialised at the start of the NAL unit
header, rather than at the start of the slice header.  The VAAPI slice
decoder uses the offset after parsing to determine the offset of the
slice data in the bitstream, so with the changed meaning we no longer
need to add the extra byte to account for the NAL unit header because
it is now included directly.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-08 16:46:04 +01:00
Christophe Gisquet
9630b3fc06 x86: lossless audio: SSE4 madd 32bits
The unique user so far is wmalossless 24bits. The few samples tested show an
order of 8, so more unrolling or an avx2 version do not make sense.

Timings: 68 -> 49 cycles

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-07 23:28:48 +02:00
Derek Buitenhuis
e811ebcd9c Merge commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7'
* commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7':
  intrax8: Remove mpegvideo dependency

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:41:27 +01:00
Derek Buitenhuis
f2c7812839 Merge commit '6ebd06a9b2508747a135ee4c880d8f612e08932b'
* commit '6ebd06a9b2508747a135ee4c880d8f612e08932b':
  intrax8: Drop lots of pointless parentheses

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:21 +01:00
Derek Buitenhuis
741960e2f3 Merge commit '9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c'
* commit '9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c':
  intrax8: Drop MB emulation code

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:05 +01:00
Derek Buitenhuis
f110c624b1 Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000'
* commit '9fa888c02801fff2e8817c24068f5296bbe60000':
  intrax8: Keep a reference to the decoder blocks

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:39:44 +01:00
Derek Buitenhuis
c59c792470 Merge commit 'c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f'
* commit 'c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f':
  intrax8: Use the generic horizband function

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:37:32 +01:00
Derek Buitenhuis
123fef54cc Merge commit 'b1268e0f032a3af3912fe3fb8d3855e12d7ea83b'
* commit 'b1268e0f032a3af3912fe3fb8d3855e12d7ea83b':
  intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:36:54 +01:00
Derek Buitenhuis
578fb5a27d Merge commit 'd0540fd02171a6233d2016b199d013299debf7e3'
* commit 'd0540fd02171a6233d2016b199d013299debf7e3':
  intrax8: Pass macroblock size to ff_intrax8_common_init

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:35:20 +01:00
Hendrik Leppkes
d46e856350 h265_parse: skip zero sized NAL units
Avoids extra error checks later on and/or invalid reads.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:14:23 +01:00
Hendrik Leppkes
d6f92103e0 h264: do not return an error when NAL parsing of extradata failed
Fixes AnnexB samples with broken extradata, but proper in-band parameter sets

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:14:17 +01:00
Hendrik Leppkes
772ad7142d Merge commit 'ca2f19b9cc37be509d85f05c8f902860475905f8'
* commit 'ca2f19b9cc37be509d85f05c8f902860475905f8':
  h264: switch to h2645_parse for NAL parsing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-05-07 21:13:44 +01:00
Hendrik Leppkes
9cc1ab63ac h2645_parse: allow partial escaping
This ports the fix from 033a533 to the new parser module in prepartion
of using it for the h264 decoder.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:11:21 +01:00
Hendrik Leppkes
c802389393 h2645_parse: initialize the GetBitContext to the proper size
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:11:10 +01:00
Hendrik Leppkes
6eb1b40ad8 hevc: fix size condition in ptl parsing
When only one sublayer is present, no information is coded. Only when at least two
are present, all 8 sublayers are written.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:10:59 +01:00
Michael Niedermayer
fc6894770e avcodec/m101: simplify 8bit code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-07 04:42:52 +02:00
Michael Niedermayer
22d1148c77 avcodec/m101: remove unneeded zeroing of priv_data_size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-07 04:42:52 +02:00
Michael Niedermayer
cbe265ccd7 avcodec/m101: Simplify if() condition
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-07 04:42:52 +02:00
Michael Niedermayer
58b3e5606b avcodec/avcodec: Move AV_CODEC_ID_M101 to the 2nd group of video codecs
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-06 15:57:14 +02:00
Michael Niedermayer
4155d5e06f avcodec: add M101 decoder
Fixes Ticket 2611

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-06 15:36:24 +02:00
Timo Rothenpieler
31ce01bdb9 avcodec/nvenc: don't set profile in lossless mode 2016-05-06 10:15:29 +02:00
James Almer
bd63ecec78 avcodec/dcadsp: use LOCAL_ALIGNED_32 instead of LOCAL_ALIGNED(32, ...) 2016-05-06 00:47:55 -03:00
Andrey Utkin
abb69a2f2b avcodec: Add "sar" alias to "aspect" option of video encoders
It is impossible to pass "aspect" parameter to encoder from ffmpeg CLI
because option from lavc/options_table.h is eclipsed by option with same
name in ffmpeg_opt.c, which has different meaning (DAR, not SAR).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-06 03:47:36 +02:00
Christophe Gisquet
9c1aa14bf0 vc2enc: prevent random data
The slice prefix is 0 in the reference encoder and the decoder ignores it.
Writing 0 there seems like the best temporary solution.

The padding could have contained uninitialized data, but reference VC2
encoders put 0xFF there, hence the memset value.

Overall this allows producing bistreams with no random data for use by fate.
2016-05-06 01:12:51 +01:00
Paul B Mahol
c5d2d3dced avcodec/alac: fix 20-bit support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-05 18:15:22 +02:00
Rostislav Pehlivanov
770d3c85af vc2enc: do not print the lavc version if the bitexact flag is enabled
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-05-05 00:20:11 +01:00
James Almer
fc1c836def avcodec/hevc_parser: fix packet_split function name
Fixes compilation of hevc_parser without hevc_decoder

Signed-off-by: James Almer <jamrial@gmail.com>
2016-05-04 18:26:06 -03:00
Rick Kern
dc750194b6 lavc/videotoolboxenc: Set colorimetry values
Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
c356b6865d lavc/videotoolboxenc: Support pixel aspect ratio
Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
9d8a38d20b lavc/videotoolboxenc: Support for forced I-frames
Setting AVFrame.pic_type to AV_PICTURE_TYPE_I will force an I-frame.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
4b806081b2 lavc/videotoolboxenc: add concatentation properties
Add frames_before and frames_after as hints that there will be frames before
or after the frames produced in this session. This may help with
concatenation issues like bit rate spikes.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
ca429e7253 lavc/videotoolboxenc: Add realtime encoding property
Hint to the encoder that encoding should be done in real-time, even at the
expense of quality.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
272dd437bc lavc/videotoolboxenc: Handle out-of-memory and fix memory leak
Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
2fbf39382d lavc/videotoolboxenc: Fix DTS
Some devices output an invalid DTS when B-frames aren't used. Using PTS for
the DTS in this case.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
abe05892be lavc/videotoolboxenc: Fix AVCodecContext.has_b_frames usage.
Now set by the encoder, not used as an input parameter.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
645df43144 lavc/videotoolboxenc: Add entropy setting
Add an entropy setting to choose between CAVLC and CABAC.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
fbe0cf8ca7 lavc/videotoolboxenc: Require hardware encoding
Software encoding can be allowed by setting allow_sw to 1.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
0d4bf3074d lavc/videotoolboxenc: Handle hwaccel format as input
Handle AV_PIX_FMT_VIDEOTOOLBOX.
This results in better energy usage and faster encoding, especially on iOS.
When the buffer comes from the media server, no memcpy's are needed.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Rick Kern
d7cf3610c2 lavc/videotoolboxenc: Use shared pixel buffer pool
This reduces the chance of a memcpy in the media server.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2016-05-04 18:40:40 +02:00
Paul B Mahol
66eb5b809a avcodec/adpcm: fix decoding of stereo non 4-bit ADPCM IMA WAV
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-04 11:33:34 +02:00
Paul B Mahol
3395ad48fa avcodec/adpcm: replace char/short/long with int8_t/int16_t/int
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-04 00:36:02 +02:00
foo86
b7d267399b avcodec/dca: convert to AVCRC
Signed-off-by: James Almer <jamrial@gmail.com>
2016-05-03 16:40:43 -03:00
Michael Niedermayer
1ef267b83f avcodec/h264: Put the removed SPS handling code back
reverts one hunk from 7966ddfc0b
The new code from 7966ddfc0b only covers extradata based SPS

Fixes: ffplay -ss 13 58af5798-fa2c-42a2-997d-dc8e49de2d8a.flv

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-03 15:56:57 +02:00
Derek Buitenhuis
7966ddfc0b Merge commit 'a7829a2a3f8e6ec0b9f2673c11f56916800aeb33'
* commit 'a7829a2a3f8e6ec0b9f2673c11f56916800aeb33':
  h264: reimplement 3aa661ec5 in a more explicit way

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-03 13:42:38 +01:00