File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -190,8 +190,25 @@ impl Residual {
190190// Figure 8-6 – Assignment of the indices of dcY to luma4x4BlkIdx
191191#[ inline]
192192pub const fn unscan_4x4 ( idx : usize ) -> ( /* row */ usize , /* column */ usize ) {
193- let p = macroblock:: get_4x4luma_block_location ( idx as u8 ) ;
194- ( p. y as usize / 4 , p. x as usize / 4 )
193+ match idx {
194+ 0 => ( 0 , 0 ) ,
195+ 1 => ( 0 , 1 ) ,
196+ 2 => ( 1 , 0 ) ,
197+ 3 => ( 1 , 1 ) ,
198+ 4 => ( 0 , 2 ) ,
199+ 5 => ( 0 , 3 ) ,
200+ 6 => ( 1 , 2 ) ,
201+ 7 => ( 1 , 3 ) ,
202+ 8 => ( 2 , 0 ) ,
203+ 9 => ( 2 , 1 ) ,
204+ 10 => ( 3 , 0 ) ,
205+ 11 => ( 3 , 1 ) ,
206+ 12 => ( 2 , 2 ) ,
207+ 13 => ( 2 , 3 ) ,
208+ 14 => ( 3 , 2 ) ,
209+ 15 => ( 3 , 3 ) ,
210+ _ => panic ! ( "Out of bounds unscan_4x4 index" ) ,
211+ }
195212}
196213
197214// Figure 8-7 – Assignment of the indices of dcC to chroma4x4BlkIdx
You can’t perform that action at this time.
0 commit comments