15 #ifndef _NVMEDIA_IJPE_H 
   16 #define _NVMEDIA_IJPE_H 
   35 #define NVMEDIA_IJPE_VERSION_MAJOR   1 
   37 #define NVMEDIA_IJPE_VERSION_MINOR   3 
   43 #define NVMEDIA_JPEG_ENC_FLAG_NONE                      (0 << 0) 
   50 #define NVMEDIA_JPEG_ENC_FLAG_SKIP_SOI                  (1 << 0) 
   56 #define NVMEDIA_IMAGE_JPEG_ATTRIBUTE_QUALITY            (1 << 0) 
   61 #define NVMEDIA_IMAGE_JPEG_ATTRIBUTE_RESTARTINTERVAL    (1 << 1) 
   66 #define NVMEDIA_IMAGE_JPEG_ATTRIBUTE_TARGETSIZE         (1 << 2) 
   71 #define NVMEDIA_IMAGE_JPEG_ATTRIBUTE_QUANTTABLE         (1 << 3) 
   76 #define NVMEDIA_IMAGE_JPEG_ATTRIBUTE_HUFFTABLE          (1 << 4) 
  107    uint8_t lumaQuant[64];
 
  111    uint8_t chromaQuant[64];
 
  187     uint8_t maxOutputBuffering,
 
  188     uint32_t  maxBitstreamBytes
 
  277     uint8_t *chromaQuant,
 
  278     uint32_t targetImageSize
 
  297     uint32_t attributeMask,
 
  368     uint32_t numBitstreamBuffers,
 
  420     uint32_t *numBytesAvailable,
 
  422     uint32_t millisecondTimeout
 
#define NvMediaSurfaceType
Defines the set of NvMedia surface types. 
 
NvMediaIJPE * NvMediaIJPECreate(NvMediaDevice *device, NvMediaSurfaceType inputFormat, uint8_t maxOutputBuffering, uint32_t maxBitstreamBytes)
Creates a JPEG encoder object capable of turning a stream of surfaces of the inputFormat into a JPEG ...
 
NvMediaStatus NvMediaIJPEGetVersion(NvMediaVersion *version)
Gets the version compatibility for the NvMedia IJPE library. 
 
NvMediaStatus NvMediaIJPESetAttributes(NvMediaIJPE *encoder, uint32_t attributeMask, void *attributes)
Sets the JPEG encoder attributes. 
 
NvMediaStatus NvMediaIJPEFeedFrame(NvMediaIJPE *encoder, NvMediaImage *frame, uint8_t quality)
Encodes the specified frame with input quality. 
 
NvMediaStatus
The set of all possible error codes. 
 
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
 
NvMediaStatus NvMediaIJPEGetBits(NvMediaIJPE *encoder, uint32_t *numBytes, void *buffer, uint32_t flags)
Returns a frame's worth of bitstream into the provided buffer. 
 
void NvMediaIJPEDestroy(NvMediaIJPE *encoder)
Destroys an NvMedia image JPEG encoder. 
 
void NvMediaDevice
An opaque handle representing a NvMediaDevice object. 
 
NvMediaStatus NvMediaIJPEFeedFrameQuant(NvMediaIJPE *encoder, NvMediaImage *frame, uint8_t *lumaQuant, uint8_t *chromaQuant)
Encodes the specified frame with input Luma and Chroma quant tables. 
 
NvMediaStatus NvMediaIJPEGetBitsEx(NvMediaIJPE *encoder, uint32_t *numBytes, uint32_t numBitstreamBuffers, const NvMediaBitstreamBuffer *bitstreams, uint32_t flags)
Performs the same operation as NvMediaIJPEGetBits() except NvMediaIJPEGetBitsEx() consumes an array o...
 
NvMediaStatus NvMediaIJPEBitsAvailable(NvMediaIJPE *encoder, uint32_t *numBytesAvailable, NvMediaBlockingType blockingType, uint32_t millisecondTimeout)
Returns the encode status and number of bytes available for the next frame (if any). 
 
NvMediaBlockingType
Blocking type. 
 
NvMediaStatus NvMediaIJPEFeedFrameRateControl(NvMediaIJPE *encoder, NvMediaImage *frame, uint8_t *lumaQuant, uint8_t *chromaQuant, uint32_t targetImageSize)
Encodes the specified frame with input Luma and Chroma quant tables and targetImageSize.