1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

126 Commits

Author SHA1 Message Date
Matthieu Bouron
bf011695fd lavc/hevc: store VPS/SPS/PPS data 2016-09-09 16:35:37 +02:00
Will Kelleher
964f07f68e hevc: Fix memory leak related to a53_caption data
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-15 01:30:53 +02:00
Derek Buitenhuis
3c4ca4c5d7 Merge commit 'fa936a307f5cddfc2664600157a8207ca8080af6'
* commit 'fa936a307f5cddfc2664600157a8207ca8080af6':
  hevc_parse: rename into h2645_parse

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-26 13:56:47 +01:00
Derek Buitenhuis
4791a910c0 lavc/hevc_parse: Don't take a HEVCContext
It's not even used anymore, and the checks are no longer
functionally important.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-25 14:40:33 +01:00
Anton Khirnov
fa936a307f hevc_parse: rename into h2645_parse
This code will be shared with h264.
2016-03-28 09:42:44 +02:00
Neil Birkbeck
3b0974d3ef lavc/hevc Parse SEI_TYPE_MASTERING_DISPLAY_INFO and propagate content into the AVMasteringDisplayMetadata side data.
Add support for parsing SEI_TYPE_MASTERING_DISPLAY_INFO and propagate contents into
the AVMasteringDisplayMetadata side data. Primaries are ordered in RGB order and
the values are converted to rationals ([0,1] for CEI 1931 Chroma coords,
and cd/m^2 for luma).

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-14 00:36:05 +01:00
Philip Langdale
8958c5c64d hevc: Track long and short term RPS size for VDPAU
Today, we track the short term RPS size for DXVA, but only if the
SliceHeader RPS is being used. Otherwise it's left uninitialized.

NVIDIA's VDPAU implementation requires that the size be accurately
tracked even if an SPS RPS is being used. In this case, it's really
counting the size of the RPS idx information, but you end up with
mangled output if the value is not accurate.

VDPAU also needs the size of the long term RPS.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-13 14:24:37 +01:00
Hendrik Leppkes
8c399bd5ce dxva2_hevc: properly signal the num_delta_pocs from the SPS RPS
ucNumDeltaPocsOfRefRpsIdx needs to contain the flat value from the SPS RPS,
and not the final computed value from the slice header RPS, as this calculation
is done internally by the driver again.

Sample-Id: http://trailers.divx.com/hevc/Sintel_4k_27qp_24fps_1aud_9subs.mkvi
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2016-02-13 14:19:54 +01:00
Michael Niedermayer
2140858524 avcodec/hevc: Fix integer overflow of entry_point_offset
Fixes out of array read
Fixes: d41d8cd98f00b204e9800998ecf8427e/signal_sigsegv_321165b_7641_077dfcd8cbc80b1c0b470c8554cd6ffb.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-05 22:34:30 +01:00
Anton Khirnov
e7078e842d hevcdsp: add x86 SIMD for MC 2015-12-05 21:11:52 +01:00
Will Kelleher
7f7fa90f7b hevc: extract SEI caption data
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 12:10:55 +01:00
Hendrik Leppkes
0118158efa hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-20 00:17:32 +02:00
Hendrik Leppkes
5d324dae11 dxva2_hevc: properly signal the num_delta_pocs from the SPS RPS
ucNumDeltaPocsOfRefRpsIdx needs to contain the flat value from the SPS RPS,
and not the final computed value from the slice header RPS, as this calculation
is done internally by the driver again.

Sample-Id: http://trailers.divx.com/hevc/Sintel_4k_27qp_24fps_1aud_9subs.mkvi
2015-08-03 15:48:21 +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
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
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
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
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
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
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
1d4194e696 Merge commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7'
* commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7':
  hevc_ps: split the code for parsing the SPS and exporting it into the context

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 04:50:00 +02:00
Anton Khirnov
66acb76bb0 lavc: add Intel libmfx-based HEVC encoder 2015-07-08 23:40:11 +02:00
Anton Khirnov
69ab9f53f9 hevc: split bitstream unescaping to a separate file
It will be useful in the QSV HEVC encoder.
2015-07-08 23:38:32 +02:00
Anton Khirnov
fd124d8357 hevc_ps: split the code for parsing the SPS and exporting it into the context
This will be useful in the later commits, where we want to parse an SPS
without having a whole decoding context.
2015-07-08 23:36:22 +02:00
Philip Langdale
1b19d0c632 avcodec/hevc: Track long and short term RPS size for VDPAU
Today, we track the short term RPS size for DXVA, but only if the
SliceHeader RPS is being used. Otherwise it's left uninitialized.

