Commit 925d0837 authored by Paul B Mahol's avatar Paul B Mahol

qtrle: use bytestream2_get_buffer()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 9a5aa2c4
......@@ -110,8 +110,8 @@ static void qtrle_decode_1bpp(QtrleContext *s, int row_ptr, int lines_to_change)
rle_code *= 2;
CHECK_PIXEL_PTR(rle_code);
while (rle_code--)
rgb[pixel_ptr++] = bytestream2_get_byte(&s->g);
bytestream2_get_buffer(&s->g, &rgb[pixel_ptr], rle_code);
pixel_ptr += rle_code;
}
}
}
......@@ -214,9 +214,8 @@ static void qtrle_decode_8bpp(QtrleContext *s, int row_ptr, int lines_to_change)
rle_code *= 4;
CHECK_PIXEL_PTR(rle_code);
while (rle_code--) {
rgb[pixel_ptr++] = bytestream2_get_byte(&s->g);
}
bytestream2_get_buffer(&s->g, &rgb[pixel_ptr], rle_code);
pixel_ptr += rle_code;
}
}
row_ptr += row_inc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment