MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / old_codec2

Function old_codec2

libavcodec/sanm.c:1016–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014}
1015
1016static 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
1034static 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,

Callers 1

process_frame_objFunction · 0.85

Calls 1

Tested by

no test coverage detected