mX) (grid_height_in_mbs_minus1[i]+1)/(1+field_pic_flag) (G-378) w[k]=Min( 16*(grid_width_in_mbs_minus1[i]+1),16*FrmWidthInMbs[i]-x[k]) (G-379) h[k]=Min( 16 *(grid_height_in_mbs_minus1[i]+1)/(1+field_pic_flag) 16 FrmHeightInMbs[i]/(1+field_pic_flag)-yk (G-380) All scalable layers with the same value of dependency_id[ for which scalability information is present in the scalability information SEI message and for which iroi_division_info_present_flag[i] is equal to 1 and iroi_grid_flag[ is equal to 1 shall have the same values of grid_width_in_mbs_minus1[i) and grid_height_in_mbs_minus1[i] num_rois_minus1[ plus 1 indicates the number of IROIs for the current scalable layer. Depending on the primary coded VCL NAL units of the current scalable layer, the following applies: If frame_mbs_only_flag is equal to 1 for all primary coded VCL NAL units of the current scalable layer, the value of num_rois_minus1[i] shall be in the range of 0 to FrmSizeInMbs[ - inclusive. Otherwise (frame_mbs_only_flag is equal to 0 for any primary coded VCL NAL unit of the current scalable layer), the value of num_rois_minus1[ shall be in the range of 0 to FrmSizeInMbs[ - inclusive. All scalable layers with the same value of dependency_id| for which scalability information is present in the scalability information SEI message and for which iroi_division_info_present_flag[i is equal to 1 and iroi_grid_flag[ ] is equal to 0 shall have the same value of num_rois_minusl[i]. first_mb_in_roi[i][i]i indicates the macroblock address of the first macroblock in the j-th IROI for the current scalable layer. The value of first_mb_in_roi[i][j] shall be in the range of 0 to FrmSizeInMbs[ 1, inclusive. When j is greater than 0, the value of first mb in roiiTil shall not be equal to any of the values of with k=0..(j-1). The variables firstMbY and firstMbInROIFId are derived as Rec. ITU-T H.264 (01/2012) firstMbY first (first_mb_in_roi[i][j] % FrmWidthInMbs[i]) (G-381) firstMbInROIFId = ( firstMbY >> 1) +(first_mb_in_roi[i][j]%FrmWidthInMbs[i]) (G-382) When fr