NVIDIA makes no representation or warranty that products based on this document will be suitable for any specified use. NVIDIA accepts no liability related to any default, damage, costs, or problem which may be based on or attributable to: i the use of the NVIDIA product in any manner that is contrary to this document or ii customer product designs.
Use of such information may require a license from a third party under the patents or other intellectual property rights of the third party, or a license from NVIDIA under the patents or other intellectual property rights of NVIDIA. Reproduction of information in this document is permissible only if approved in advance by NVIDIA in writing, reproduced without alteration and in full compliance with all applicable export laws and regulations, and accompanied by all associated conditions, limitations, and notices.
Other company and product names may be trademarks of the respective companies with which they are associated. All rights reserved. CUDA Toolkit v Hardware Accelaration. Single Image Decoding. Decode using Decoupled Phases. Batched Image Decoding. Retrieving the Compressed Stream. Introduction 1. Single image and batched image decoding. Single phase and multiple phases decoding. Color space conversion. JPEG Decoding. Single Image Decoding For single-image decoding you provide the data size and a pointer to the file data, and the decoded image is placed in the output buffer.
To use the nvJPEG library, start by calling the helper functions for initialization. Refer to the helper API reference for more details. Below is the sequence of API calls to decode a single image Initialize all the items that are used in the decoding process: Create the library handle using one of the library handle initialization routines.
Create the pinned and device buffers used by the decoder using the below APIs respectively. These buffers are used to store intermediate decoding results.
Batched Image Decoding For the batched image decoding you provide pointers to multiple file data in the memory, and also provide the buffer sizes for each file data. Single Phase For batched image decoding in single phase, follow these steps: Call nvjpegDecodeBatchedInitialize function to initialize the batched decoder. Supports baseline JPEG images with single scan with 1 or 3 channels.
Can be used only with batched decode APIs. Uses Hardware Acceleration for decode. It will be ignored for other back-ends. Use this flag to disable buffering of additional images. Using this flag will return an error in such cases. Note: This function is deprecated. Use either nvjpegCreateSimple or nvjpegCreateEx functions to create the library handle.
The back end applies to all the functions under the decoupled API , when called with this handle. Device pointers are stored within the host structures.
If the channel is not encoded, then the corresponding value would be zero. Marked for future use. If not 0, then the JPEG stream metadata headers, app markers, etc.
If 0, then JpegStream will just save the pointers to JPEG file data , and these pointers will be used later during the image decoding. This structure should be on the host CPU , but the pointers in this structure should be pointing to the device i.
Decode API—Decoupled Decoding This set of decoding API works with the bitstream handles, decode parameter handles, pinned and device buffers handles as input, thus decoupling JPEG bitstream parse, buffer management and setting up decoder parameters from the decode process itself. Currently only multiphase decoding is available. Multiphase decoupled single image decoding consists of three phases: Host, Mixed, and Device,.
This structure should be on host, but the pointers in this structure should be pointing to the device memory. If pinned buffer is not attached, then heap memory will be used for host processing This function works on a parsed stream. Note: ROI decode is disabled by default. Note that many of the calls are asynchronous and some of the errors may be seen only after synchronization. A call to nvjpegCreate is required to initialize the handle. For example, a null pointer as input data, or an image index not in the allowed range.
Check that the encoded JPEG stream and its size parameters are correct. Encoding the Parameters The user should create an encoding parameters structure with nvjpegEncoderParamsCreate function.
The parameters structure should be passed to compression functions. Note: The encoding parameters structure can be reused to compress multiple images simultaneously, but no changes to the parameters should be made during the ongoing encoding, or encoding result will be undefined.
Encoding the State The user should create the encoding state structure using nvjpegEncoderStateCreate function. Note: The encoding state structure can be reused to encode a series of images, but no encoding should be performed on multiple images with the same encoding state at the same time - otherwise result of the encodings will be undefined.
Encoding the Image The nvJPEG library provides a few interfaces for compressing the image in different formats and colorspaces. For example, if the user has interleaved the RGB image of size W x H , stored continuously, and the pointer to it is pImage , then source should be: source. Retrieving the Compressed Stream Often it is not feasible to accurately predict the final compressed data size of the final JPEG stream for any input data and parameters.
There are two options for how to do this: Use the upper bound on compressed JPEG stream size for the given parameters and image dimensions: Use the nvjpegEncodeRetrieveBitstream function to retrieve the maximum possible JPEG stream size at any given time.
Allocate the memory buffer at any given time. Encode the image using one of the encoding functions. Retrieve the compressed JPEG stream from the encoder state after successful encoding, using the nvjpegEncodeRetrieveBitstream and the allocated buffer.
Wait for the encoding to complete, and retrieve the exact size of required buffer, as below: Encode the image using one of the encoding functions. Allocate the memory buffer of at least this size. Note: As the same encoding image state can be reused to compress a series of images, the nvjpegEncodeRetrieveBitstream function will return the result for the last compressed image. Figure 1.
Pixel format is RGB. Pixel format is BGR. Pixel format is interleaved RGB. Pixel format is interleaved BGR. Default is Baseline. Otherwise optimized version will be used. Default value is 0. If data parameter is NULL then the encoder will return compressed stream size in the length parameter.
If data is not NULL then the provided length parameter should contain the data buffer size. If the provided length is less than compressed stream size, then an error will be returned. Otherwise the compressed stream will be stored in the data buffer and the actual compressed buffer size will be stored in the length parameter. Can be NULL see description.
Notices Notice This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product.
Return the decoded image planar format. Convert to planar RGB. Convert to planar BGR. Convert to interleaved RGB. Convert to interleaved BGR. Return the Y component only. Return in the YUV planar format. No of Channels in bitstream. Output Format. Only the first channel of the output is populated. Yes a. Yes b. Uses GPU for Huffman decoding. Supports input bitstream on device memory. Maximum number of color components the nvJPEG library supports. This value is returned for all the JPEG markers not supported by the nvjpeg library.
Starting with CUDA Exif orientation information is not available in the bitstream. Decoded output should be rotated degrees. Decoded output should be rotated 90 degrees counter-clockwise. Decoded output should be rotated degrees counter-clockwise. The numeric value corresponding to the specific libraryPropertyType requested.
Device memory allocator. The library handle. Pinned host memory allocator. The library handle to release. Device memory padding to use for all further device memory allocations. Device memory padding that is currently used for device memory allocations. Pinned host memory padding to use for all further pinned host memory allocations. Pinned host memory padding that is currently used for pinned host memory allocations.
The image state handle. Library handle. Decoder state handle. Decoder handle. Bit stream meta-data. Decoder output configuration. Bitstream handle. Size in bytes of the pinned buffer. Pointer to the pinned buffer. Device buffer size in bytes. Pointer to the device buffer. The Red Kayak and Cactus sequences include significant chaotic and circular motion, respectively.
NVENC shows a clear advantage over libx in these scenes which contain complex inter-predicition, as shown on figures 7 and 8. Notice how the Tesla T4 is more effective at high resolutions, offering one dB better visual quality at the same bitrate. Turing GPUs come equipped with powerful NVENC video encoding units which delivers higher video compression efficiency compared to sophisticated software encoders like libx, due to the combination of higher performance and lower energy consumption.
The T4 encodes 22 p streams, simultaneously in High Quality mode. This equates to almost double that of libx at equal visual quality level. Running in low-latency mode shows an even larger advantage for the T4. It can encode 37 streams at p resolution, in p, and streams in Ultra HD, which is You can see watts per stream charts in figures 15 and The Tesla also shows great power efficiency, outperforming libx x in High Quality mode and up to 5x in Low Latency mode while keeping the CPU load low.
It shows the same or better visual quality compared to software encoders like libx in High Quality mode while outperforming them in Low Latency mode. This equates to twice the performance at x lower power consumption. Watch now. Developer Blog Subscribe. It works only on bit Windows. It works on bit and bit Mac OS. It works only on bit Mac OS. Be careful when you install the software and disable addons that you don't want!
It may not contain the latest versions. Our hosted tools are virus and malware scanned with several antivirus programs using www. Rating Rating from Latest tool updates. DVDFab Passkey 9. NotEnoughAV1Encodes 2. DVDFab K-Lite Codec Pack Standard Video Thumbnails Make Recent DVD Hacks.
Toshiba SDJ. Pioneer DVAV. LG BP
0コメント