@@ -1009,65 +1009,68 @@ pub fn get_intra_edges<T: Pixel>(
10091009
10101010impl PredictionMode {
10111011 pub fn predict_intra < T : Pixel > (
1012- self , dst : & mut PlaneRegionMut < ' _ , T > , tx_size : TxSize , bit_depth : usize ,
1012+ self , dst : & mut PlaneRegionMut < ' _ , T > , bo : BlockOffset , tx_size : TxSize , bit_depth : usize ,
10131013 ac : & [ i16 ] , alpha : i16 , edge_buf : & AlignedArray < [ T ; 4 * MAX_TX_SIZE + 1 ] >
10141014 ) {
10151015 assert ! ( self . is_intra( ) ) ;
10161016
10171017 match tx_size {
10181018 TxSize :: TX_4X4 =>
1019- self . predict_intra_inner :: < Block4x4 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1019+ self . predict_intra_inner :: < Block4x4 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10201020 TxSize :: TX_8X8 =>
1021- self . predict_intra_inner :: < Block8x8 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1021+ self . predict_intra_inner :: < Block8x8 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10221022 TxSize :: TX_16X16 =>
1023- self . predict_intra_inner :: < Block16x16 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1023+ self . predict_intra_inner :: < Block16x16 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10241024 TxSize :: TX_32X32 =>
1025- self . predict_intra_inner :: < Block32x32 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1025+ self . predict_intra_inner :: < Block32x32 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10261026 TxSize :: TX_64X64 =>
1027- self . predict_intra_inner :: < Block64x64 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1027+ self . predict_intra_inner :: < Block64x64 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10281028
10291029 TxSize :: TX_4X8 =>
1030- self . predict_intra_inner :: < Block4x8 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1030+ self . predict_intra_inner :: < Block4x8 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10311031 TxSize :: TX_8X4 =>
1032- self . predict_intra_inner :: < Block8x4 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1032+ self . predict_intra_inner :: < Block8x4 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10331033 TxSize :: TX_8X16 =>
1034- self . predict_intra_inner :: < Block8x16 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1034+ self . predict_intra_inner :: < Block8x16 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10351035 TxSize :: TX_16X8 =>
1036- self . predict_intra_inner :: < Block16x8 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1036+ self . predict_intra_inner :: < Block16x8 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10371037 TxSize :: TX_16X32 =>
1038- self . predict_intra_inner :: < Block16x32 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1038+ self . predict_intra_inner :: < Block16x32 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10391039 TxSize :: TX_32X16 =>
1040- self . predict_intra_inner :: < Block32x16 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1040+ self . predict_intra_inner :: < Block32x16 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10411041 TxSize :: TX_32X64 =>
1042- self . predict_intra_inner :: < Block32x64 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1042+ self . predict_intra_inner :: < Block32x64 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10431043 TxSize :: TX_64X32 =>
1044- self . predict_intra_inner :: < Block64x32 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1044+ self . predict_intra_inner :: < Block64x32 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10451045
10461046 TxSize :: TX_4X16 =>
1047- self . predict_intra_inner :: < Block4x16 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1047+ self . predict_intra_inner :: < Block4x16 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10481048 TxSize :: TX_16X4 =>
1049- self . predict_intra_inner :: < Block16x4 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1049+ self . predict_intra_inner :: < Block16x4 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10501050 TxSize :: TX_8X32 =>
1051- self . predict_intra_inner :: < Block8x32 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1051+ self . predict_intra_inner :: < Block8x32 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10521052 TxSize :: TX_32X8 =>
1053- self . predict_intra_inner :: < Block32x8 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1053+ self . predict_intra_inner :: < Block32x8 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10541054 TxSize :: TX_16X64 =>
1055- self . predict_intra_inner :: < Block16x64 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1055+ self . predict_intra_inner :: < Block16x64 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10561056 TxSize :: TX_64X16 =>
1057- self . predict_intra_inner :: < Block64x16 , _ > ( dst, bit_depth, ac, alpha, edge_buf) ,
1057+ self . predict_intra_inner :: < Block64x16 , _ > ( dst, bo , bit_depth, ac, alpha, edge_buf) ,
10581058 }
10591059 }
10601060
10611061 #[ inline( always) ]
10621062 fn predict_intra_inner < B : Intra < T > , T : Pixel > (
1063- self , dst : & mut PlaneRegionMut < ' _ , T > , bit_depth : usize , ac : & [ i16 ] ,
1064- alpha : i16 , edge_buf : & AlignedArray < [ T ; 4 * MAX_TX_SIZE + 1 ] >
1063+ self , dst : & mut PlaneRegionMut < ' _ , T > , tile_bo : BlockOffset ,
1064+ bit_depth : usize , ac : & [ i16 ] , alpha : i16 ,
1065+ edge_buf : & AlignedArray < [ T ; 4 * MAX_TX_SIZE + 1 ] >
10651066 ) {
10661067 // left pixels are order from bottom to top and right-aligned
10671068 let ( left, not_left) = edge_buf. array . split_at ( 2 * MAX_TX_SIZE ) ;
10681069 let ( top_left, above) = not_left. split_at ( 1 ) ;
10691070
1070- let & Rect { x, y, .. } = dst. rect ( ) ;
1071+ let BlockOffset { x, y, .. } = tile_bo;
1072+ let area = Area :: BlockStartingAt { bo : tile_bo } ;
1073+ let dst = & mut dst. subregion_mut ( area) ;
10711074
10721075 let mode: PredictionMode = match self {
10731076 PredictionMode :: PAETH_PRED => match ( x, y) {
0 commit comments