| 1014 | } |
| 1015 | |
| 1016 | static int old_codec2(SANMVideoContext *ctx, GetByteContext *gb, int top, |
| 1017 | int left, int width, int height) |
| 1018 | { |
| 1019 | uint8_t *dst = (uint8_t *)ctx->fbuf, col; |
| 1020 | int16_t xpos = left, ypos = top; |
| 1021 | |
| 1022 | while (bytestream2_get_bytes_left(gb) > 3) { |
| 1023 | xpos += bytestream2_get_le16u(gb); |
| 1024 | ypos += bytestream2_get_byteu(gb); |
| 1025 | col = bytestream2_get_byteu(gb); |
| 1026 | if (xpos >= 0 && ypos >= 0 && |
| 1027 | xpos < ctx->width && ypos < ctx->height) { |
| 1028 | *(dst + xpos + ypos * ctx->pitch) = col; |
| 1029 | } |
| 1030 | } |
| 1031 | return 0; |
| 1032 | } |
| 1033 | |
| 1034 | static void blt_solid(uint8_t *dst, const uint8_t *src, int16_t left, int16_t top, |
| 1035 | uint16_t srcxoff, uint16_t srcyoff, uint16_t srcwidth, |
no test coverage detected