| 1121 | mca( 8, 8,8) |
| 1122 | |
| 1123 | static void pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, int sx, int sy, int b_w, int b_h, BlockNode *block, int plane_index, int w, int h){ |
| 1124 | if(block->type & BLOCK_INTRA){ |
| 1125 | int x, y; |
| 1126 | const int color = block->color[plane_index]; |
| 1127 | const int color4= color*0x01010101; |
| 1128 | if(b_w==32){ |
| 1129 | for(y=0; y < b_h; y++){ |
| 1130 | *(uint32_t*)&dst[0 + y*stride]= color4; |
| 1131 | *(uint32_t*)&dst[4 + y*stride]= color4; |
| 1132 | *(uint32_t*)&dst[8 + y*stride]= color4; |
| 1133 | *(uint32_t*)&dst[12+ y*stride]= color4; |
| 1134 | *(uint32_t*)&dst[16+ y*stride]= color4; |
| 1135 | *(uint32_t*)&dst[20+ y*stride]= color4; |
| 1136 | *(uint32_t*)&dst[24+ y*stride]= color4; |
| 1137 | *(uint32_t*)&dst[28+ y*stride]= color4; |
| 1138 | } |
| 1139 | }else if(b_w==16){ |
| 1140 | for(y=0; y < b_h; y++){ |
| 1141 | *(uint32_t*)&dst[0 + y*stride]= color4; |
| 1142 | *(uint32_t*)&dst[4 + y*stride]= color4; |
| 1143 | *(uint32_t*)&dst[8 + y*stride]= color4; |
| 1144 | *(uint32_t*)&dst[12+ y*stride]= color4; |
| 1145 | } |
| 1146 | }else if(b_w==8){ |
| 1147 | for(y=0; y < b_h; y++){ |
| 1148 | *(uint32_t*)&dst[0 + y*stride]= color4; |
| 1149 | *(uint32_t*)&dst[4 + y*stride]= color4; |
| 1150 | } |
| 1151 | }else if(b_w==4){ |
| 1152 | for(y=0; y < b_h; y++){ |
| 1153 | *(uint32_t*)&dst[0 + y*stride]= color4; |
| 1154 | } |
| 1155 | }else{ |
| 1156 | for(y=0; y < b_h; y++){ |
| 1157 | for(x=0; x < b_w; x++){ |
| 1158 | dst[x + y*stride]= color; |
| 1159 | } |
| 1160 | } |
| 1161 | } |
| 1162 | }else{ |
| 1163 | uint8_t *src= s->last_picture[block->ref].data[plane_index]; |
| 1164 | const int scale= plane_index ? s->mv_scale : 2*s->mv_scale; |
| 1165 | int mx= block->mx*scale; |
| 1166 | int my= block->my*scale; |
| 1167 | const int dx= mx&15; |
| 1168 | const int dy= my&15; |
| 1169 | const int tab_index= 3 - (b_w>>2) + (b_w>>4); |
| 1170 | sx += (mx>>4) - (HTAPS_MAX/2-1); |
| 1171 | sy += (my>>4) - (HTAPS_MAX/2-1); |
| 1172 | src += sx + sy*stride; |
| 1173 | if( (unsigned)sx >= w - b_w - (HTAPS_MAX-2) |
| 1174 | || (unsigned)sy >= h - b_h - (HTAPS_MAX-2)){ |
| 1175 | ff_emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h); |
| 1176 | src= tmp + MB_SIZE; |
| 1177 | } |
| 1178 | // assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h); |
| 1179 | // assert(!(b_w&(b_w-1))); |
| 1180 | assert(b_w>1 && b_h>1); |
no test coverage detected