NVIDIA's VDPAU implementation requires that the size be accurately
tracked even if an SPS RPS is being used. In this case, it's really
counting the size of the RPS idx information, but you end up with
mangled output if the value is not accurate.

VDPAU also needs the size of the long term RPS.

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-06-13 21:09:24 -07:00
Michael Niedermayer
0e7444f6e4 avcodec/hevc: Remove current_sps
The variable should not be needed anymore

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 00:04:58 +02:00
Michael Niedermayer
0e69c16e96 Merge commit 'c929659bdd7d2d5848ea52e685a3164c7b901bb0'
* commit 'c929659bdd7d2d5848ea52e685a3164c7b901bb0':
  hevc: make the crop sizes unsigned

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 11:11:17 +01:00
Anton Khirnov
c929659bdd hevc: make the crop sizes unsigned 2015-03-21 09:35:14 +01:00
Mickaël Raulet
6ecc3fd612 x86/hevc_mc: use aligned loads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-06 21:38:00 +01:00
Christophe Gisquet
52f2adc015 avcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment requirements in FFmpeg
Use edge emu buffers
And enable the code unconditionally

Speed difference without USE_SAO_SMALL_BUFFER and with the new code:
Decicycles: 26772->26220 (BO32),  83803->80942 (BO64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 01:54:22 +01:00
Fabrice Bellard
da81cc38e8 avcodec/hevc: reduce memory for SAO
cherry picked from commit 5d9f79edef2c11b915bdac3a025b59a32082f409

SAO edge filter uses pre-SAO pixel data on the left and top of the ctb, so
this data must be kept available. This was done previously by having 2
copies of the frame, one before and one after SAO.

This commit reduces the storage to just that, instead of the previous whole
frame.

Commit message taken from patch by Christophe Gisquet <christophe.gisquet@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-04 01:54:01 +01:00
Hendrik Leppkes
b2e9b0f5d4 hevc: add hwaccel hooks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 12:37:34 +01:00
Hendrik Leppkes
06894f1a04 hevc: store the short term rps flag and size in the context
For future use by hardware accelerators.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 12:37:34 +01:00
Hendrik Leppkes
2af82a1ad9 hevc: store the escaped/raw bitstream in HEVCNAL
Hardware Accelerators require access to the escaped bitstream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 12:37:34 +01:00
Hendrik Leppkes
e72e8c5a1d hevc: add hwaccel hooks
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:05:08 +01:00
Hendrik Leppkes
4b95e95dba hevc: store the short term rps flag and size in the context
For future use by hardware accelerators.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:04:59 +01:00
Hendrik Leppkes
36779a8405 hevc: store the escaped/raw bitstream in HEVCNAL
Hardware Accelerators require access to the escaped bitstream.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-01-27 09:04:44 +01:00
Michael Niedermayer
f1b20930f2 Merge commit '2c6a7f9348378f887066fb1669c46b9485e8ef3e'
* commit '2c6a7f9348378f887066fb1669c46b9485e8ef3e':
  hevc: do not store rqt_root_cbf in the context

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 11:20:32 +01:00
Michael Niedermayer
7cbe1e0447 Merge commit '920bca3e2332dced9c78bd14cfc2ff138188bd57'
* commit '920bca3e2332dced9c78bd14cfc2ff138188bd57':
  hevc: do not store pcm_flag in the context

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-17 11:06:13 +01:00
Anton Khirnov
2c6a7f9348 hevc: do not store rqt_root_cbf in the context
It does not need to be accessed outside of hls_coding_unit().
2014-11-17 09:25:12 +01:00
Anton Khirnov
920bca3e23 hevc: do not store pcm_flag in the context
It does not need to be accessed outside of hls_coding_unit().
2014-11-17 09:25:12 +01:00
Christophe Gisquet
9a3653c9ec hevc: reuse edge emu buffer for coefficients
Kind of hackish but...

Reviewed-by: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-01 12:12:28 +02:00
Christophe Gisquet
f183febcda hevc: remove CodingTree
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 11:50:41 +02:00
Christophe Gisquet
3fe962940f hevc: move intermediate bidir buffer
Other buffers are already there.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-24 01:26:12 +02:00
Christophe Gisquet
de60ce391d hevc: remove unneeded buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-24 01:26:12 +02:00