Question

I need to use I_PCM mode in all blocks for some of I frames in video being compressed using x264. I know those frames will take a huge amount of space, but it is a requirement to keep them as faithful to the source as possible and to make them very fast to encode / decode (I_PCM should be super fast and lossless). Is there a way to force x264 to programatically do this. I am using libx264 to do this, but I haven't found a way to specify custom macroblock type within a given frame. If it is not supported, how hard would it be to modify the library to do so and where should I look at first?

Was it helpful?

Solution

libx264 API doesn't allow you to specify custom macroblock types for frame. As for I_PCM macroblocks libx264 use them very rarely (and don't use at all with non zero --psy-rd). If you want to force libx264 to use I_PCM you will need to force choosing of I_PCM in x264_macroblock_analyse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top