Unified · Split
| @@ -48,8 +48,7 @@ next: · 47 unmodified lines | |||
| 48 | }else if((f = malloc(sizeof(*f) + w*h*3)) != nil){ | 48 | }else if((f = malloc(sizeof(*f) + w*h*3)) != nil){ |
| 49 | f->w = w; | 49 | f->w = w; |
| 50 | f->h = h; | 50 | f->h = h; |
| 51 | /* FIXME I have not a single idea what are these weird shifts based on image width */ | 51 | yuv420_rgb24(w, h, pic, pic+w*h, pic+w*h*5/4, w, w/2, f->rgb, w*3); |
| 52 | yuv420_rgb24(w, h, pic, pic+w*h+w*8, pic+w*h*5/4+w*10, w, w/2, f->rgb, w*3); | ||
| 53 | f->dt = (sf.timestamp - lasttimestamp) * d->timebase * 1000000000ULL; | 52 | f->dt = (sf.timestamp - lasttimestamp) * d->timebase * 1000000000ULL; |
| 54 | lasttimestamp = sf.timestamp; | 53 | lasttimestamp = sf.timestamp; |
| 55 | 54 | ||
| @@ -68,6 +67,8 @@ next: · 12 unmodified lines | |||
| 68 | } | 67 | } |
| 69 | if(w & 15) | 68 | if(w & 15) |
| 70 | w += 16 - (w & 15); | 69 | w += 16 - (w & 15); |
| 70 | if(h & 15) | ||
| 71 | h += 16 - (h & 15); | ||
| 71 | break; | 72 | break; |
| 72 | 73 | ||
| 73 | case H264BSD_RDY: | 74 | case H264BSD_RDY: |