Added profiler sections to (threaded) chroma subsampling
This commit is contained in:
parent
aeeb5f9227
commit
5eb23e0344
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
void Convert444toI420(LPBYTE input, int width, int pitch, int height, int startY, int endY, LPBYTE *output)
|
void Convert444toI420(LPBYTE input, int width, int pitch, int height, int startY, int endY, LPBYTE *output)
|
||||||
{
|
{
|
||||||
|
profileSegment("Convert444toI420");
|
||||||
LPBYTE lumPlane = output[0];
|
LPBYTE lumPlane = output[0];
|
||||||
LPBYTE uPlane = output[1];
|
LPBYTE uPlane = output[1];
|
||||||
LPBYTE vPlane = output[2];
|
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)
|
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 lumPlane = output[0];
|
||||||
LPBYTE uvPlane = output[1];
|
LPBYTE uvPlane = output[1];
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ struct Convert444Data
|
|||||||
bool bKillThread;
|
bool bKillThread;
|
||||||
HANDLE hSignalConvert, hSignalComplete;
|
HANDLE hSignalConvert, hSignalComplete;
|
||||||
int width, height, inPitch, outPitch, startY, endY;
|
int width, height, inPitch, outPitch, startY, endY;
|
||||||
|
DWORD numThreads;
|
||||||
};
|
};
|
||||||
|
|
||||||
DWORD STDCALL Convert444Thread(Convert444Data *data)
|
DWORD STDCALL Convert444Thread(Convert444Data *data)
|
||||||
@ -62,6 +63,7 @@ DWORD STDCALL Convert444Thread(Convert444Data *data)
|
|||||||
{
|
{
|
||||||
WaitForSingleObject(data->hSignalConvert, INFINITE);
|
WaitForSingleObject(data->hSignalConvert, INFINITE);
|
||||||
if(data->bKillThread) break;
|
if(data->bKillThread) break;
|
||||||
|
profileParallelSegment("Convert444Thread(s)", data->numThreads);
|
||||||
if(data->bNV12)
|
if(data->bNV12)
|
||||||
Convert444toNV12(data->input, data->width, data->inPitch, data->outPitch, data->height, data->startY, data->endY, data->output);
|
Convert444toNV12(data->input, data->width, data->inPitch, data->outPitch, data->height, data->startY, data->endY, data->output);
|
||||||
else
|
else
|
||||||
@ -604,6 +606,7 @@ void OBS::MainCaptureLoop()
|
|||||||
convertInfo[i].hSignalConvert = CreateEvent(NULL, FALSE, FALSE, NULL);
|
convertInfo[i].hSignalConvert = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
convertInfo[i].hSignalComplete = CreateEvent(NULL, FALSE, FALSE, NULL);
|
convertInfo[i].hSignalComplete = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
convertInfo[i].bNV12 = bUsingQSV;
|
convertInfo[i].bNV12 = bUsingQSV;
|
||||||
|
convertInfo[i].numThreads = numThreads;
|
||||||
|
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
convertInfo[i].startY = 0;
|
convertInfo[i].startY = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user