Hello community, here is the log from the commit of package ffnvcodec for openSUSE:Factory checked in at 2018-07-01 21:27:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ffnvcodec (Old) and /work/SRC/openSUSE:Factory/.ffnvcodec.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ffnvcodec" Sun Jul 1 21:27:05 2018 rev:2 rq:619835 version:8.1.24.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ffnvcodec/ffnvcodec.changes 2018-06-29 22:36:26.098000022 +0200 +++ /work/SRC/openSUSE:Factory/.ffnvcodec.new/ffnvcodec.changes 2018-07-01 21:28:14.172625167 +0200 @@ -1,0 +2,6 @@ +Fri Jun 29 21:37:39 UTC 2018 - [email protected] + +- Update to version 8.1.24.2 + * SDK 8.1 + +------------------------------------------------------------------- Old: ---- nv-codec-headers-8.0.14.2.tar.xz New: ---- nv-codec-headers-8.1.24.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ffnvcodec.spec ++++++ --- /var/tmp/diff_new_pack.dmEKml/_old 2018-07-01 21:28:14.688624498 +0200 +++ /var/tmp/diff_new_pack.dmEKml/_new 2018-07-01 21:28:14.688624498 +0200 @@ -17,7 +17,7 @@ Name: ffnvcodec -Version: 8.0.14.2 +Version: 8.1.24.2 Release: 0 Summary: FFmpeg version of NVIDIA codec API headers License: MIT @@ -32,6 +32,7 @@ %package -n %{name}-devel Summary: FFmpeg version of NVIDIA codec API headers +Group: Development/Libraries/C and C++ %description -n %{name}-devel This package contains the headers required for FFmpeg to interface ++++++ _service ++++++ --- /var/tmp/diff_new_pack.dmEKml/_old 2018-07-01 21:28:14.712624467 +0200 +++ /var/tmp/diff_new_pack.dmEKml/_new 2018-07-01 21:28:14.712624467 +0200 @@ -4,7 +4,7 @@ <param name="scm">git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">n([0-9\.]*)</param> - <param name="revision">n8.0.14.2</param> + <param name="revision">n8.1.24.2</param> </service> <service mode="disabled" name="recompress"> <param name="file">*.tar</param> ++++++ nv-codec-headers-8.0.14.2.tar.xz -> nv-codec-headers-8.1.24.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-8.0.14.2/README new/nv-codec-headers-8.1.24.2/README --- old/nv-codec-headers-8.0.14.2/README 2018-05-05 11:46:09.000000000 +0200 +++ new/nv-codec-headers-8.1.24.2/README 2018-05-05 11:45:50.000000000 +0200 @@ -1,7 +1,7 @@ FFmpeg version of headers required to interface with Nvidias codec APIs. -Corresponds to Video Codec SDK version 8.0.14. +Corresponds to Video Codec SDK version 8.1.24. Minimum required driver versions: -Linux: 378.13 or newer -Windows: 378.66 or newer +Linux: 390.25 or newer +Windows: 390.77 or newer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-8.0.14.2/ffnvcodec.pc.in new/nv-codec-headers-8.1.24.2/ffnvcodec.pc.in --- old/nv-codec-headers-8.0.14.2/ffnvcodec.pc.in 2018-05-05 11:46:09.000000000 +0200 +++ new/nv-codec-headers-8.1.24.2/ffnvcodec.pc.in 2018-05-05 11:45:50.000000000 +0200 @@ -3,5 +3,5 @@ Name: ffnvcodec Description: FFmpeg version of Nvidia Codec SDK headers -Version: 8.0.14.2 +Version: 8.1.24.2 Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-8.0.14.2/include/ffnvcodec/dynlink_cuviddec.h new/nv-codec-headers-8.1.24.2/include/ffnvcodec/dynlink_cuviddec.h --- old/nv-codec-headers-8.0.14.2/include/ffnvcodec/dynlink_cuviddec.h 2018-05-05 11:46:09.000000000 +0200 +++ new/nv-codec-headers-8.1.24.2/include/ffnvcodec/dynlink_cuviddec.h 2018-05-05 11:45:50.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2017 NVIDIA Corporation + * Copyright (c) 2010-2018 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -28,7 +28,7 @@ /*****************************************************************************************************/ //! \file cuviddec.h //! NVDECODE API provides video decoding interface to NVIDIA GPU devices. -//! \date 2015-2017 +//! \date 2015-2018 //! This file contains constants, structure definitions and function prototypes used for decoding. /*****************************************************************************************************/ @@ -41,6 +41,11 @@ #endif #endif +#define NVDECAPI_MAJOR_VERSION 8 +#define NVDECAPI_MINOR_VERSION 1 + +#define NVDECAPI_VERSION (NVDECAPI_MAJOR_VERSION | (NVDECAPI_MINOR_VERSION << 24)) + #if defined(__cplusplus) extern "C" { #endif /* __cplusplus */ @@ -499,7 +504,12 @@ unsigned char bit_depth_luma_minus8; unsigned char bit_depth_chroma_minus8; - unsigned char reserved1[14]; + //sps/pps extension fields + unsigned char log2_max_transform_skip_block_size_minus2; + unsigned char log2_sao_offset_scale_luma; + unsigned char log2_sao_offset_scale_chroma; + unsigned char high_precision_offsets_enabled_flag; + unsigned char reserved1[10]; // pps unsigned char dependent_slice_segments_enabled_flag; @@ -776,57 +786,57 @@ /**********************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidGetDecoderCaps(CUVIDDECODECAPS *pdc); -/********************************************************************************************************************/ +/*****************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci) //! Create the decoder object based on pdci. A handle to the created decoder is returned -/********************************************************************************************************************/ +/*****************************************************************************************************/ typedef CUresult CUDAAPI tcuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci); -/********************************************************************************************************************/ + +/*****************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidDestroyDecoder(CUvideodecoder hDecoder) -//! Destroy the decoder object. -/********************************************************************************************************************/ +//! Destroy the decoder object +/*****************************************************************************************************/ typedef CUresult CUDAAPI tcuvidDestroyDecoder(CUvideodecoder hDecoder); -/********************************************************************************************************************/ +/*****************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams) //! Decode a single picture (field or frame) //! Kicks off HW decoding -/********************************************************************************************************************/ +/*****************************************************************************************************/ typedef CUresult CUDAAPI tcuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams); - #if !defined(__CUVID_DEVPTR64) || defined(__CUVID_INTERNAL) /************************************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx, unsigned int *pDevPtr, -//! unsigned int *pPitch, CUVIDPROCPARAMS *pVPP); +//! unsigned int *pPitch, CUVIDPROCPARAMS *pVPP); //! Post-process and map video frame corresponding to nPicIdx for use in cuda. Returns cuda device pointer and associated //! pitch of the video frame /************************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx, - unsigned int *pDevPtr, unsigned int *pPitch, - CUVIDPROCPARAMS *pVPP); + unsigned int *pDevPtr, unsigned int *pPitch, + CUVIDPROCPARAMS *pVPP); -/********************************************************************************************************************/ +/*****************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr) //! Unmap a previously mapped video frame -/********************************************************************************************************************/ +/*****************************************************************************************************/ typedef CUresult CUDAAPI tcuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr); #endif #if defined(_WIN64) || defined(__LP64__) || defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) -/************************************************************************************************************************/ +/****************************************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr, -//! unsigned int *pPitch, CUVIDPROCPARAMS *pVPP); +//! unsigned int * pPitch, CUVIDPROCPARAMS *pVPP); //! Post-process and map video frame corresponding to nPicIdx for use in cuda. Returns cuda device pointer and associated //! pitch of the video frame -/************************************************************************************************************************/ +/****************************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr, - unsigned int *pPitch, CUVIDPROCPARAMS *pVPP); + unsigned int *pPitch, CUVIDPROCPARAMS *pVPP); -/********************************************************************************************************************/ +/**************************************************************************************************/ //! \fn CUresult CUDAAPI cuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr); //! Unmap a previously mapped video frame -/********************************************************************************************************************/ +/**************************************************************************************************/ typedef CUresult CUDAAPI tcuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr); #if defined(__CUVID_DEVPTR64) && !defined(__CUVID_INTERNAL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-8.0.14.2/include/ffnvcodec/dynlink_nvcuvid.h new/nv-codec-headers-8.1.24.2/include/ffnvcodec/dynlink_nvcuvid.h --- old/nv-codec-headers-8.0.14.2/include/ffnvcodec/dynlink_nvcuvid.h 2018-05-05 11:46:09.000000000 +0200 +++ new/nv-codec-headers-8.1.24.2/include/ffnvcodec/dynlink_nvcuvid.h 2018-05-05 11:45:50.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2017 NVIDIA Corporation + * Copyright (c) 2010-2018 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -28,7 +28,7 @@ /********************************************************************************************************************/ //! \file nvcuvid.h //! NVDECODE API provides video decoding interface to NVIDIA GPU devices. -//! \date 2015-2017 +//! \date 2015-2018 //! This file contains the interface constants, structure definitions and function prototypes. /********************************************************************************************************************/ @@ -41,10 +41,6 @@ extern "C" { #endif /* __cplusplus */ -/********************************* -** Initialization -*********************************/ -CUresult CUDAAPI cuvidInit(unsigned int Flags); /***********************************************/ //! @@ -231,51 +227,65 @@ } CUvideosourceformat_flags; #if !defined(__APPLE__) -/**************************************************************************************************************************/ +/***************************************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidCreateVideoSource(CUvideosource *pObj, const char *pszFileName, CUVIDSOURCEPARAMS *pParams) //! Create CUvideosource object. CUvideosource spawns demultiplexer thread that provides two callbacks: //! pfnVideoDataHandler() and pfnAudioDataHandler() //! NVDECODE API is intended for HW accelerated video decoding so CUvideosource doesn't have audio demuxer for all supported //! containers. It's recommended to clients to use their own or third party demuxer if audio support is needed. -/**************************************************************************************************************************/ +/***************************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidCreateVideoSource(CUvideosource *pObj, const char *pszFileName, CUVIDSOURCEPARAMS *pParams); -/****************************************************************************************************************************/ +/***************************************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidCreateVideoSourceW(CUvideosource *pObj, const wchar_t *pwszFileName, CUVIDSOURCEPARAMS *pParams) -//! Create video source object and initialize -/****************************************************************************************************************************/ +//! Create video source +/***************************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidCreateVideoSourceW(CUvideosource *pObj, const wchar_t *pwszFileName, CUVIDSOURCEPARAMS *pParams); -/*********************************************************************/ +/********************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidDestroyVideoSource(CUvideosource obj) //! Destroy video source -/*********************************************************************/ +/********************************************************************/ typedef CUresult CUDAAPI tcuvidDestroyVideoSource(CUvideosource obj); /******************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidSetVideoSourceState(CUvideosource obj, cudaVideoState state) -//! Set video source state +//! Set video source state to: +//! cudaVideoState_Started - to signal the source to run and deliver data +//! cudaVideoState_Stopped - to stop the source from delivering the data +//! cudaVideoState_Error - invalid source /******************************************************************************************/ typedef CUresult CUDAAPI tcuvidSetVideoSourceState(CUvideosource obj, cudaVideoState state); /******************************************************************************************/ +//! \ingroup FUNCTS //! \fn cudaVideoState CUDAAPI cuvidGetVideoSourceState(CUvideosource obj) //! Get video source state +//! Returns: +//! cudaVideoState_Started - if Source is running and delivering data +//! cudaVideoState_Stopped - if Source is stopped or reached end-of-stream +//! cudaVideoState_Error - if Source is in error state /******************************************************************************************/ typedef cudaVideoState CUDAAPI tcuvidGetVideoSourceState(CUvideosource obj); -/****************************************************************************************************************/ +/******************************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidGetSourceVideoFormat(CUvideosource obj, CUVIDEOFORMAT *pvidfmt, unsigned int flags) -//! Gets details of video stream in pvidfmt -/****************************************************************************************************************/ +//! Gets video source format in pvidfmt, flags is set to combination of CUvideosourceformat_flags as per requirement +/******************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidGetSourceVideoFormat(CUvideosource obj, CUVIDEOFORMAT *pvidfmt, unsigned int flags); -/****************************************************************************************************************/ +/**************************************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidGetSourceAudioFormat(CUvideosource obj, CUAUDIOFORMAT *paudfmt, unsigned int flags) //! Get audio source format -//! NVDECODE API is intended for HW accelarated video decoding so CUvideosource doesn't have audio demuxer for all suppported +//! NVDECODE API is intended for HW accelerated video decoding so CUvideosource doesn't have audio demuxer for all supported //! containers. It's recommended to clients to use their own or third party demuxer if audio support is needed. -/****************************************************************************************************************/ +/**************************************************************************************************************************/ typedef CUresult CUDAAPI tcuvidGetSourceAudioFormat(CUvideosource obj, CUAUDIOFORMAT *paudfmt, unsigned int flags); #endif @@ -327,22 +337,29 @@ } CUVIDPARSERPARAMS; /************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidCreateVideoParser(CUvideoparser *pObj, CUVIDPARSERPARAMS *pParams) //! Create video parser object and initialize /************************************************************************************************/ typedef CUresult CUDAAPI tcuvidCreateVideoParser(CUvideoparser *pObj, CUVIDPARSERPARAMS *pParams); /************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidParseVideoData(CUvideoparser obj, CUVIDSOURCEDATAPACKET *pPacket) //! Parse the video data from source data packet in pPacket //! Extracts parameter sets like SPS, PPS, bitstream etc. from pPacket and //! calls back pfnDecodePicture with CUVIDPICPARAMS data for kicking of HW decoding +//! calls back pfnSequenceCallback with CUVIDEOFORMAT data for initial sequence header or when +//! the decoder encounters a video format change +//! calls back pfnDisplayPicture with CUVIDPARSERDISPINFO data to display a video frame /************************************************************************************************/ typedef CUresult CUDAAPI tcuvidParseVideoData(CUvideoparser obj, CUVIDSOURCEDATAPACKET *pPacket); -/*******************************************************************/ +/************************************************************************************************/ +//! \ingroup FUNCTS //! \fn CUresult CUDAAPI cuvidDestroyVideoParser(CUvideoparser obj) -/*******************************************************************/ +//! Destroy the video parser +/************************************************************************************************/ typedef CUresult CUDAAPI tcuvidDestroyVideoParser(CUvideoparser obj); /**********************************************************************************************/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nv-codec-headers-8.0.14.2/include/ffnvcodec/nvEncodeAPI.h new/nv-codec-headers-8.1.24.2/include/ffnvcodec/nvEncodeAPI.h --- old/nv-codec-headers-8.0.14.2/include/ffnvcodec/nvEncodeAPI.h 2018-05-05 11:46:09.000000000 +0200 +++ new/nv-codec-headers-8.1.24.2/include/ffnvcodec/nvEncodeAPI.h 2018-05-05 11:45:50.000000000 +0200 @@ -1,7 +1,7 @@ /* * This copyright notice applies to this header file only: * - * Copyright (c) 2010-2017 NVIDIA Corporation + * Copyright (c) 2010-2018 NVIDIA Corporation * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -30,7 +30,7 @@ * NVIDIA GPUs - beginning with the Kepler generation - contain a hardware-based encoder * (referred to as NVENC) which provides fully-accelerated hardware-based video encoding. * NvEncodeAPI provides the interface for NVIDIA video encoder (NVENC). - * \date 2011-2017 + * \date 2011-2018 * This file contains the interface constants, structure definitions and function prototypes. */ @@ -114,7 +114,7 @@ typedef void* NV_ENC_REGISTERED_PTR; /**< A Resource that has been registered with NVENCODE API*/ #define NVENCAPI_MAJOR_VERSION 8 -#define NVENCAPI_MINOR_VERSION 0 +#define NVENCAPI_MINOR_VERSION 1 #define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24)) @@ -262,6 +262,30 @@ NV_ENC_PARAMS_RC_VBR_HQ = 0x20 /**< VBR, high quality (slower) */ } NV_ENC_PARAMS_RC_MODE; +/** + * Emphasis Levels + */ +typedef enum _NV_ENC_EMPHASIS_MAP_LEVEL +{ + NV_ENC_EMPHASIS_MAP_LEVEL_0 = 0x0, /**< Emphasis Map Level 0, for zero Delta QP value */ + NV_ENC_EMPHASIS_MAP_LEVEL_1 = 0x1, /**< Emphasis Map Level 1, for very low Delta QP value */ + NV_ENC_EMPHASIS_MAP_LEVEL_2 = 0x2, /**< Emphasis Map Level 2, for low Delta QP value */ + NV_ENC_EMPHASIS_MAP_LEVEL_3 = 0x3, /**< Emphasis Map Level 3, for medium Delta QP value */ + NV_ENC_EMPHASIS_MAP_LEVEL_4 = 0x4, /**< Emphasis Map Level 4, for high Delta QP value */ + NV_ENC_EMPHASIS_MAP_LEVEL_5 = 0x5 /**< Emphasis Map Level 5, for very high Delta QP value */ +} NV_ENC_EMPHASIS_MAP_LEVEL; + +/** + * QP MAP MODE + */ +typedef enum _NV_ENC_QP_MAP_MODE +{ + NV_ENC_QP_MAP_DISABLED = 0x0, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap have no effect. */ + NV_ENC_QP_MAP_EMPHASIS = 0x1, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as Empasis level. Currently this is only supported for H264 */ + NV_ENC_QP_MAP_DELTA = 0x2, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as QP delta map. */ + NV_ENC_QP_MAP = 0x3, /**< Currently This is not supported. Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as QP value. */ +} NV_ENC_QP_MAP_MODE; + #define NV_ENC_PARAMS_RC_VBR_MINQP (NV_ENC_PARAMS_RC_MODE)0x4 /**< Deprecated */ #define NV_ENC_PARAMS_RC_2_PASS_QUALITY NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ /**< Deprecated */ #define NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP NV_ENC_PARAMS_RC_CBR_HQ /**< Deprecated */ @@ -585,6 +609,15 @@ NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED = 3 /**< Memory heap is in uncached system memory */ } NV_ENC_MEMORY_HEAP; +/** + * B-frame used as reference modes + */ +typedef enum _NV_ENC_BFRAME_REF_MODE +{ + NV_ENC_BFRAME_REF_MODE_DISABLED = 0x0, /**< B frame is not used for reference */ + NV_ENC_BFRAME_REF_MODE_EACH = 0x1, /**< Each B-frame will be used for reference. currently not supported */ + NV_ENC_BFRAME_REF_MODE_MIDDLE = 0x2, /**< Only(Number of B-frame)/2 th B-frame will be used for reference */ +} NV_ENC_BFRAME_REF_MODE; /** * H.264 entropy coding modes. @@ -955,7 +988,34 @@ */ NV_ENC_CAPS_SUPPORT_WEIGHTED_PREDICTION, + /** + * On managed (vGPU) platforms (Windows only), this API, in conjunction with other GRID Management APIs, can be used + * to estimate the residual capacity of the hardware encoder on the GPU as a percentage of the total available encoder capacity. + * This API can be called at any time; i.e. during the encode session or before opening the encode session. + * If the available encoder capacity is returned as zero, applications may choose to switch to software encoding + * and continue to call this API (e.g. polling once per second) until capacity becomes available. + * + * On baremetal (non-virtualized GPU) and linux platforms, this API always returns 100. + */ + NV_ENC_CAPS_DYNAMIC_QUERY_ENCODER_CAPACITY, + + /** + * Indicates B as refererence support. + * \n 0 : B as reference is not supported. + * \n 1 : each B-Frame as reference is supported. + * \n 2 : only Middle B-frame as reference is supported. + */ + NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE, + + /** + * Indicates HW support for Emphasis Level Map based delta QP computation. + * \n 0 : Emphasis Level Map based delta QP not supported. + * \n 1 : Emphasis Level Map based delta QP is supported. + */ + NV_ENC_CAPS_SUPPORT_EMPHASIS_LEVEL_MAP, + + /** * Reserved - Not to be used by clients. */ NV_ENC_CAPS_EXPOSED_COUNT @@ -1100,7 +1160,7 @@ uint32_t enableMaxQP :1; /**< [in]: Set this to 1 if maximum QP used for rate control. */ uint32_t enableInitialRCQP :1; /**< [in]: Set this to 1 if user suppplied initial QP is used for rate control. */ uint32_t enableAQ :1; /**< [in]: Set this to 1 to enable adaptive quantization (Spatial). */ - uint32_t enableExtQPDeltaMap :1; /**< [in]: Set this to 1 to enable additional QP modifier for each MB supplied by client though signed byte array pointed to by NV_ENC_PIC_PARAMS::qpDeltaMap (Not Supported when AQ(Spatial/Temporal) is enabled) */ + uint32_t reservedBitField1 :1; /**< [in]: Reserved bitfields and must be set to 0. */ uint32_t enableLookahead :1; /**< [in]: Set this to 1 to enable lookahead with depth <lookaheadDepth> (if lookahead is enabled, input frames must remain available to the encoder until encode completion) */ uint32_t disableIadapt :1; /**< [in]: Set this to 1 to disable adaptive I-frame insertion at scene cuts (only has an effect when lookahead is enabled) */ uint32_t disableBadapt :1; /**< [in]: Set this to 1 to disable adaptive B-frame decision (only has an effect when lookahead is enabled) */ @@ -1118,7 +1178,25 @@ uint8_t targetQuality; /**< [in]: Target CQ (Constant Quality) level for VBR mode (range 0-51 with 0-automatic) */ uint8_t targetQualityLSB; /**< [in]: Fractional part of target quality (as 8.8 fixed point format) */ uint16_t lookaheadDepth; /**< [in]: Maximum depth of lookahead with range 0-32 (only used if enableLookahead=1) */ - uint32_t reserved[9]; + uint32_t reserved1; + NV_ENC_QP_MAP_MODE qpMapMode; /**< [in]: This flag is used to interpret values in array pecified by NV_ENC_PIC_PARAMS::qpDeltaMap. + Set this to NV_ENC_QP_MAP_EMPHASIS to treat values specified by NV_ENC_PIC_PARAMS::qpDeltaMap as Emphasis level Map. + Emphasis Level can be assigned any value specified in enum NV_ENC_EMPHASIS_MAP_LEVEL. + Emphasis Level Map is used to specify regions to be encoded at varying levels of quality. + The hardware encoder adjusts the quantization within the image as per the provided emphasis map, + by adjusting the quantization parameter (QP) assigned to each macroblock. This adjustment is commonly called “Delta QP”. + The adjustment depends on the absolute QP decided by the rate control algorithm, and is applied after the rate control has decided each macroblock’s QP. + Since the Delta QP overrides rate control, enabling emphasis level map may violate bitrate and VBV buffersize constraints. + Emphasis level map is useful in situations when client has a priori knowledge of the image complexity (e.g. via use of NVFBC's Classification feature) and encoding those high-complexity areas at higher quality (lower QP) is important, even at the possible cost of violating bitrate/VBV buffersize constraints + This feature is not supported when AQ( Spatial/Temporal) is enabled. + This feature is only supported for H264 codec currently. + + Set this to NV_ENC_QP_MAP_DELTA to treat values specified by NV_ENC_PIC_PARAMS::qpDeltaMap as QPDelta. This specify QP modifier to be applied on top of the QP chosen by rate control + + Set this to NV_ENC_QP_MAP_DISABLED to ignore NV_ENC_PIC_PARAMS::qpDeltaMap values. In this case, qpDeltaMap should be set to NULL. + + Other values are reserved for future use.*/ + uint32_t reserved[7]; } NV_ENC_RC_PARAMS; /** macro for constructing the version field of ::_NV_ENC_RC_PARAMS */ @@ -1235,7 +1313,7 @@ is recommended to use a large DPB size so that the encoder can keep old reference frames which can be used if recent frames are invalidated. */ uint32_t sliceMode; /**< [in]: This parameter in conjunction with sliceModeData specifies the way in which the picture is divided into slices - sliceMode = 0 MB based slices, sliceMode = 1 Byte based slices, sliceMode = 2 MB row based slices, sliceMode = 3, numSlices in Picture + sliceMode = 0 MB based slices, sliceMode = 1 Byte based slices, sliceMode = 2 MB row based slices, sliceMode = 3 numSlices in Picture. When forceIntraRefreshWithFrameCnt is set it will have priority over sliceMode setting When sliceMode == 0 and sliceModeData == 0 whole picture will be coded with one slice */ uint32_t sliceModeData; /**< [in]: Specifies the parameter needed for sliceMode. For: @@ -1254,11 +1332,11 @@ uint32_t chromaFormatIDC; /**< [in]: Specifies the chroma format. Should be set to 1 for yuv420 input, 3 for yuv444 input. Check support for YUV444 encoding using ::NV_ENC_CAPS_SUPPORT_YUV444_ENCODE caps.*/ uint32_t maxTemporalLayers; /**< [in]: Specifies the max temporal layer used for hierarchical coding. */ - uint32_t reserved1[270]; /**< [in]: Reserved and must be set to 0 */ + NV_ENC_BFRAME_REF_MODE useBFramesAsRef; /**< [in]: Specifies the B-Frame as reference mode. Check support for useBFramesAsRef mode using ::NV_ENC_CAPS_SUPPORT_BFRAME_REF_MODE caps.*/ + uint32_t reserved1[269]; /**< [in]: Reserved and must be set to 0 */ void* reserved2[64]; /**< [in]: Reserved and must be set to NULL */ } NV_ENC_CONFIG_H264; - /** * \struct _NV_ENC_CONFIG_HEVC * HEVC encoder configuration parameters to be set during initialization. @@ -1312,7 +1390,7 @@ Set to 1 to use "LTR Trust" mode of LTR operation. Clients are discouraged to use "LTR Trust" mode as this mode may be deprecated in future releases. Set to 0 when using "LTR Per Picture" mode of LTR operation. */ - uint32_t reserved1[217]; /**< [in]: Reserved and must be set to 0.*/ + uint32_t reserved1[217]; /**< [in]: Reserved and must be set to 0.*/ void* reserved2[64]; /**< [in]: Reserved and must be set to NULL */ } NV_ENC_CONFIG_HEVC; @@ -1382,7 +1460,7 @@ } NV_ENC_CONFIG; /** macro for constructing the version field of ::_NV_ENC_CONFIG */ -#define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(6) | ( 1<<31 )) +#define NV_ENC_CONFIG_VER (NVENCAPI_STRUCT_VERSION(7) | ( 1<<31 )) /** @@ -1436,7 +1514,21 @@ typedef struct _NV_ENC_RECONFIGURE_PARAMS { uint32_t version; /**< [in]: Struct version. Must be set to ::NV_ENC_RECONFIGURE_PARAMS_VER. */ - NV_ENC_INITIALIZE_PARAMS reInitEncodeParams; /**< [in]: Encoder session re-initialization parameters. */ + NV_ENC_INITIALIZE_PARAMS reInitEncodeParams; /**< [in]: Encoder session re-initialization parameters. + If reInitEncodeParams.encodeConfig is NULL and + reInitEncodeParams.presetGUID is the same as the preset + GUID specified on the call to NvEncInitializeEncoder(), + EncodeAPI will continue to use the existing encode + configuration. + If reInitEncodeParams.encodeConfig is NULL and + reInitEncodeParams.presetGUID is different from the preset + GUID specified on the call to NvEncInitializeEncoder(), + EncodeAPI will try to use the default configuration for + the preset specified by reInitEncodeParams.presetGUID. + In this case, reconfiguration may fail if the new + configuration is incompatible with the existing + configuration (e.g. the new configuration results in + a change in the GOP structure). */ uint32_t resetEncoder :1; /**< [in]: This resets the rate control states and other internal encoder states. This should be used only with an IDR frame. If NV_ENC_INITIALIZE_PARAMS::enablePTD is set to 1, encoder will force the frame type to IDR */ uint32_t forceIDR :1; /**< [in]: Encode the current picture as an IDR picture. This flag is only valid when Picture type decision is taken by the Encoder @@ -1560,7 +1652,6 @@ void* reserved3[61]; /**< [in]: Reserved and must be set to NULL. */ } NV_ENC_PIC_PARAMS_HEVC; - /** * Codec specific per-picture encoding parameters. */ @@ -1599,7 +1690,11 @@ + 4*meHintCountsPerBlock[Lx].numCandsPerBlk8x8. For frames using bidirectional ME , the total number of candidates for single macroblock is sum of total number of candidates per MB for each direction (L0 and L1) */ uint32_t reserved1[6]; /**< [in]: Reserved and must be set to 0 */ void* reserved2[2]; /**< [in]: Reserved and must be set to NULL */ - int8_t *qpDeltaMap; /**< [in]: Specifies the pointer to signed byte array containing QP delta value per MB in raster scan order in the current picture. This QP modifier is applied on top of the QP chosen by rate control. */ + int8_t *qpDeltaMap; /**< [in]: Specifies the pointer to signed byte array containing value per MB in raster scan order for the current picture, which will be Interperated depending on NV_ENC_RC_PARAMS::qpMapMode. + If NV_ENC_RC_PARAMS::qpMapMode is NV_ENC_QP_MAP_DELTA , This specify QP modifier to be applied on top of the QP chosen by rate control. + If NV_ENC_RC_PARAMS::qpMapMode is NV_ENC_QP_MAP_EMPHASIS, it specifies emphasis level map per MB. This level value along with QP chosen by rate control is used to compute the QP modifier, + which in turn is applied on top of QP chosen by rate control. + If NV_ENC_RC_PARAMS::qpMapMode is NV_ENC_QP_MAP_DISABLED value in qpDeltaMap will be ignored.*/ uint32_t qpDeltaMapSize; /**< [in]: Specifies the size in bytes of qpDeltaMap surface allocated by client and pointed to by NV_ENC_PIC_PARAMS::qpDeltaMap. Surface (array) should be picWidthInMbs * picHeightInMbs */ uint32_t reservedBitFields; /**< [in]: Reserved bitfields and must be set to 0 */ uint16_t meHintRefPicDist[2]; /**< [in]: Specifies temporal distance for reference picture (NVENC_EXTERNAL_ME_HINT::refidx = 0) used during external ME with NV_ENC_INITALIZE_PARAMS::enablePTD = 1 . meHintRefPicDist[0] is for L0 hints and meHintRefPicDist[1] is for L1 hints.
