1

i'm a graduate student currently working on extending modern image and video compression codecs to achieve better performance. I'm currently working on modifying BPG(Better Portable Graphics) and x265 (an HEVC/H.265 implementation).

My current approach involves adding additional intra-prediction modes that can make use of greater amount of information than just 1 pixel row from the CTU (Coding Tree Unit) above and 1 pixel column from the CTU to the left.

I have implemented my approach and named my intra-prediction mode as "35" (BPG and hevc use modes from 0-34). My current approach requires me to store two additional numbers (12 bits) each every time I make use of my intra-prediction mode. I am facing problems in embedding these two numbers in the bitstream(encoding) and in retrieving them from the bitstream(decoding).

I modified the function codeIntraDirLumaAng in entropy.cpp from the x265 package that is provided with BPG so that it writes the two additional numbers when it encounters my new intra-prediction mode 35.

My set of questions are as follows.

1) Given that I have a greater number of prediction modes, and I expect them to increase even more, should I modify the following line of code

encodeBinsEP(dir[j], 5); 

to be

encodeBinsEP(dir[j], 6);

2) When i run the decoder, the first time it encounters an instance of where it should have stored mode 35. It is unable to read it, it reads mode 26 instead. I believe this is because of the derivation procedure for Intra-Luma Pred-Dir in the hevc? (Any input on how to correctly embed my new intra-prediction mode in the bitstream so that it can be read correctly)?

3) Should i be doing something with the CABAC states for the two additional numbers that i encode? I created an additional context for handling this new kind of information. I would appreciate pointers on how to set the value of a NUM_STATES_CTX variable that i defined in addition and how to use CABAC to best encode these two numbers?

  • Posting a clarification: If someone is familiar with the internal workings of libbpg or x265 can you please tell me where in code is the number of bits needed to code intra angular prediction direction specified. I want to set it to 6 instead of 5. With 5 bits you can code 0-34 with the derivation from section 8.4.1 of the HEVC codec, but you cannot code mode 35. Also, how do i get the decoder to read the 12-bit numbers? – Mohammad Haris Baig Aug 09 '16 at 16:44

0 Answers0