Am Sa., 26. Okt. 2019 um 06:45 Uhr schrieb <ckenn...@ellation.com>: > +// convert from avframe to iplimage format > +static int fill_iplimage_from_frame(IplImage *img, const AVFrame *frame, > enum AVPixelFormat pixfmt) > +{ > + IplImage *tmpimg; > + int depth = IPL_DEPTH_8U, channels_nb; > + > + switch (pixfmt) { > + case AV_PIX_FMT_GRAY8: channels_nb = 1; break; > + case AV_PIX_FMT_BGRA: channels_nb = 4; break; > + case AV_PIX_FMT_BGR24: channels_nb = 3; break; > + case AV_PIX_FMT_YUV420P: channels_nb = 3; break; > + default: return -1; > + } > + > + tmpimg = cvCreateImageHeader((CvSize){frame->width, frame->height}, > depth, channels_nb);
Let me rephrase: Assuming the layouts of BGR24 and YUV420P are not identical (they are not), how is cvCreateImageHeader() or the following functions supposed to know that they are not the same? Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".