Hi,
SwsContext* imgConvertCtxYuv420pToRGB24 = 0;
...
if( !p_imgConvertCtxYuv420pToRGB24 )
{
imgConvertCtxYuv420pToRGB24 = sws_getContext( p_codecCtx->width,
p_codecCtx->height, p_codecCtx->pix_fmt,
p_private->p_codecCtx->width, p_private->p_codecCtx->height,
PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL );
}
...
// get and decode the frame
...
sws_scale( imgConvertCtxYuv420pToRGB24 ,
p_Frame->data, p_Frame->linesize, 0, p_codecCtx->height,
p_FrameRGB24->data, p_FrameRGB24->linesize );
That's it.
Chris.
________________________________________
De : [email protected] [[email protected]] de la
part de Candice Seenyen [[email protected]]
Date d'envoi : mercredi 18 août 2010 15:16
À : 'Libav* user questions and discussions'
Objet : [libav-user] Conversion yuvj420P to RGB24
Hi,
I need to display a frame from an IP Camera stream in RGB24 format. However,
I have found out that the format of the frame is in YUVJ420P but I need to
display in RGB24. When using sws_getContext and swscale, all I get is a
green screen filled with noise.
Does anybody know how I can make this conversion work?
Thank you
Candice
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
#
" Ce courriel et les documents qui lui sont joints peuvent contenir des
informations confidentielles ou ayant un caractère privé. S'ils ne vous sont
pas destinés, nous vous signalons qu'il est strictement interdit de les
divulguer, de les reproduire ou d'en utiliser de quelque manière que ce soit le
contenu. Si ce message vous a été transmis par erreur, merci d'en informer
l'expéditeur et de supprimer immédiatement de votre système informatique ce
courriel ainsi que tous les documents qui y sont attachés."
******
" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you are
notified that any dissemination, copying of this e-mail and any attachments
thereto or use of their contents by any means whatsoever is strictly
prohibited. If you have received this e-mail in error, please advise the sender
immediately and delete this e-mail and all attached documents from your
computer system."
#
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user