Hi,
being new to FFMPEG, I am trying out something like:
What I am trying to do is read data from an image,
=======================================================
pfi->p = (unsigned int*)malloc(pfi->width*pfi->height*4);
for(i=0;i<pfi->height;i++) {
memcpy(pfi->p + pfi->width*i, ((char*)p) + bmp->Stride*i, pfi->width*4);
}
=======================================================
where pfi->p is a pointer to the data on disk.
what I cant understand is how to allocate it as done in output_example.c
fill_yuv_image(picture, frame_count, c->width, c->height,data){
.................
...................
for(y=0;y<height;y++) {
for(x=0;x<width;x++) {
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3; //
DUMMY DATA
}
}
/* Cb and Cr */
for(y=0;y<height/2;y++) {
for(x=0;x<width/2;x++) {
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;//
DUMMY DATA
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;//
DUMMY DATA
}
could anyone please help or throw some light?
thanks
JD
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user