Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6818 Discussions

Incorrect explanation in documentation of BidirWeight_H264

eijit
Beginner
547 Views

HI,

The formula that is explained in the following URI seems to be incorrect.

http://software.intel.com/en-us/node/443698

The documentation says,

pDst[x, y] = Clip1c(((pSrc[x, y] * iWeight1 + pSrc2[x, y] * iWeight2 + 2^(ulog2wd - 1)) >> (ulog2wd + 1) + ((iOffset1 + iOffset2 + 1) >>2),

but the correct calculation is as follows:

pDst[x, y] = Clip1c((pSrc[x, y] * iWeight1 + pSrc2[x, y] * iWeight2 + 2^ulog2wd) >> (ulog2wd + 1) ++ ((iOffset1 + iOffset2 + 1) >>1)).

  • exponent part (ulog2wd - 1 -> ulog2wd)
  • shift value for offset (2 -> 1)
  • correspondence of parenthesis

Thanks,

Eijit

 

0 Kudos
1 Reply
Igor_A_Intel
Employee
547 Views

Hi Eijit,

you are right, the real formula used in the function is the next:

weighted_sample = ((((Ipp32s)pSrc1[xpos]*iWeight1 + (Ipp32s)pSrc2[xpos]*iWeight2 + (Ipp32s)(1<<ulog2wd))>>(ulog2wd+1))) + ((iOffset1 + iOffset2 + 1)>>1);

so it's just a misprint in the manual - thank you for catching this, will be fixed in the next version of the manual.

regards, Igor

0 Kudos
Reply