/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocjpeg/checkouts/develop/projects/rocjpeg/api/rocjpeg/rocjpeg.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocjpeg/checkouts/develop/projects/rocjpeg/api/rocjpeg/rocjpeg.h File Reference#

3 min read time

Applies to Linux

rocJPEG: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocjpeg/checkouts/develop/projects/rocjpeg/api/rocjpeg/rocjpeg.h File Reference
rocjpeg.h File Reference

The AMD rocJPEG Library. More...

#include "hip/hip_runtime.h"

Go to the source code of this file.

Classes

struct  RocJpegImage
 Structure representing a JPEG image. More...
 
struct  RocJpegDecodeParams
 Structure containing parameters for JPEG decoding. More...
 

Macros

#define ROCJPEGAPI
 
#define ROCJPEG_MAX_COMPONENT   4
 

Typedefs

typedef void * RocJpegStreamHandle
 A handle representing a RocJpegStream instance. More...
 
typedef void * RocJpegHandle
 A handle representing a RocJpeg instance. More...
 

Enumerations

enum  RocJpegStatus {
  ROCJPEG_STATUS_SUCCESS = 0 , ROCJPEG_STATUS_NOT_INITIALIZED = -1 , ROCJPEG_STATUS_INVALID_PARAMETER = -2 , ROCJPEG_STATUS_BAD_JPEG = -3 ,
  ROCJPEG_STATUS_JPEG_NOT_SUPPORTED = -4 , ROCJPEG_STATUS_OUTOF_MEMORY = -5 , ROCJPEG_STATUS_EXECUTION_FAILED = -6 , ROCJPEG_STATUS_ARCH_MISMATCH = -7 ,
  ROCJPEG_STATUS_INTERNAL_ERROR = -8 , ROCJPEG_STATUS_IMPLEMENTATION_NOT_SUPPORTED = -9 , ROCJPEG_STATUS_HW_JPEG_DECODER_NOT_SUPPORTED = -10 , ROCJPEG_STATUS_RUNTIME_ERROR = -11 ,
  ROCJPEG_STATUS_NOT_IMPLEMENTED = -12 , ROCJPEG_STATUS_MAX_VALUE = -13
}
 Enumeration representing the status codes for the rocJPEG library. More...
 
enum  RocJpegChromaSubsampling {
  ROCJPEG_CSS_444 = 0 , ROCJPEG_CSS_440 = 1 , ROCJPEG_CSS_422 = 2 , ROCJPEG_CSS_420 = 3 ,
  ROCJPEG_CSS_411 = 4 , ROCJPEG_CSS_400 = 5 , ROCJPEG_CSS_UNKNOWN = -1
}
 Enum representing the chroma subsampling options for JPEG encoding/decoding. More...
 
enum  RocJpegOutputFormat {
  ROCJPEG_OUTPUT_NATIVE = 0 , ROCJPEG_OUTPUT_YUV_PLANAR = 1 , ROCJPEG_OUTPUT_Y = 2 , ROCJPEG_OUTPUT_RGB = 3 ,
  ROCJPEG_OUTPUT_RGB_PLANAR = 4 , ROCJPEG_OUTPUT_FORMAT_MAX = 5
}
 Enum representing the output format options for the RocJpegImage. More...
 
enum  RocJpegBackend { ROCJPEG_BACKEND_HARDWARE = 0 , ROCJPEG_BACKEND_HYBRID = 1 }
 The backend options for the rocJpeg library. More...
 

Functions

RocJpegStatus ROCJPEGAPI rocJpegStreamCreate (RocJpegStreamHandle *jpeg_stream_handle)
 Creates a RocJpegStreamHandle for JPEG stream processing. More...
 
RocJpegStatus ROCJPEGAPI rocJpegStreamParse (const unsigned char *data, size_t length, RocJpegStreamHandle jpeg_stream_handle)
 Parses a JPEG stream. More...
 
RocJpegStatus ROCJPEGAPI rocJpegStreamDestroy (RocJpegStreamHandle jpeg_stream_handle)
 Destroys a RocJpegStreamHandle object and releases associated resources. More...
 
RocJpegStatus ROCJPEGAPI rocJpegCreate (RocJpegBackend backend, int device_id, RocJpegHandle *handle)
 Creates a RocJpegHandle for JPEG decoding. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDestroy (RocJpegHandle handle)
 Destroys a RocJpegHandle object. More...
 
RocJpegStatus ROCJPEGAPI rocJpegGetImageInfo (RocJpegHandle handle, RocJpegStreamHandle jpeg_stream_handle, uint8_t *num_components, RocJpegChromaSubsampling *subsampling, uint32_t *widths, uint32_t *heights)
 Retrieves information about the JPEG image. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecode (RocJpegHandle handle, RocJpegStreamHandle jpeg_stream_handle, const RocJpegDecodeParams *decode_params, RocJpegImage *destination)
 Decodes a JPEG image using the rocJPEG library. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecodeBatched (RocJpegHandle handle, RocJpegStreamHandle *jpeg_stream_handles, int batch_size, const RocJpegDecodeParams *decode_params, RocJpegImage *destinations)
 Decodes a batch of JPEG images using the rocJPEG library. More...
 
const char *ROCJPEGAPI rocJpegGetErrorName (RocJpegStatus rocjpeg_status)
 Retrieves the name of the error associated with the given RocJpegStatus. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecodeAsync (RocJpegHandle handle, RocJpegStreamHandle jpeg_stream_handle, const RocJpegDecodeParams *decode_params, RocJpegImage *destination)
 Submits a JPEG decode operation without waiting for the output. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecodeSync (RocJpegHandle handle, RocJpegImage *destination)
 Synchronizes a pending asynchronous JPEG decode and retrieves the decoded output. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecodeBatchedAsync (RocJpegHandle handle, RocJpegStreamHandle *jpeg_stream_handles, int batch_size, const RocJpegDecodeParams *decode_params, RocJpegImage *destinations)
 Submits a batch of JPEG decode operations without waiting for the output. More...
 
RocJpegStatus ROCJPEGAPI rocJpegDecodeBatchedSync (RocJpegHandle handle, RocJpegImage *destinations, int batch_size)
 Synchronizes a pending asynchronous batched JPEG decode and retrieves the decoded output. More...
 

Detailed Description

The AMD rocJPEG Library.

Typedef Documentation

◆ RocJpegHandle

typedef void* RocJpegHandle

A handle representing a RocJpeg instance.

The RocJpegHandle is a pointer type used to represent a RocJpeg instance. It is used as a handle to perform various operations on the rocJpeg library.

◆ RocJpegStreamHandle

typedef void* RocJpegStreamHandle

A handle representing a RocJpegStream instance.

The RocJpegStreamHandle is a pointer type used to represent a RocJpegStream instance. It is used as a handle to parse and store various parameters from a JPEG stream.