rick666
25th August 2006, 16:06
Hi man,
I've successfully encoded a bitmap sequence with libavcodec into a mp4 file.
Now I want to encode every image and then decode to obtain the initial sequence but when I've tryed to encode and decode I've founded that the image decoded wasn't equal to the original, infact I've some images good (I think these are keyframes) and some others appear greyscaled like there are only difference between one frame and the following.
I simply encode and decode, nothing more nothing less, in this way:
/* encode the image */
out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
/*decode the image*/
int got_picture;
long test =avcodec_decode_video(d, pictureDecode,&got_picture,video_outbuf, out_size);
Someone knows the answer for this (I think) stupid question?
I've successfully encoded a bitmap sequence with libavcodec into a mp4 file.
Now I want to encode every image and then decode to obtain the initial sequence but when I've tryed to encode and decode I've founded that the image decoded wasn't equal to the original, infact I've some images good (I think these are keyframes) and some others appear greyscaled like there are only difference between one frame and the following.
I simply encode and decode, nothing more nothing less, in this way:
/* encode the image */
out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
/*decode the image*/
int got_picture;
long test =avcodec_decode_video(d, pictureDecode,&got_picture,video_outbuf, out_size);
Someone knows the answer for this (I think) stupid question?