> How do you allocate image_data.
image_data is a pointer that comes from opencv::Mat::data. It is from another
library called opencv.
It contains grayscale bitmap information. Each byte in the array is one pixel
in range 0..255.
That is why I wrote that I don't understand how does sws_scale even work,
because according to sws_scale documentation, srcSlice parameter (which is
image_data) should contain pointers, but it does not contain pointers, just
bytes.
> how do you allocate frame?
AVFrame *frame_ = av_frame_alloc();
I've checked frame->data pointers and they are aligned properly.
> What is the stride in your example?
linesize[1] = { context->width } = 1280
frame->linesize = {1280, 640, 640, 0, 0, 0, 0, 0}
Best regards,
Wodzu
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".