rudyb
11th November 2014, 03:12
Hi,
I noticed that in one CTU in HM model, the context Model never gets reset. But I am not sure why this is the case, and it doesn't really make sense. And I would explain why it doesn't make sense to me.
Let's say that I am done with one CTU, and all my context model is currently at State-A.
Let's say that I move to the next CTU, and that I am in the first quad tree level that my CU size is 32x32. So, there are two stage computations:
first stage:
1. CU size = 32x32
TU size = 32x32
So, I agree that I would need to serially compute the bin's probability and update the context model. To me this makes sense that I have to start with Context model at State-A, and after this stage this my context model is updated to State-B.
After this stage, then I go to the next stage:
2. CU size = 32x32
TU size = 16x16
It even makes sense here to continue using and updating the same context model that we used in stage one. So, we start with context model at State-B, and after this stage, the context model becomes State-C
Now, let's say that I am done with this level of CU break down, and I move to the next level of CU, which is CU of size 16x16
Here is what doesn't make sense to me in the code. According to the HM code, when it wants to compute this stage (which is CU size of 16x16 and TU size of 16x16), the code starts with context model at State-C !!!
I would think it makes lot more sense to start with context model back at State-A again.
The reason is that when let's say it is signaled in the encoder that this particular CTU should go down to CU size of 16x16, then I am assuming the decoder will go straight to CU size of 16x16, rather than bother computing CU/TU at size 32x32, and then computing CU at 16x16.
But the way that the code uses the context model currently, I am afraid that is how it should be happening in the decoder. Because we would need the context model at CU size of 32x32 to use it for CU size of 16x16.
That is why I am thinking it makes more sense that once we move to a CU size of 16x16, then we should start our CABAC context model at a state that was last updated in the previous CTU.
Please provide your thoughts on this.
Thanks,
--Rudy
I noticed that in one CTU in HM model, the context Model never gets reset. But I am not sure why this is the case, and it doesn't really make sense. And I would explain why it doesn't make sense to me.
Let's say that I am done with one CTU, and all my context model is currently at State-A.
Let's say that I move to the next CTU, and that I am in the first quad tree level that my CU size is 32x32. So, there are two stage computations:
first stage:
1. CU size = 32x32
TU size = 32x32
So, I agree that I would need to serially compute the bin's probability and update the context model. To me this makes sense that I have to start with Context model at State-A, and after this stage this my context model is updated to State-B.
After this stage, then I go to the next stage:
2. CU size = 32x32
TU size = 16x16
It even makes sense here to continue using and updating the same context model that we used in stage one. So, we start with context model at State-B, and after this stage, the context model becomes State-C
Now, let's say that I am done with this level of CU break down, and I move to the next level of CU, which is CU of size 16x16
Here is what doesn't make sense to me in the code. According to the HM code, when it wants to compute this stage (which is CU size of 16x16 and TU size of 16x16), the code starts with context model at State-C !!!
I would think it makes lot more sense to start with context model back at State-A again.
The reason is that when let's say it is signaled in the encoder that this particular CTU should go down to CU size of 16x16, then I am assuming the decoder will go straight to CU size of 16x16, rather than bother computing CU/TU at size 32x32, and then computing CU at 16x16.
But the way that the code uses the context model currently, I am afraid that is how it should be happening in the decoder. Because we would need the context model at CU size of 32x32 to use it for CU size of 16x16.
That is why I am thinking it makes more sense that once we move to a CU size of 16x16, then we should start our CABAC context model at a state that was last updated in the previous CTU.
Please provide your thoughts on this.
Thanks,
--Rudy