There are many codec example in
/dvevm_1_10/codec_engine_1_02/examples/codecs/
Taking viddec_copy as example,
(step 1)
./app/video_input.c: fmt.fmt.pix.pixelformat =
V4L2_PIX_FMT_UYVY;
so the format is UYVY...
(step 2)so i change the code ( myviddec.c's process
function )to make U and V equal zero as the
following...(making grey scale ouput)
for (curBuf = 0; (curBuf < inBufs->numBufs) &&
(curBuf < outBufs->numBufs); curBuf++) {
/* there's an available in and out buffer, how
many samples? */
minSamples = inBufs->bufSizes[curBuf] <
outBufs->bufSizes[curBuf] ?
inBufs->bufSizes[curBuf] :
outBufs->bufSizes[curBuf];
/* process the data: read input, produce
output */
if(curBuf % 4 == 1 || curBuf % 4 == 3) //
should be Y
memcpy(outBufs->bufs[curBuf],
inBufs->bufs[curBuf], minSamples);
else // U and V
memcpy(outBufs->bufs[curBuf], 0, minSamples);
outArgs->bytesConsumed += minSamples;
}
But it fails....
Could someone inform me the exactly allocation and the
value range of the IN and OUT buffer???
Thanks a lot!
___________________________________________________
您的生活即時通 - 溝通、娛樂、生活、工作一次搞定!
http://messenger.yahoo.com.tw/
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source