[Mp4-tech] [H.264] A question about the scaling list syntax
Tan Rui -- Huawei
tanrui huawei.com
Sat Sep 30 17:38:51 EDT 2006
Hi, all experts, when I read the protocol about the seq_scaling_matrix_present_flag, I find some questions as the following:
seq_scaling_matrix_present_flag equal to 1 specifies that the flags seq_scaling_list_present_flag[ i ] for i = 0..7 are
present. seq_scaling_matrix_present_flag equal to 0 specifies that these flags are not present and the sequence-level
scaling list specified by Flat_4x4_16 shall be inferred for i = 0..5 and the sequence-level scaling list specified by
Flat_8x8_16 shall be inferred for i = 6..7. When seq_scaling_matrix_present_flag is not present, it shall be inferred to
be equal to 0.
The scaling lists Flat_4x4_16 and Flat_8x8_16 are specified as follows:
Flat_4x4_16[ i ] = 16, with i = 0..15, ( 7-6)
Flat_8x8_16[ i ] = 16, with i = 0..63. ( 7-7)
[ Question : In the first paragraph, we can get the following understanding:
for(i=0; i<16; i++) {
if seq_scaling_list_present_flag[i] == 1 {
if(i<6) {
//According to each seq_scaling_list_present_flag,
//There will be 16 scaling list elements, i.e.,
//Flat_4x4_16[i], with i = 0..15.
//In the end, there will be 6x16=96 Flat_4x4_16 elements for all. Is that true?
}
else {
//There will be 64 scaling list elements, i.e.,
//Flat_8x8_16[i], with i = 0..63
}
}
else {
//There will not be any Flat_8x8_16 and Flat_4x4_16 elements.
}
}
But I can not find any further usage of the Flat_4x4_16 and Flat_8x8_16. Can you give me some clue?
By the way, I find some syntax comments in the 7.3.2.1.1 just like the following:
scaling_list( scalingList, sizeOfScalingList, useDefaultScalingMatrixFlag ) {
lastScale = 8
nextScale = 8
for( j = 0; j < sizeOfScalingList; j++ ) {
if( nextScale != 0 ) {
delta_scale
nextScale = ( lastScale + delta_scale + 256 ) % 256
useDefaultScalingMatrixFlag = ( j = = 0 && nextScale = = 0 )
}
scalingList[ j ] = ( nextScale = = 0 ) ? lastScale : nextScale
lastScale = scalingList[ j ]
}
}
I wonder that the assignment for the useDefaultScalingMatrixFlag variable. It mean that when i==0 and nextScale==0,
the useDefaultScalingMatrixFlag will be 1, doesn't it? When useDefaultScalingMatrixFlag is equal to 1, which scaling
list variable will use the default value? I can not find any assignments in the protocol.
]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20060930/124066dd/attachment.html
More information about the Mp4-tech
mailing list