Skip to content

Commit

Permalink
Fixed my screwed up YUV packing.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 11, 2011
1 parent c2522f4 commit 9635337
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions theoraplay.c
Expand Up @@ -334,14 +334,10 @@ printf("Decoded %d frames of audio.\n", (int) frames);
yuv = item->yuv;
for (i = 0; i < h; i++, yuv += w)
memcpy(yuv, ycbcr[0].data + yoff + ycbcr[0].stride * i, w);

for (i = 0; i < (h / 2); i++)
{
for (i = 0; i < (h / 2); i++, yuv += w/2)
memcpy(yuv, ycbcr[2].data + uvoff + ycbcr[2].stride * i, w / 2);
yuv += w;
for (i = 0; i < (h / 2); i++, yuv += w/2)
memcpy(yuv, ycbcr[1].data + uvoff + ycbcr[1].stride * i, w / 2);
yuv += w;
} // for

printf("Decoded another video frame.\n");
pthread_mutex_lock(&ctx->lock);
Expand Down

0 comments on commit 9635337

Please sign in to comment.