Decoder
The NETINT decoders h264_ni_quadra_dec, h265_ni_quadra_dec, vp9_ni_quadra_dec, and jpeg_ni_quadra_dec all use Quadra hardware for decoding. The Quadra decoder has 3 post processors which can be enabled to perform cropping, scaling, and 10 to 8 bit conversion. We refer to their outputs as Out0, Out1, and Out2. Out 0 is always enabled and Out1 and Out 2 may be enabled as required. The order of operations in the post processor is cropping followed by scaling.
The Quadra decoder supports decoding images from 144x144 to 8192x8192. For JPEG the range is 48x48 to 8192x8192.
The limit of the input can be determined by the following formula:
Number of reference frames * (Picture width * Picture Height * 1.5 * ((Bit depth + 7)/8)) <= 989.4 MB
The NETINT decoder supports hardware and software AVFrames for output depending on the out parameter. If out=sw (default), the decoder will return a software AVFrame. The software AVFrame will require the YUV data to be transferred to the host. For software frames, only the first decoder output is available. If out=hw, the decoder will use hardware frames and not return the YUV data to the host but instead leave the YUV data on the hardware and return instead a handle to the YUV frame. If multiple outputs are enabled, the firmware will return multiple handles. This AVFrame will not contain pointers to a YUV frame data, but will point to the hardware descriptors. A hardware frame can contain handles for up to 3 outputs of 8 or 10 bit compressed YUV. In order to use a hardware AVFrame with an FFmpeg filter or soft encoder, the YUV frame must be transferred to the host as a software frame by calling the FFmpeg hwdownload filter. Note that most NETINT filters require a hardware frame.
See also APPS548 Codensity Quadra Software and Hardware Frames (YUVbypass) Application Note to learn more about hardware frames.
JPEG supports 8 bit baseline only. There is no support for lossless or progressive decoding.
Like the T408, the Quadra decoder will return any SEI payloads that we support to libxcoder as part of the metadata. The SEIs currently supported for decoding are t35 (close captions and HDR10+ metadata), mastering display colour volume, content light level info, and alternative transfer characteristics for HDR, pic timing and buffering period for HRD.
It should be noted that the character limit for an expression for decoder scaling or cropping is twenty characters.