Hello All,
I am implementing the JPEG encoding and everything looks fine. But, I want to know the ARR_HDR_SIZE in uic samples
#include <stdlib.h>
#include <etxt.h>
#include "uic_new.h"
using namespace UIC;
static const unsigned int ARR_HDR_SIZE = 32;
void* UIC::ArrAlloc (Ipp32u itemSize, Ipp32u nOfItems)
{
void *buff = malloc(itemSize * nOfItems + ARR_HDR_SIZE);
unsigned int *countOf = (unsigned int*)buff;
*countOf = nOfItems;
return ((Etxt_DText)buff) + ARR_HDR_SIZE;
}
void UIC::ArrFree (const void* arr)
{
Etxt_DText tmp = (Etxt_DText) arr;
tmp -= ARR_HDR_SIZE;
free(tmp);
}
Ipp32u UIC::ArrCountOf(const void* arr)
{
Etxt_DText tmp = (Etxt_DText) arr;
tmp -= ARR_HDR_SIZE;
return *((unsigned int *)tmp );
}
in the above code what is the ARR_HDR_SIZE and what it represents?.
could you anyone help me.
Regards,
sathish