Definition at line 503 of file VideoAccessObject.h. References CurrentFrameValid(), Impala::Max(), Impala::Core::Array::MD5Hash(), mFrame, Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::PB(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::SetValue(). Referenced by Impala::Core::Stream::Lavc::VideoAccessStrategy::CurrentFrameHashBeforeConversion(), and Impala::Core::Stream::Lavc::VideoAccessStrategy::ProcessFrame(). 00504 { 00505 if (!CurrentFrameValid()) 00506 return "DUMMY"; 00507 00508 int nrOfPicturePlanes = 0; 00509 int maxLineSize = 1; 00510 for ( ; nrOfPicturePlanes < 4; nrOfPicturePlanes++) 00511 { 00512 int lineSize = mFrame->linesize[nrOfPicturePlanes]; 00513 if (lineSize <= 0) 00514 break; 00515 maxLineSize = Max(lineSize, maxLineSize); 00516 } 00517 00518 // construct an array holding the original (unconverted) picture's data 00519 Array::Array2dScalarUInt8* arr = new Array::Array2dScalarUInt8( 00520 maxLineSize, nrOfPicturePlanes, 0, 0); 00521 size_t numBytes = sizeof(UInt8) * nrOfPicturePlanes * maxLineSize; 00522 memset((void*) arr->PB(), 0, numBytes); 00523 for (int p = 0; p < nrOfPicturePlanes; p++) 00524 { 00525 int lineSize = mFrame->linesize[p]; 00526 for (int e = 0; e < lineSize; e++) 00527 { 00528 UInt8 value = mFrame->data[p][e]; 00529 arr->SetValue(value, e, p); 00530 } 00531 } 00532 String hash = Array::MD5Hash(arr); 00533 delete arr; 00534 return hash; 00535 }
Here is the call graph for this function:
|