Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int p;
- for (p=0; p < 3; p++) {
- uint8_t *buf = pic->f.data[p];
- uint8_t *src;
- int stride = decoder->stride >> !!p; // 10 17:44:25 * Daemon404 runs in shame
- int height = decoder->height >> !!p;
- if (p==0) src = decoder->outbuf->pBuffer;
- else if (p==1) src = decoder->outbuf->pBuffer + (decoder->stride*decoder->height);
- else if (p==2) src = decoder->outbuf->pBuffer + (decoder->stride*decoder->height) + (stride*height);
- if (stride != pic->f.linesize[p]) {
- printf("stride mismatch between gpu and ffmpeg, %d %d\n",stride,pic->f.linesize[p]);
- exit(-2);
- }
- //printf("buf:%p src:%p stride:%d plane:%d linesize:%d height:%d\n",buf,src,stride,p,pic->f.linesize[p],height);
- memcpy(buf,src,stride * height);
- //buf += pic->f.linesize[p] * decoder->height;
- src += stride * decoder->height;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement