summaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_filter.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/hevc_filter: Fix invalid shiftMichael Niedermayer2017-06-211-1/+1
| | | | | | | | | Fixes: runtime error: left shift of negative value -1 Fixes: 2299/clusterfuzz-testcase-minimized-4843509351710720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '4abe3b049d987420eb891f74a35af2cebbf52144'Clément Bœsch2017-03-231-1/+1
|\ | | | | | | | | | | | | * commit '4abe3b049d987420eb891f74a35af2cebbf52144': hevc: rename hevc.[ch] to hevcdec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * hevc: rename hevc.[ch] to hevcdec.[ch]Anton Khirnov2016-10-161-1/+1
| | | | | | | | | | This is more consistent with the rest of libav and frees up the hevc.h name for decoder-independent shared declarations.
* | Merge commit 'ba479f3daafc7e4359ec1212164569ebe59f0bb7'James Almer2017-03-211-5/+5
|\ \ | |/ | | | | | | | | | | * commit 'ba479f3daafc7e4359ec1212164569ebe59f0bb7': hevc: Change type of array stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
| * hevc: Change type of array stride parameters to ptrdiff_tDiego Biurrun2016-09-291-2/+2
| | | | | | | | ptrdiff_t is the correct type for array strides and similar.
* | Merge commit '4f81f8dba735c212efae077c4fec8ad4fe53b352'Clément Bœsch2016-06-291-1/+0
|\ \ | |/ | | | | | | | | | | * commit '4f81f8dba735c212efae077c4fec8ad4fe53b352': Drop unnecessary golomb.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Drop unnecessary golomb.h #includesDiego Biurrun2016-06-081-1/+0
| |
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/hevc: rudimentary support for skip_loop_filter.Nicolas George2015-07-231-1/+2
| | | | | | | | | | | | | | | | | | +~9% speed on Core i5 on test sample. All frames are treated as ref frames, skipping only applies at level "all". The following mail contains information on how to improve that: http://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176116.html
* | Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'Michael Niedermayer2015-07-121-93/+93
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * hevc: remove HEVCContext usage from hevc_psAnton Khirnov2015-07-121-70/+70
| | | | | | | | | | | | Factor out the parameter sets into a separate struct and use it instead. This will allow us to reuse this code in the parser.
| * hevc: Use generic av_clip function, not C implementationPeter Meerwald2015-02-131-2/+2
| | | | | | | | | | | | | | | | | | hevc seems to be the only place where the C implementation of the av_clip function is explicitly selected, precluding platform-specific optimizations Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | hevc/sao: use unaligned copyChristophe Gisquet2015-03-021-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc/sao: do in-place band filtering when possibleChristophe Gisquet2015-02-071-2/+9
| | | | | | | | | | | | | | The copies are only needed when data must be restored, so skip them when it must not be. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | x86/hevcdsp: add ff_hevc_sao_edge_filter_8_{ssse3,avx2}James Almer2015-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original x86 intrinsics code and initial yasm port by Pierre-Edouard Lepere. Refactoring and optimizations by James Almer. Benchmarks of BQTerrace_1920x1080_60_qp22.bin with an Intel Core i5-4200U Width 32 158583 decicycles in edge, sao_edge_filter_8 runs, 0 skips 5205 decicycles in ff_hevc_sao_edge_filter_32_8_ssse3, 32767 runs, 1 skips 2942 decicycles in ff_hevc_sao_edge_filter_32_8_avx2, 32767 runs, 1 skips Width 64 705639 decicycles in sao_edge_filter_8, 262144 runs, 0 skips 19224 decicycles in ff_hevc_sao_edge_filter_64_8_ssse3, 262111 runs, 33 skips 10433 decicycles in ff_hevc_sao_edge_filter_64_8_avx2, 262115 runs, 29 skips Signed-off-by: James Almer <jamrial@gmail.com>
* | hevcdsp: remove compilation-time-fixed parameter from sao_edge_filterJames Almer2015-02-051-3/+2
| | | | | | | | | | | | The stride_src parameter is always 2 * MAX_PB_SIZE + FF_INPUT_BUFFER_PADDING_SIZE. Signed-off-by: James Almer <jamrial@gmail.com>
* | hevcdsp: replace the SAOParams struct parameter from sao_edge_filterJames Almer2015-02-041-1/+3
| | | | | | | | | | | | | | | | As with sao_band_filter, pass instead the two variables from the struct needed in the function. This simplifies writing asm optimized versions. Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr> Signed-off-by: James Almer <jamrial@gmail.com>
* | hevcdsp: simplified sao_edge_filterSeppo Tomperi2015-02-041-1/+1
| | | | | | | | | | Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
* | hevcdsp: separated sao edge filter and pixel restore funcsSeppo Tomperi2015-02-041-1/+2
| | | | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
* | avcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment ↵Christophe Gisquet2015-02-041-47/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avcodec/hevc: reduce memory for SAOFabrice Bellard2015-02-041-11/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | avcodec/hevc_filter: Fix indentionMichael Niedermayer2015-02-021-2/+2
| | | | | | | | | | Found-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/hevc: adding support for monochrome sequences in hevcMickaël Raulet2015-02-021-58/+60
| | | | | | | | | | | | cherry picked from commit 8e50557707d2ec11ccad657470b2e140f314348e Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc/sao: use aligned copiesChristophe Gisquet2015-02-011-8/+18
| | | | | | | | | | | | | | | | | | | | | | For band filter, source and destination are aligned (except for 16x16 ctbs), and otherwise, they are most often aligned. Overall, the total width is also too small for amortizing memcpy. Timings (using an intrinsic version of edge filters): B/32 B/64 E/32 E/64 Before: 32045 93952 38925 126896 After: 26772 83803 33942 117182
* | x86/hevc: add ff_hevc_sao_band_filter_{8,10,12}_{sse2,avx,avx2}James Almer2015-02-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original x86 intrinsics code and initial 8bit yasm port by Pierre-Edouard Lepere. 10/12bit yasm ports, refactoring and optimizations by James Almer Benchmarks of BQTerrace_1920x1080_60_qp22.bin with an Intel Core i5-4200U width 32 40338 decicycles in sao_band_filter_0_8, 2048 runs, 0 skips 8056 decicycles in ff_hevc_sao_band_filter_8_32_sse2, 2048 runs, 0 skips 7458 decicycles in ff_hevc_sao_band_filter_8_32_avx, 2048 runs, 0 skips 4504 decicycles in ff_hevc_sao_band_filter_8_32_avx2, 2048 runs, 0 skips width 64 136046 decicycles in sao_band_filter_0_8, 16384 runs, 0 skips 28576 decicycles in ff_hevc_sao_band_filter_8_32_sse2, 16384 runs, 0 skips 26707 decicycles in ff_hevc_sao_band_filter_8_32_avx, 16384 runs, 0 skips 14387 decicycles in ff_hevc_sao_band_filter_8_32_avx2, 16384 runs, 0 skips Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | hevcdsp: replace the SAOParams struct parameter from sao_band_filterJames Almer2015-02-011-1/+2
| | | | | | | | | | | | | | Pass instead the two variables from the struct needed in the function. This simplifies writing asm optimized versions of the function Signed-off-by: James Almer <jamrial@gmail.com>
* | hevcdsp: remove unused parameter from sao_band_filterJames Almer2015-02-011-5/+2
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '7acdd3a1275bcd9cad48f9632169f6bbaeb39d84'Michael Niedermayer2014-08-091-19/+21
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '7acdd3a1275bcd9cad48f9632169f6bbaeb39d84': hevc_filter: avoid excessive calls to ff_hevc_get_ref_list() Conflicts: libavcodec/hevc_filter.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc_filter: avoid excessive calls to ff_hevc_get_ref_list()Anton Khirnov2014-08-091-16/+20
| | | | | | | | | | | | | | | | 1) each of the loops run within a single CTB, so the relevant reference list is constant 2) when that CTB is, or lies on the same slice as, the current one, we can use a simple access instead of a relatively expensive call to ff_hevc_get_ref_list()
* | Merge commit 'a7a17e3f1915ce69b787dc58c5d8dba0910fc0a4'Michael Niedermayer2014-08-091-17/+23
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a7a17e3f1915ce69b787dc58c5d8dba0910fc0a4': hevc_filter: move some conditions out of loops Conflicts: libavcodec/hevc_filter.c This is possibly less readable than the variant used before. Thus please take a look and if people agree its worse, dont hesitate to revert. See: 83976e40e89655162e5394cf8915d9b6d89702d9 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevc_filter: move some conditions out of loopsAnton Khirnov2014-08-091-18/+23
| |
| * hevc: deobfuscate slice/tile boundary handling for DBFAnton Khirnov2014-08-091-7/+6
| | | | | | | | | | Use named constants instead of magic numbers, avoid using variables with inverse meaning from what their name implies.
| * hevc_filter: drop more redundant checksAnton Khirnov2014-08-091-4/+0
| | | | | | | | The if() around those loops ensures this condition is always false.
| * hevc_filter: drop redundant checksAnton Khirnov2014-08-091-6/+2
| | | | | | | | | | ff_hevc_deblocking_boundary_strengths() is never called if the deblocking filter is disabled for the slice.
* | hevc_deblock: change tc typeChristophe Gisquet2014-08-061-2/+2
| | | | | | | | | | | | | | The x86 asm expects int32_t so use that type. Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc_filter: run vertical and horizontal togetherChristophe Gisquet2014-07-291-45/+45
| | | | | | | | | | | | | | | | This should help cache locality. On win64: Before: 1397x cycles, 16216 bytes After: 1369x cycles, 16040 bytes Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: rename variable in boundary strength to b more explicitAnton Khirnov2014-07-281-4/+4
| | | | | | | | | | | | | | Signed-off-by: Mickaël Raulet <mraulet@insa-rennes.fr> cherry picked from commit 348bebedc0012aae201419669fca1eb61ec93ca6 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: remove non necessary parameters to ff_hevc_set_qpyMickaël Raulet2014-07-281-5/+3
| | | | | | | | | | | | cherry picked from commit 6f58c111ad9920d983bb18eacf901193bac5d937 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '73bb8f61d48dbf7237df2e9cacd037f12b84b00a'Michael Niedermayer2014-07-261-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '73bb8f61d48dbf7237df2e9cacd037f12b84b00a': hevcdsp: remove an unneeded variable in the loop filter Conflicts: libavcodec/hevc_filter.c See: d7e162d46b4a0fc03ca5161cdcac840152f048cb Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * hevcdsp: remove an unneeded variable in the loop filterAnton Khirnov2014-07-261-13/+10
| | | | | | | | beta0 and beta1 will always be the same
* | hevcdsp: remove an unneeded variable in the loop filterAnton Khirnov2014-07-221-13/+9
| | | | | | | | | | | | | | | | | | beta0 and beta1 will always be the same within a CU Signed-off-by: Mickaël Raulet <mraulet@insa-rennes.fr> cherry picked from commit 4a23d824741a289c7d2d2f2871d1e2621b63fa1b Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc/rext: update boundary strength for chroma deblocking filterMickaël Raulet2014-07-221-26/+17
| | | | | | | | | | | | cherry picked from commit 7d05c95ac5a63d7675bf645e74b4cf1fffff4796 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: report more precise progressChristophe Gisquet2014-07-191-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lag of one CTB line for SAO behind deblocking filter, except for last line. However, once SAO has been completed on a line, all its pixels, i.e. up to y+ctb_size are filtered and ready to be used as reference. Without SAO, when deblocking filter finishes a CTB line, only the bottom bottom 4 pixels may be filtered when next CTB is process by the deblocing. The await_progess for hevc then checks whether the bottom pixels of a PU requires access beyond that point, so the reporting should effectively report up to the the above limits. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: fix transquant_bypassMickaël Raulet2014-07-191-5/+6
| | | | | | | | | | cherry picked from commit 4a16cb2c70728a55d2fd723aff01b13ea259c4df Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc/sao: optimze sao implementationMickaël Raulet2014-07-181-19/+47
| | | | | | | | | | | | | | | | | | | | - 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>
* | hevc/rext: basic infrastructure for supporting range extensionMickaël Raulet2014-07-151-29/+41
| | | | | | | | | | | | | | | | - 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>
* | hevc: move restore_tqb where it should be.Mickaël Raulet2014-07-151-0/+33
| | | | | | | | | | | | (cherry picked from commit 8fafc96a9805d11bfe32537c8f78a294a5844065) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: simplify SAO computation, delay from one row its computationMickaël Raulet2014-07-151-119/+106
| | | | | | | | | | | | (cherry picked from commit f2c5f647cec786df26f442a85e6d685a131a50c9) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | hevc: C code update for new motion compensationMickaël Raulet2014-05-061-167/+130
| | | | | | | | | | | | | | pretty print C Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676'Michael Niedermayer2014-02-231-4/+8
|\ \ | |/ | | | | | | | | | | * commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676': hevc: Do not right shift a negative value in get_pcm Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud