- remove grayscale step when sharing desktop
This commit is contained in:
parent
113cbad759
commit
c1a59722f2
Binary file not shown.
@ -100,7 +100,7 @@ public final class Block {
|
||||
System.arraycopy(capturedPixels, 0, pixelsCopy, 0, capturedPixels.length);
|
||||
}
|
||||
|
||||
byte[] encodedBlock = ScreenVideoEncoder.encodePixels(pixelsCopy, getWidth(), getHeight(), (sentCount.longValue() > 5) /* send grayscale image */);
|
||||
byte[] encodedBlock = ScreenVideoEncoder.encodePixels(pixelsCopy, getWidth(), getHeight(), (sentCount.longValue() < 5) /* send grayscale image */);
|
||||
return new EncodedBlockData(position, encodedBlock);
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ public final class ScreenVideoEncoder {
|
||||
byte red = (byte) ((pixels[i] >> 16) & 0xff);
|
||||
byte green = (byte) ((pixels[i] >> 8) & 0xff);
|
||||
byte blue = (byte) (pixels[i] & 0xff);
|
||||
|
||||
/*
|
||||
if (grayscale) {
|
||||
byte brightness = convertToGrayScale(red, green, blue);
|
||||
|
||||
@ -185,7 +185,12 @@ public final class ScreenVideoEncoder {
|
||||
rgbPixels[position++] = blue;
|
||||
rgbPixels[position++] = green;
|
||||
rgbPixels[position++] = red;
|
||||
}
|
||||
}
|
||||
*/
|
||||
// Sequence should be BGR
|
||||
rgbPixels[position++] = blue;
|
||||
rgbPixels[position++] = green;
|
||||
rgbPixels[position++] = red;
|
||||
}
|
||||
|
||||
long end = System.currentTimeMillis();
|
||||
|
Loading…
Reference in New Issue
Block a user