mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-02 20:35:37 +02:00
Handle raw blocks correctly (both updating pointer and storing to memory)
Originally committed as revision 6172 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
eb57c88973
commit
c0d6fc1f73
@ -105,7 +105,17 @@ static always_inline void paint_raw(uint8_t *dst, int w, int h, uint8_t* src, in
|
|||||||
for(i = 0; i < w; i++) {
|
for(i = 0; i < w; i++) {
|
||||||
p = vmnc_get_pixel(src, bpp, be);
|
p = vmnc_get_pixel(src, bpp, be);
|
||||||
src += bpp;
|
src += bpp;
|
||||||
memcpy(dst + i*bpp, &p, bpp);
|
switch(bpp){
|
||||||
|
case 1:
|
||||||
|
dst[i] = p;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
((uint16_t*)dst)[i] = p;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
((uint32_t*)dst)[i] = p;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dst += stride;
|
dst += stride;
|
||||||
}
|
}
|
||||||
@ -129,6 +139,7 @@ static int decode_hextile(VmncContext *c, uint8_t* dst, uint8_t* src, int w, int
|
|||||||
flags = *src++;
|
flags = *src++;
|
||||||
if(flags & HT_RAW) {
|
if(flags & HT_RAW) {
|
||||||
paint_raw(dst2, bw, bh, src, bpp, c->bigendian, stride);
|
paint_raw(dst2, bw, bh, src, bpp, c->bigendian, stride);
|
||||||
|
src += bw * bh * bpp;
|
||||||
} else {
|
} else {
|
||||||
if(flags & HT_BKG) {
|
if(flags & HT_BKG) {
|
||||||
bg = vmnc_get_pixel(src, bpp, c->bigendian); src += bpp;
|
bg = vmnc_get_pixel(src, bpp, c->bigendian); src += bpp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user