Added profiler sections to (threaded) chroma subsampling

master
palana 2013-09-06 16:47:03 +02:00
parent aeeb5f9227
commit 5eb23e0344
2 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@
void Convert444toI420(LPBYTE input, int width, int pitch, int height, int startY, int endY, LPBYTE *output)
{
profileSegment("Convert444toI420");
LPBYTE lumPlane = output[0];
LPBYTE uPlane = output[1];
LPBYTE vPlane = output[2];
@ -73,6 +74,7 @@ void Convert444toI420(LPBYTE input, int width, int pitch, int height, int startY
void Convert444toNV12(LPBYTE input, int width, int inPitch, int outPitch, int height, int startY, int endY, LPBYTE *output)
{
profileSegment("Convert444toNV12");
LPBYTE lumPlane = output[0];
LPBYTE uvPlane = output[1];

View File

@ -54,6 +54,7 @@ struct Convert444Data
bool bKillThread;
HANDLE hSignalConvert, hSignalComplete;
int width, height, inPitch, outPitch, startY, endY;
DWORD numThreads;
};
DWORD STDCALL Convert444Thread(Convert444Data *data)
@ -62,6 +63,7 @@ DWORD STDCALL Convert444Thread(Convert444Data *data)
{
WaitForSingleObject(data->hSignalConvert, INFINITE);
if(data->bKillThread) break;
profileParallelSegment("Convert444Thread(s)", data->numThreads);
if(data->bNV12)
Convert444toNV12(data->input, data->width, data->inPitch, data->outPitch, data->height, data->startY, data->endY, data->output);
else
@ -604,6 +606,7 @@ void OBS::MainCaptureLoop()
convertInfo[i].hSignalConvert = CreateEvent(NULL, FALSE, FALSE, NULL);
convertInfo[i].hSignalComplete = CreateEvent(NULL, FALSE, FALSE, NULL);
convertInfo[i].bNV12 = bUsingQSV;
convertInfo[i].numThreads = numThreads;
if(i == 0)
convertInfo[i].startY = 0;