| 162 | } |
| 163 | |
| 164 | int ff_snow_alloc_blocks(SnowContext *s){ |
| 165 | int w= AV_CEIL_RSHIFT(s->avctx->width, LOG2_MB_SIZE); |
| 166 | int h= AV_CEIL_RSHIFT(s->avctx->height, LOG2_MB_SIZE); |
| 167 | |
| 168 | s->b_width = w; |
| 169 | s->b_height= h; |
| 170 | |
| 171 | av_free(s->block); |
| 172 | s->block = av_calloc(w * h, sizeof(*s->block) << (s->block_max_depth*2)); |
| 173 | if (!s->block) |
| 174 | return AVERROR(ENOMEM); |
| 175 | |
| 176 | return 0; |
| 177 | } |
| 178 | |
| 179 | static void mc_block(Plane *p, uint8_t *dst, const uint8_t *src, int stride, int b_w, int b_h, int dx, int dy){ |
| 180 | static const uint8_t weight[64]={ |
no test coverage detected