summaryrefslogtreecommitdiffstats
path: root/libavcodec/nvdec.h
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2017-11-18 20:29:15 -0800
committerPhilip Langdale <philipl@overt.org>2017-11-20 07:03:26 -0800
commit4c7b023d56e09a78a587d036db1b64bf7c493b3d (patch)
tree31237bc67175fc5dba0eefa015be18a8fe6bafb0 /libavcodec/nvdec.h
parent16d67fabb1eb781d800b76e7843e39c349f15d24 (diff)
downloadffmpeg-streaming-4c7b023d56e09a78a587d036db1b64bf7c493b3d.zip
ffmpeg-streaming-4c7b023d56e09a78a587d036db1b64bf7c493b3d.tar.gz
avcodec: Refactor common nvdec hwaccel logic
The 'simple' hwaccels (not h.264 and hevc) all use the same bitstream management and reference lookup logic so let's refactor all that into common functions. I verified that casting a signed int -1 to unsigned char produces 255 according to the C language specification.
Diffstat (limited to 'libavcodec/nvdec.h')
-rw-r--r--libavcodec/nvdec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/nvdec.h b/libavcodec/nvdec.h
index 14d29ee..90578d5 100644
--- a/libavcodec/nvdec.h
+++ b/libavcodec/nvdec.h
@@ -58,8 +58,12 @@ int ff_nvdec_decode_init(AVCodecContext *avctx);
int ff_nvdec_decode_uninit(AVCodecContext *avctx);
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame);
int ff_nvdec_end_frame(AVCodecContext *avctx);
+int ff_nvdec_simple_end_frame(AVCodecContext *avctx);
+int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
+ uint32_t size);
int ff_nvdec_frame_params(AVCodecContext *avctx,
AVBufferRef *hw_frames_ctx,
int dpb_size);
+int ff_nvdec_get_ref_idx(AVFrame *frame);
#endif /* AVCODEC_NVDEC_H */
OpenPOWER on IntegriCloud