Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed various minor typos. #347

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions include/vvenc/vvenc.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,26 @@ enum ErrorCodes
VVENC_ERR_UNSPECIFIED = -1, // unspecified malfunction
VVENC_ERR_INITIALIZE = -2, // encoder not initialized or tried to initialize multiple times
VVENC_ERR_ALLOCATE = -3, // internal allocation error
VVENC_NOT_ENOUGH_MEM = -5, // allocated memory to small to receive encoded data. After allocating sufficient memory the failed call can be repeated.
VVENC_NOT_ENOUGH_MEM = -5, // allocated memory too small to receive encoded data. After allocating sufficient memory the failed call can be repeated.
VVENC_ERR_PARAMETER = -7, // inconsistent or invalid parameters
VVENC_ERR_NOT_SUPPORTED = -10, // unsupported request
VVENC_ERR_RESTART_REQUIRED = -11, // encoder requires restart
VVENC_ERR_CPU = -30 // unsupported CPU SSE 4.1 needed
};

/*
The struct vvencYUVPlane contains the data of an plane of an uncompressed input picture.
The struct vvencYUVPlane contains the data of a plane of an uncompressed input picture.
*/
typedef struct vvencYUVPlane
{
int16_t* ptr; // pointer to plane buffer
int width; // width of the plane
int height; // height of the plane
int stride; // stride (width + left margin + right margins) of plane in samples
int stride; // stride (width + left margin + right margin) of plane in samples
}vvencYUVPlane;

/*
The struct vvencYUVBuffer contains the data and attributes to hand over the uncompressed input picture and metadata related to picture.
The struct vvencYUVBuffer contains the data and attributes to hand over the uncompressed input picture and metadata related to the picture.
*/
typedef struct vvencYUVBuffer
{
Expand Down Expand Up @@ -175,7 +175,7 @@ VVENC_DECL void vvenc_YUVBuffer_free_buffer( vvencYUVBuffer *yuvBuffer );
The structure contains buffer and size information of the compressed payload as well as timing, access and debug information.
The smallest output unit of VVC encoders are NalUnits. A set of NalUnits that belong to the same access unit are delivered in a continuous bitstream,
where the NalUnits are separated by three byte start codes.
The Buffer to retrieve the compressed video chunks has to be allocated by the caller. The related attribute BufSize
The buffer (payload) to retrieve the compressed video chunks has to be allocated by the caller. The related attribute payloadSize must be set to the size of the buffer by the caller.
*/
typedef struct vvencAccessUnit
{
Expand All @@ -199,33 +199,33 @@ typedef struct vvencAccessUnit
} vvencAccessUnit;

/* vvenc_accessUnit_alloc:
Allocates an vvencAccessUnit instance.
Allocates a vvencAccessUnit instance.
The returned accessUnit is set to default values.
The payload memory must be allocated seperately by using vvenc_accessUnit_alloc_payload.
To free the memory use vvencAccessUnit_free.
To free the memory use vvenc_accessUnit_free.
*/
VVENC_DECL vvencAccessUnit* vvenc_accessUnit_alloc( void );

/* vvdec_accessUnit_free:
release storage of an vvdecAccessUnit instance.
release storage of a vvdecAccessUnit instance.
The payload memory is also released if not done yet.
*/
VVENC_DECL void vvenc_accessUnit_free(vvencAccessUnit *accessUnit, bool freePayload );

/* vvenc_accessUnit_alloc_payload:
Allocates the memory for an accessUnit payload.
To free the memory use vvdecAccessUnit_free_payload.
Allocates the memory for a vvencAccessUnit payload.
To free the memory use vvenc_accessUnit_free_payload.
When the vvencAccessUnit memory is released the payload memory is also released.
*/
VVENC_DECL void vvenc_accessUnit_alloc_payload(vvencAccessUnit *accessUnit, int payload_size );

/* vvenc_accessUnit_free_payload:
release storage of the payload in an vvencAccessUnit instance.
release storage of the payload in a vvencAccessUnit instance.
*/
VVENC_DECL void vvenc_accessUnit_free_payload(vvencAccessUnit *accessUnit );

/* vvenc_accessUnit_reset:
resets vvdencAccessUnit structure to its default values. payload data will not be resetted.
resets vvencAccessUnit structure to its default values. payload data will not be reset.
*/
VVENC_DECL void vvenc_accessUnit_reset(vvencAccessUnit *accessUnit );

Expand Down Expand Up @@ -253,8 +253,8 @@ VVENC_DECL vvencEncoder* vvenc_encoder_create( void );
This method initializes the encoder instance.
This method is used to initially set up the encoder with the assigned encoder parameter struct.
The method fails if the encoder is already initialized or if the assigned parameter struct
does not pass the consistency check. Other possibilities for an unsuccessful call are missing encoder license, or an machine with
insufficient CPU-capabilities.
does not pass the consistency check. Other possibilities for an unsuccessful call are missing encoder license, or a machine with
insufficient CPU capabilities.
\param[in] vvencEncoder pointer to opaque handler.
\param[in] vvenc_config* pointer to vvenc_config struct that holds initial encoder parameters.
\retval int if non-zero an error occurred (see ErrorCodes), otherwise the return value indicates success VVENC_OK
Expand Down Expand Up @@ -299,14 +299,14 @@ VVENC_DECL int vvenc_init_pass( vvencEncoder *, int pass, const char * statsFNam

/* vvenc_encode
This method encodes a picture.
Uncompressed input pictures are passed to the encoder in display order. A compressed bitstream chunks is returned by filling the assigned AccessUnit struct.
Data in AcccessUnit struct are valid if the encoder call returns success and the UsedSize attribute is non-zero.
If the input parameter pcInputPicture is NULL, the encoder just returns a pending bitstream chunk if available.
If the call returns VVENC_NOT_ENOUGH_MEM, the BufSize attribute in AccessUnit struct indicates that the buffer is to small to retrieve the compressed data waiting for delivery.
Uncompressed input pictures are passed to the encoder in display order. A compressed bitstream chunk is returned by filling the assigned AccessUnit struct.
Data in AcccessUnit struct is valid if the encoder call returns success and the UsedSize attribute is non-zero.
If the input parameter YUVBuffer is NULL, the encoder just returns a pending bitstream chunk if available.
If the call returns VVENC_NOT_ENOUGH_MEM, the payloadSize attribute in AccessUnit struct indicates that the buffer is to small to retrieve the compressed data waiting for delivery.
In this case the UsedSize attribute returns the minimum buffersize required to fetch the pending chunk. After allocating sufficient memory the encoder can retry the last call with the parameter pcInputPicture set to NULL to prevent encoding the last picture twice.
\param[in] vvencEncoder pointer to opaque handler
\param[in] pcYUVBuffer pointer to vvencYUVBuffer structure containing uncompressed picture data and meta information, to flush the encoder YUVBuffer must be NULL.
\param[out] accessUnit pointer to vvencAccessUnit that retrieves compressed access units and side information, data are valid if UsedSize attribute is non-zero and the call was successful.
\param[out] accessUnit pointer to vvencAccessUnit that retrieves compressed access units and side information, data is valid if UsedSize attribute is non-zero and the call was successful.
\param[out] encodeDone pointer to flag that indicates that the encoder completed the last frame after flushing.
\retval int if non-zero an error occurred, otherwise the retval indicates success VVENC_OK
\pre The encoder has to be initialized successfully.
Expand All @@ -317,7 +317,7 @@ VVENC_DECL int vvenc_encode( vvencEncoder *, vvencYUVBuffer* YUVBuffer, vvencAcc
This method fetches the current encoder configuration.
The method fails if the encoder is not initialized.
\param[in] vvencEncoder pointer to opaque handler
\param[in] vvenc_config reference to an vvenc_config struct that returns the current encoder setup.
\param[in] vvenc_config reference to a vvenc_config struct that returns the current encoder setup.
\retval int VVENC_ERR_INITIALIZE indicates the encoder was not successfully initialized in advance, otherwise the return value VVENC_OK indicates success.
\pre The encoder has to be initialized.
*/
Expand All @@ -328,7 +328,7 @@ VVENC_DECL int vvenc_get_config( vvencEncoder *,vvenc_config * );
This method is used to change encoder settings during the encoding process when the encoder was already initialized.
Some parameter changes might require an internal encoder restart, especially when previously used parameter sets VPS, SPS or PPS
become invalid after the parameter change. If changes are limited to TargetBitRate or QP changes then the encoder continues encoding
without interruption, using the new parameters. Some parameters e.g. NumTheads are not reconfigurable - in this case the encoder returns an Error.
without interruption, using the new parameters. Some parameters e.g. NumTheads, are not reconfigurable - in this case the encoder returns an Error.
The method fails if the encoder is not initialized or if the assigned parameter set given in vvenc_config struct
does not pass the consistency and parameter check.
\param[in] vvencEncoder pointer to opaque handler
Expand Down Expand Up @@ -416,7 +416,7 @@ VVENC_DECL int vvenc_set_logging_callback( void * ctx, vvencLoggingCallback call
VVENC_DECL const char* vvenc_get_compile_info_string( void );

/* vvenc_set_SIMD_extension
tries to set given simd extensions used. if not supported by cpu, highest possible extension level will be set and returned.
tries to set given simd extensions used. if not supported by CPU, highest possible extension level will be set and returned.
\param const char* simdId: empty string to set highest possible extension, otherwise set simd extension
\retval[ ] const char* current simd exentsion
*/
Expand All @@ -427,15 +427,15 @@ VVENC_DECL const char* vvenc_set_SIMD_extension( const char* simdId );
\param chFmt Chroma Format
\param frameWidth width
\param compId component ID
\retval[ ] width of compontent
\retval[ ] width of component
*/
VVENC_DECL int vvenc_get_width_of_component( const vvencChromaFormat chFmt, const int frameWidth, const int compId );

/* vvenc_get_height_of_component
\param chFmt Chroma Format
\param frameHeight
\param compId component ID
\retval[ ] height of compontent
\retval[ ] height of component
*/
VVENC_DECL int vvenc_get_height_of_component( const vvencChromaFormat chFmt, const int frameHeight, const int compId );

Expand Down