aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvdec_hevc.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/frame: Port AVFrame.private_ref to RefStruct APIAndreas Rheinhardt2025-03-281-2/+2
| | | | | | | | | This is possible without deprecation period, because said field is documented as only for our libav* libraries and not the general public. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* FFHWAccel: add buffer_ref argument to start_frameLynne2025-03-171-0/+1
| | | | | | | | This commit adds a reference to the buffer as an argument to start_frame, and adapts all existing code. This allows for asynchronous hardware accelerators to skip copying packet data by referencing it.
* lavc/hevc/hevcdec: implement MV-HEVC inter-layer predictionAnton Khirnov2024-09-231-1/+1
| | | | | | | | | | | | | | The per-frame reference picture set contains two more lists - INTER_LAYER[01]. Assuming at most two layers, INTER_LAYER1 is always empty, but is added anyway for completeness. When inter-layer prediction is enabled, INTER_LAYER0 for the second-layer frame will contain the base-layer frame from the same access unit, if it exists. The new lists are then used in per-slice reference picture set construction as per F.8.3.4 "Decoding process for reference picture lists construction".
* lavc/hevcdec: add a per-layer contextAnton Khirnov2024-09-061-2/+3
| | | | | | | Start by moving the DPB to it. Only one context exists for now, so decoder behaviour should not change with this commit, but that will change in the future.
* lavc/hevcdec: do not pass HEVCContext to ff_hevc_frame_nb_refs()Anton Khirnov2024-06-111-1/+1
| | | | | | | | Pass the only things required from it - slice header and PPS - explicitly. Will be useful in the following commits to avoid mofiying HEVCContext in hls_slice_header().
* lavc/hevcdec: move active PPS from HEVCParamSets to HEVCContextAnton Khirnov2024-06-111-5/+5
| | | | | "Currently active PPS" is a property of the decoding process, not of the list of available parameter sets.
* lavc/hevc*: move to hevc/ subdirAnton Khirnov2024-06-041-2/+2
|
* lavc/hevcdec: rename HEVCFrame.frame to just fAnton Khirnov2024-06-041-3/+3
| | | | | This is shorter, loses no information, and is consistent with other similar structs.
* lavc/hevcdec: rename HEVCContext.ref to cur_frameAnton Khirnov2024-06-041-3/+3
| | | | Since it stores a pointer to the current frame.
* lavc/hevc_ps/HEVCSPS: change flags into uint8_tAnton Khirnov2024-05-311-21/+21
| | | | | | | Reduces sizeof(HEVCSPS) by 64 bytes. Also improve flag names: drop redundant suffixes and prefixes, and consistently use disabled/enabled.
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvdec: Constify bitstream pointeeAndreas Rheinhardt2024-02-081-2/+2
| | | | | Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvdec: don't free NVDECContext->bitstreamJames Almer2024-02-071-2/+2
| | | | | | | | | | Ensure all hwaccels that allocate a buffer use NVDECContext->bitstream_internal instead. Otherwise, if FFHWAccel->end_frame() isn't called before FFHWAccel->uninit(), an attempt to free a stale pointer to memory not owned by the hwaccel could take place. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvdec_hevc: fail to initialize on unsupported profilesTimo Rothenpieler2023-10-121-0/+9
|
* avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccelAndreas Rheinhardt2023-08-071-5/+6
| | | | | | | | | This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvdec_hevc: Fix off-by-one errorAndreas Rheinhardt2022-08-061-2/+2
| | | | | | | Fixes Coverity issues #1442912, #1442913, #1442916 and #1442917. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvdec: Explicitly mark codecs that support 444 output formatsPhilip Langdale2019-02-161-2/+8
| | | | | | | | | With the introduction of HEVC 444 support, we technically have two codecs that can handle 444 - HEVC and MJPEG. In the case of MJPEG, it can decode, but can only output one of the semi-planar formats. That means we need additional logic to decide whether to use a 444 output format or not.
* avcodec/nvdec: Add support for decoding HEVC 4:4:4 contentPhilip Langdale2019-02-161-0/+30
| | | | | | | | | | | | | The latest generation video decoder on the Turing chips supports decoding HEVC 4:4:4. Supporting this is relatively straight-forward; we need to account for the different chroma format and pick the right output and sw formats at the right times. There was one bug which was the hard-coded assumption that the first chroma plane would be half-height; I fixed this to use the actual shift value on the plane. We also need to pass the SPS and PPS range extension flags.
* avcodec/nvdec_hevc: fix scaling listsPhilip Langdale2018-05-101-6/+6
| | | | | | | | | | | The main issue here was the use of [i] instead of [i * 3] for the 32x32 matrix. As part of fixing this, I changed the code to match that used in vdpau_hevc, which I spent a lot of time verifying. I also changed to calculating NumPocTotalCurr using the existing helper, which is what vdpau does. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvdec: correctly set intra_pic_flag for h264/hevcTimo Rothenpieler2018-04-151-1/+1
|
* avcodec/nv{enc,dec}: use sane version checking macroTimo Rothenpieler2018-04-131-1/+1
| | | | | For some odd reason, the Nvidia version macros puts the minor version in the msb, so comparing against it is impossible.
* avcodec/nvdec_hevc: add support for new extended sps/pps flags from SDK 8.1Timo Rothenpieler2018-04-131-0/+6
|
* lavc: Mark all AVHWAccel structures as constMark Thompson2017-11-261-1/+1
|
* nvdec: add frames_params supportwm42017-11-111-3/+5
|
* avcodec/nvdec: fix copyright headersJames Almer2017-11-101-5/+5
| | | | | | Fixes fate-source. Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88'James Almer2017-11-101-0/+279
* commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88': hevcdec: add a CUVID hwaccel Adapted for ffmpeg by Timo Rothenpieler. Merged-by: James Almer <jamrial@gmail.com>