Commit Graph

130 Commits

Author SHA1 Message Date
Mickaël Raulet
fa0506e413 hevc/rext: update boundary strength for chroma deblocking filter
cherry picked from commit 7d05c95ac5a63d7675bf645e74b4cf1fffff4796

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-22 13:00:14 +02:00
Mickaël Raulet
950a4f8326 hevc: fix offset for sao temporary frame
fixes fate on alpha

cherry picked from commit 0a8ce1cbdaff7cd026bcf95ee3787bc7b4c063ee

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-20 02:48:53 +02:00
Christophe Gisquet
7a4a5515b0 hevc: use intreadwrite
When dealing with MVs, both components may be processed at a time.

On Win64, 560 to 539 cycles for derive_spatial_merge_candidates.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-19 15:27:08 +02:00
Michael Niedermayer
ffa0b510cd avcodec/hevc: fix pict_type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 22:59:03 +02:00
Mickaël Raulet
d249e6828e hevc/sao: optimze sao implementation
- adding one extra pixel all around the frame
- do not copy when SAO is not applied

5% improvement

cherry picked from commit 10fc29fc19a12c4d8168fbe1a954b76386db12d0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 22:46:50 +02:00
Michael Niedermayer
cf92cc8751 avcodec/hevc: clear HEVClcList[i] on allocation
Fixes fate failure with --enable-memory-poisoning && make THREAD_TYPE=slice THREADS=7  fate-hevc-conformance-ENTP_C_Qualcomm_1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-16 01:34:57 +02:00
Michael Niedermayer
880dbe43ca avcodec/hevc: treat current_sps like sps_list
This simplifies the management of current_sps
Fixes Ticket3458

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 21:49:56 +02:00
Mickaël Raulet
453f8eaee2 hevc/rext: add support for Range extension tools
SPS features/flags:
- transform_skip_rotation_enabled_flag
- transform_skip_context_enabled_flag
- implicit_rdpcm_enabled_flag
- explicit_rdpcm_enabled_flag
- intra_smoothing_disabled_flag
- persistent_rice_adaptation_enabled_flag

PPS features/flags:
- log2_max_transform_skip_block_size
- cross_component_prediction_enabled_flag
- chroma_qp_offset_list_enabled_flag
- diff_cu_chroma_qp_offset_depth
- chroma_qp_offset_list_len_minus1
- cb_qp_offset_list
- cr_qp_offset_list
- log2_sao_offset_scale_luma
- log2_sao_offset_scale_chroma
(cherry picked from commit 005294c5b939a23099871c6130c8a7cc331f73ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 14:08:20 +02:00
Mickaël Raulet
5a41999d81 hevc/rext: basic infrastructure for supporting range extension
- support for 4:2:2 and 4:4:4 up to 12 bits
- add a new profile for range extension
(cherry picked from commit d3c067fa65bbc871758d28aa07f54123430ca346)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 13:47:35 +02:00
Mickaël Raulet
255086a7e0 hevc: use local variable for split_cu_flag
(cherry picked from commit ee71e9e9c12fc47856c452efb278f9f593a923ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 13:31:40 +02:00
Mickaël Raulet
f5beda3bfd hevc: move restore_tqb where it should be.
(cherry picked from commit 8fafc96a9805d11bfe32537c8f78a294a5844065)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 13:25:55 +02:00
Mickaël Raulet
1241eb8870 hevc: simplify SAO computation, delay from one row its computation
(cherry picked from commit f2c5f647cec786df26f442a85e6d685a131a50c9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-15 13:11:33 +02:00
Michael Niedermayer
1db641cbd2 avcodec/hevc: more clearing to avoid stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 21:31:37 +02:00
Michael Niedermayer
ccd6911c18 avcodec/hevc_ps: do not loose all reference to pointers still in use
Fixes leaving a pointer to unreferenced memory
Fixes Ticket 3115

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 21:03:09 +02:00
Michael Niedermayer
5d88e40093 avcodec/hevc: check slice_header_extension data length
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 07:46:07 +02:00
Michael Niedermayer
c79acacd2e avcodec/hevc: fix nb_sh / nb_sps check
fixes integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-12 04:39:01 +02:00
Michael Niedermayer
e1f4397e74 Merge commit '458e7c94830d1522997e33a0b5e87bd709e8a349'
* commit '458e7c94830d1522997e33a0b5e87bd709e8a349':
  hevc: implement pic_output_flag handling

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_refs.c

See: 2eddf3a6ef
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 12:21:41 +02:00
Michael Niedermayer
aa56c37c8a Merge commit 'f43789b76e661acd93c21664678f140e53cfa1fa'
* commit 'f43789b76e661acd93c21664678f140e53cfa1fa':
  hevc: set the keyframe flag on output frames

See: e2760de605
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-11 12:16:24 +02:00
Gildas Cocherel
458e7c9483 hevc: implement pic_output_flag handling
Sample-Id: OPFLAG_B_Qualcomm_1.bit, OPFLAG_C_Qualcomm_1.bit
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-11 08:52:54 +00:00
Mickaël Raulet
f43789b76e hevc: set the keyframe flag on output frames
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-11 08:43:01 +00:00
Mickaël Raulet
1493b237bd hevc: Replace nal type chek with equivalent IS_IRAP macro
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-11 08:41:32 +00:00
Christophe Gisquet
eca1957c4c hevc: reorder loops
iterate over memory in a more continuous order

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-10 14:46:49 +02:00
Michael Niedermayer
efc66d69bf Merge commit '0569a7e0bd2006d9a5248d17a1f4bf3ca654ae50'
* commit '0569a7e0bd2006d9a5248d17a1f4bf3ca654ae50':
  hevc: parse display orientation SEI message

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-10 00:19:43 +02:00
Vittorio Giovara
0569a7e0bd hevc: parse display orientation SEI message
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-07-09 10:18:06 -04:00
Michael Niedermayer
982920cfaa Merge commit 'df949b645b12d62bb4da56d629a887c81f67f2e5'
* commit 'df949b645b12d62bb4da56d629a887c81f67f2e5':
  hevc: Use the local context variable when needed

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 13:19:34 +02:00
Luca Barbato
df949b645b hevc: Use the local context variable when needed 2014-07-02 23:30:49 -04:00
Michael Niedermayer
7faa7d3d42 avcodec/hevc: Use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 03:50:17 +02:00
Michael Niedermayer
35bb74900b Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'
* commit 'c67b449bebbe0b35c73b203683e77a0a649bc765':
  dsputil: Split bswap*_buf() off into a separate context

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/ac3dec.c
	libavcodec/ac3dec.h
	libavcodec/apedec.c
	libavcodec/eamad.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/huffyuvdec.c
	libavcodec/motionpixels.c
	libavcodec/truemotion2.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-23 13:31:26 +02:00
Diego Biurrun
c67b449beb dsputil: Split bswap*_buf() off into a separate context 2014-06-22 18:22:31 -07:00
Michael Niedermayer
0dceefc5fa Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'
* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
  Add av_image_check_sar() and use it to validate SAR

Conflicts:
	libavcodec/dpx.c
	libavcodec/dvdec.c
	libavcodec/ffv1dec.c
	libavcodec/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-20 22:20:28 +02:00
Justin Ruggles
9e500efdbe Add av_image_check_sar() and use it to validate SAR 2014-06-20 10:39:33 -04:00
Michael Niedermayer
8447658550 Merge commit 'a1c2b48018b09d2613f075ec0748c95bd520ac00'
* commit 'a1c2b48018b09d2613f075ec0748c95bd520ac00':
  hevc: templatize intra_pred

Conflicts:
	libavcodec/hevc.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 14:10:13 +02:00
Anton Khirnov
a1c2b48018 hevc: templatize intra_pred 2014-05-19 07:10:03 +02:00
Mickaël Raulet
e2760de605 hevc: fix key_frame as an IRAP
it was always 1 before with ISOBMFF(cherry picked from commit fb1402b1ec78d80acd6ced76bf78d65560965c4c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-17 01:14:51 +02:00
Michael Niedermayer
2201d1a0f8 avcodec/hevc: Fix undefined shifts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-09 13:34:12 +02:00
Michael Niedermayer
84655bdaed avcodec/hevc: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-07 02:07:12 +02:00
Mickaël Raulet
83976e40e8 hevc: C code update for new motion compensation
pretty print C

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-06 18:22:34 +02:00
gcocherel
2eddf3a6ef avcodec/hevc: fix no output of prior pics and pic output flags(cherry picked from commit e99b96dff1d76d74cb5633aa9702828d863050e2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 22:43:25 +02:00
Michael Niedermayer
6795dcfa65 avcodec/hevc: Export picture type
This only uses the first slice, improvement here is welcome
analyzing all slices the trivial way would interfere with threads

Fixes Ticket3185

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-26 04:20:52 +01:00
Michael Niedermayer
06219db935 Merge commit 'ed06e5d92b4c67b49068d538461fbbe0a53a8c5e'
* commit 'ed06e5d92b4c67b49068d538461fbbe0a53a8c5e':
  hevc: Do not turn 32bit timebases into negative numbers

Conflicts:
	libavcodec/hevc.c

See: bf2ce19e51
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-09 21:16:33 +01:00
Michael Niedermayer
ed06e5d92b hevc: Do not turn 32bit timebases into negative numbers
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-03-09 17:22:53 +01:00
Michael Niedermayer
6cc94e9719 hevc: use av_mallocz() for allocating tab_ipm
Fixes use of uninitialized memory and out of stack array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-03-09 17:08:11 +01:00
Michael Niedermayer
ca9f7e1832 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hevc: Always consider VLC NALU type mismatch fatal

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-19 22:34:41 +01:00
Luca Barbato
521726ff57 hevc: Always consider VLC NALU type mismatch fatal
Sample-Id: 00001667-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-19 16:59:40 +01:00
Michael Niedermayer
bf2ce19e51 avcodec/hevc: Dont turn 32bit timebases into negative numbers
Fixes assertion failure
Fixes: 499f6ecaeae8e3f79a115a72c61ffd15-asan_static-oob_124a175_2792_cov_1782273879_RPLM_A_qualcomm_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-15 23:17:53 +01:00
Michael Niedermayer
3b6655ebff avcodec/hevc: remove FFUMOD() in slice qp_y init
This has become redundant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Michael Niedermayer
1e263133cc avcodec/hevc: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Michael Niedermayer
64278039e5 avcodec/hevc: Simplify get_qPy_pred()
Fixes use of uninitialized memory
Fixes: 93728afd9aa074ba14a09bfd93a632fd-asan_static-oob_124a17d_1445_cov_1021181966_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:22:49 +01:00
Michael Niedermayer
1a3ed056c5 avcodec/hevc: make check for previous slice segment tighter
This ensures the previous one is matching the curent and not just any

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 00:22:49 +01:00
Michael Niedermayer
6ef57f4d9a avcodec/hevc: hls_decode_entry: check that the previous slice segment is available before decoding the next
Fixes use of uninitialized memory
Fixes out of array read
Fixes assertion failure
Fixes part of cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-07 04:40:37 +01:00