[Libav-user] Avframe to iplimage
jpkouma
jpkouma at gmail.com
Thu Sep 15 12:25:06 CEST 2011
int av2ipl(AVFrame *src, IplImage *dst){
struct SwsContext *swscontext =
sws_getContext(src->width, src->height, PIX_FMT_YUV420P,
dst->width, dst->height, PIX_FMT_BGR24,
SWS_BILINEAR, 0, 0, 0);
if (swscontext == 0) return(0);
int linesize[4] = {dst->widthStep, 0, 0, 0 };
sws_scale(swscontext, src->data, src->linesize, 0, src->height,
(uint8_t **) & (dst->imageData), linesize);
return 1;
}
-----
Les chinois disent: Rien ne sert de courir
...
Non, ça sert à rien du tout!
--
View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Avframe-to-iplimage-tp3766277p3815196.html
Sent from the libav-users mailing list archive at Nabble.com.
More information about the Libav-user
mailing list