I'm going to use NvTranscoder to change certain areas of QP.


I’m currently analyzing the qpDeltaMapArray values in NVENCSTATUS CNvHWEncoder::NvEncEncodeFrame(…) in NvTranscoder.

I set it up as follows.

NVENCSTATUS CNvHWEncoder::NvEncEncodeFrame(EncodeBuffer *pEncodeBuffer, NvEncPictureCommand *encPicCommand,
uint32_t width, uint32_t height, NV_ENC_PIC_STRUCT ePicStruct,
int8_t *qpDeltaMapArray, uint32_t qpDeltaMapArraySize,

qpDeltaMapArraySize = ((width) * (height)) / (int)(31.98 * 31.98);
qpDeltaMapArray = new int8_t[qpDeltaMapArraySize];


memset((int8_t*)qpDeltaMapArray, -28, qpDeltaMapArraySize/2 );


However, I would like to set the qp value separately for each tile.

For example, if you cut the entire input size 4, I’d like to change the QP value of each region.

I’d appreciate it if you could help me decide what to do.

Thank you.

QP delta map only allows you to specify the delta from the rate-control-determined QP value, and NOT the absolute QP value for each macroblock.

The final encoding QP for each macroblock is calculated as: QP decided by the rate control algorithm + QP delta for that macroblock

You can specify the delta map for the entire frame in whatever way you want.

If you want to divide the picture into 4 regions, then you can assign a separate QP delta for macroblocks in each region, if so desired.