diff --git a/polymer/eduke32/source/animvpx.c b/polymer/eduke32/source/animvpx.c index 5b6231df5..02e14e287 100644 --- a/polymer/eduke32/source/animvpx.c +++ b/polymer/eduke32/source/animvpx.c @@ -296,13 +296,29 @@ read_ivf_frame: int32_t x, y; const int32_t width=img->d_w, height = img->d_h; - for (y=0; y>1) + (x>>1)]; + uint8_t v = vplane[vstride*(y>>1) + (x>>1)]; + dstpic[(width*y + x)<<2] = yplane[ystride*y + x]; - dstpic[((width*y + x)<<2) + 1] = uplane[ustride*(y>>1) + (x>>1)]; - dstpic[((width*y + x)<<2) + 2] = vplane[vstride*(y>>1) + (x>>1)]; + dstpic[(width*y + x+1)<<2] = yplane[ystride*y + x+1]; + dstpic[(width*(y+1) + x)<<2] = yplane[ystride*(y+1) + x]; + dstpic[(width*(y+1) + x+1)<<2] = yplane[ystride*(y+1) + x+1]; + + dstpic[((width*y + x)<<2) + 1] = u; + dstpic[((width*y + x+1)<<2) + 1] = u; + dstpic[((width*(y+1) + x)<<2) + 1] = u; + dstpic[((width*(y+1) + x+1)<<2) + 1] = u; + + dstpic[((width*y + x)<<2) + 2] = v; + dstpic[((width*y + x+1)<<2) + 2] = v; + dstpic[((width*(y+1) + x)<<2) + 2] = v; + dstpic[((width*(y+1) + x+1)<<2) + 2] = v; } + } // initprintf("%d ms\n", getticks()-t); }