Log in

View Full Version : A problem in x264 about QP


Ahlucard
16th September 2009, 08:07
I want to change some Marcoblock's QP level in one frame, how to do that?

I change some MacroBlock's QP in x264_marcoblock_encode(),
but it warming that:
overflow, levelcode = xxxxx is only allow in high profile.

Only in high profile can use different QP in one frame, it that ture?

Dark Shikari
16th September 2009, 08:19
You lowered the QP so much that the encoder was unable to properly code the DCT coefficients. Don't use such a low QP with CAVLC.

Ahlucard
16th September 2009, 08:36
If i use QP+1 or QP-1 to replace the original QP in Marcoblock, it work.
But if i use QP+2 or more , it will be overflow.

If i just change the QP level in +1 or -1, the new encoded frame just seems almost the same with original encoded frame.
I want they seems more differene, so i must increase the gap in different MB's QP level.
How can i do?

Dark Shikari
16th September 2009, 08:39
If i use QP+1 or QP-1 to replace the original QP in Marcoblock, it work.
But if i use QP+2 or more , it will be overflow.If raising the QP is causing an overflow, you likely made a mistake in your code.

Specifically, changing the QP in macroblock_encode will obviously break things, because there are many things outside of macroblock_encode which depend on the QP, such as bitstream encoding and so forth. Furthermore, there's the chroma QP, which has to be re-derived as well.