avcodec: Refactor common nvdec hwaccel logic
authorPhilip Langdale <philipl@overt.org>
Sun, 19 Nov 2017 04:29:15 +0000 (20:29 -0800)
committerPhilip Langdale <philipl@overt.org>
Mon, 20 Nov 2017 15:03:26 +0000 (07:03 -0800)
commit4c7b023d56e09a78a587d036db1b64bf7c493b3d
tree31237bc67175fc5dba0eefa015be18a8fe6bafb0
parent16d67fabb1eb781d800b76e7843e39c349f15d24
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.
libavcodec/nvdec.c
libavcodec/nvdec.h
libavcodec/nvdec_mpeg12.c
libavcodec/nvdec_vc1.c
libavcodec/nvdec_vp9.c