It seems there is a bug while encoding chroma components in the H.264 encoder.
The function H264CoreEncoder_EncodeChroma encode in one shot both the U and V components. It starts with the U and upon reaching the first block of the V components switch pointers to the V plane. However, the condition to switch components doesn't seem right and upon reaching block 2 of the V components the U pointer are used again.
Emmanuel
Link Copied
Emmanuel, the "do" loop has only 2 iterations, so that uBlock is first U (==16) at first and then firstV (==16+num_blocks[chroma]) at second time. There are few different block loops inside do{}, like
for (uBlock = startBlock; uBlock < uLastBlock; uBlock ++)
Regards,
Leonid
Emmanuel, the "do" loop has only 2 iterations, so that uBlock is first U (==16) at first and then firstV (==16+num_blocks[chroma]) at second time. There are few different block loops inside do{}, like
for (uBlock = startBlock; uBlock < uLastBlock; uBlock ++)
Regards,
Leonid
For more complete information about compiler optimizations, see our Optimization Notice.