Ticket #336: logframecrc.diff
| File logframecrc.diff, 1.6 kB (added by astrange, 7 months ago) |
|---|
-
FFusionCodec.c
old new 41 41 #include "FrameBuffer.h" 42 42 #include "CommonUtils.h" 43 43 #include "pthread.h" 44 #include "libavutil/adler32.h" 44 45 45 46 void inline swapFrame(AVFrame * *a, AVFrame * *b) 46 47 { … … 1303 1304 } 1304 1305 else if (myDrp->pixelFormat == k2vuyPixelFormat && glob->avContext->pix_fmt == PIX_FMT_YUV420P) 1305 1306 { 1307 1308 if (glob->fileLog) { 1309 uint32_t crc = av_adler32_update(0, picture->data[0], myDrp->height*picture->linesize[0]); 1310 FFusionDebugPrint("%p Drew frame #%d, drp->buffer %p y buf %p crc %#x\n", glob, myDrp->frameNumber, myDrp->buffer, picture->data[0], crc); 1311 } 1306 1312 Y420toY422((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1307 1313 } 1308 1314 else if (myDrp->pixelFormat == k24RGBPixelFormat && glob->avContext->pix_fmt == PIX_FMT_BGR24) … … 1668 1674 int len = 0; 1669 1675 long availableData = dataProc ? codecMinimumDataSize : kInfiniteDataSize; 1670 1676 1671 FFusionDebugPrint("%p Decompress on frame #%d (%d bytes).\n", glob, glob->decode.lastFrame, length);1677 FFusionDebugPrint("%p Decompressing frame - %d bytes.\n", glob, length); 1672 1678 picture->data[0] = 0; 1673 1679 1674 1680 while (!got_picture && length != 0) … … 1700 1706 dataPtr += len; 1701 1707 length -= len; 1702 1708 } 1709 1710 if (glob->fileLog) { 1711 uint32_t crc = av_adler32_update(0, picture->data[0], height*picture->linesize[0]); 1712 FFusionDebugPrint("%p Decompressed frame #%d, y buf %p crc %#x\n", glob, glob->decode.lastFrame+1, picture->data[0], crc); 1713 } 1714 1703 1715 return err; 1704 1716 } 1705 1717
