Lines 566-574
Link Here
|
566 |
from.linesize[ix] = ffmpeg->m_picture->linesize[ix]; |
566 |
from.linesize[ix] = ffmpeg->m_picture->linesize[ix]; |
567 |
} |
567 |
} |
568 |
|
568 |
|
|
|
569 |
#ifdef HAVE_FFMPEG_INSTALLED |
570 |
SwsContext *pSWSCtx; |
571 |
pSWSCtx = sws_getContext(ffmpeg->m_c->width, ffmpeg->m_c->height, |
572 |
ffmpeg->m_c->pix_fmt, |
573 |
ffmpeg->m_c->width, ffmpeg->m_c->height, |
574 |
PIX_FMT_YUV420P, SWS_BICUBIC, 0, 0, 0); |
575 |
sws_scale(pSWSCtx, from.data, from.linesize, 0, ffmpeg->m_c->height, |
576 |
to.data, to.linesize); |
577 |
sws_freeContext(pSWSCtx); |
578 |
#else |
569 |
img_convert(&to, PIX_FMT_YUV420P, |
579 |
img_convert(&to, PIX_FMT_YUV420P, |
570 |
&from, ffmpeg->m_c->pix_fmt, |
580 |
&from, ffmpeg->m_c->pix_fmt, |
571 |
ffmpeg->m_c->width, ffmpeg->m_c->height); |
581 |
ffmpeg->m_c->width, ffmpeg->m_c->height); |
|
|
582 |
#endif |
572 |
ffmpeg->m_vft->video_filled_buffer(ffmpeg->m_ifptr, |
583 |
ffmpeg->m_vft->video_filled_buffer(ffmpeg->m_ifptr, |
573 |
ffmpeg->have_cached_ts ? |
584 |
ffmpeg->have_cached_ts ? |
574 |
ffmpeg->cached_ts : ts); |
585 |
ffmpeg->cached_ts : ts); |