EncodeCoeffsCAVLC_H264

Calculates characteristics of 4X4 block for CAVLC encoding.

Syntax

IppStatus ippiEncodeCoeffsCAVLC_H264_16s(const Ipp16s* pSrc, Ipp8u AC, const Ipp32u* pScanMatrix, Ipp8u Count, Ipp8u* Traling_One, Ipp8u* Traling_One_Signs, Ipp8u* NumOutCoeffs, Ipp8u* TotalZeros, Ipp16s* pLevels, Ipp8u* pRuns);

Parameters

pSrc

Pointer to 4x4 block - array of size 16.

AC

Flag that is equal to zero in the cases when zero coefficient should be encoded, and is equal to one otherwise.

pScanMatrix

Scan matrix for the coefficients in block (array of size 16).

Count

Position of the last non-zero block coefficient in the order of scan matrix. It should be in range [AC; 15].

Traling_One

The number of “trailing ones” transform coefficient levels in a range [0;3]. This value is calculated by the function.

Traling_One_Signs

Code that describes signs of “trailing ones”. (Trailing_One -1 - i)-bit in this code corresponds to a sign of i-“trailing one” in the current block. In this code 1 indicates negative value, 0 - positive value. This value is calculated by the function.

NumOutCoeffs

The number of non-zero coefficients in block (including “trailing ones”). This value is calculated by the function.

TotalZeros

The number of zero coefficients in block (except “trailing zeros”). This value is calculated by the function.

pLevels

Pointer to an array of size 16 that contains non-zero quantized coefficients of the current block (except “trailing ones”) in reverse scan matrix order. Elements of this array are calculated by the function.

pRuns

Pointer to an array of size 16 that contains runs before non-zero quantized coefficients (including “trailing ones”) of the current block in reverse scan matrix order (except run before the first non-zero coefficient in block, which can be calculated using TotalZeros). Elements of this array are calculated by the function.

Description

The function ippiEncodeCoeffsCAVLC_H264_16s is declared in the ippvc.h file. This function calculates some characteristics (Trailing_One, Trailing_One_Signs, NumOutCoeffs, TotalZeros, pLevels, pRuns) of a 4x4 block for CAVLC encoding. See Figure "EncodeCoeffsCAVLC_H264 Operation" for an example of the function operation:

EncodeCoeffsCAVLC_H264 Operation



Count = 13.

Arrangement of Block Coefficients After Scanning



Trailing_One = 3 (-1, 1, 1) Trailing_One_Signs = 00000100 NumOutCoeffs = 7 TotalZeros = 6

Array of Runs Before Non-Zero Coefficients (Except First) in Reverse Order



Array of Non-Zero Coefficients (Except “Trailing Ones”) in Reverse Order



This function is used in the H.264 encoder included into Intel IPP Samples. See introduction to H.264.

Optimization Notice

The Intel® Integrated Performance Primitives (Intel® IPP) library contains functions that are more highly optimized for Intel microprocessors than for other microprocessors. While the functions in the Intel® IPP library offer optimizations for both Intel and Intel-compatible microprocessors, depending on your code and other factors, you will likely get extra performance on Intel microprocessors.

While the paragraph above describes the basic optimization approach for the Intel® IPP library as a whole, the library may or may not be optimized to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel® SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

Intel recommends that you evaluate other library products to determine which best meets your requirements.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if at least one of the specified pointers is NULL.

ippStsOutOfRangeErr

Indicates an error when Count is out of range [AC; 15].


Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.