返回信息流copyControl()调用updateBufferY()和updateBufferChrom(),
可是出这样的错误:
对 updateBufferChrom(unsigned char*&, unsigned char*&)的调用没匹配的函数,
备选为: updateBufferChrom(unsigned char*, unsigned char*)...
而 updateBufferY () 则没有问题... 晕! 我觉得两个差不多啊!
void copyControl(
unsigned char bufferY[4*64*LBwidth],
unsigned char bufferU[64*LBwidth],
unsigned char bufferV[64*LBwidth] )
{
if (vopType)
{
if (vIn==0 && hIn==0)
{
updateBufferY(bufferY); // 这个没问题
updateBufferChrom(bufferU,bufferV); // 这个地方报的错.
}
.....
}
void updateBufferY(unsigned char bufferY[4*64*LBwidth])
{
short width = MBwidth << 4;
int bufferYposition = ((v*MBwidth+h) & (LBwidth-1)) << 8;
unsigned int frameMemoryAddress = (MBwidth*v + h) << 8;
int localPosition;
unsigned char i,j,k;
memcpy(bufferY+bufferYposition, recFrame_in+frameMemoryAddress, 64*4);
//recFrame_in.burst_read(frameMemoryAddress,64*4,bufferY+bufferYposition);
}
void updateBufferChrom(unsigned char bufferChromU[64*LBwidth], unsigned char bufferChromV[64*LBwidth])
{
short chromWidth = MBwidth*8;
short width = MBwidth*16;
short height = MBheight*16;
int bufferChromPosition = ((v*MBwidth+h) & (LBwidth-1))*64;
int localPosition = bufferChromPosition;
unsigned int frameMemoryAddress = width*height + (v*MBwidth + h)*64;
unsigned char i,j;
memcpy(bufferChromU+localPosition, recFrame_in+frameMemoryAddress, 64);
//recFrame_in.burst_read(frameMemoryAddress,64,bufferChromU+localPosition);
.......
}
这是一条镜像帖。来源:北邮人论坛 / cpp / #18940同步于 2009/2/4
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
应该就是char *,怎么成了char *& ?? C++高手指点!!!
youngfool
2009/2/4镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。