Wei.M
Wei.M

Reputation: 51

Per macroblock encoding in libx264

I know that in x264 encoding, the process is going on with the unit of macroblock. However, is that possible to set the parameters for each macroblocks? For example, if I want to let the QP of some specific area to be smaller than others. Is that possible? If I need to modify the functions and Apis in libx264, where should I begin?

Upvotes: 1

Views: 1016

Answers (1)

nobody555
nobody555

Reputation: 2374

If the only thing you want to change per macroblock is QP than yes it is possible. And no, you don't need to change libx264 API for this. For such things like ROI (Region of Interest) there is quant_offsets in field in x264_image_properties_t struct (prop in x264_picture_t struct of pic_in for x264_encoder_encode call). You can read more how to use it in comments of x264.h

Upvotes: 2

Related Questions