aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDRC <information@virtualgl.org>2015-02-25 14:18:07 -0600
committerDRC <information@virtualgl.org>2015-02-25 14:18:07 -0600
commit2a172c9cf1551d2367bcdf230f1bb90e9222cb16 (patch)
tree4b74a68244cfd966cbb6db8310a4150ebdfc772d
parente46dda69923af5818aca2587d6114b04d8414f84 (diff)
downloadtigervnc-2a172c9cf1551d2367bcdf230f1bb90e9222cb16.tar.gz
tigervnc-2a172c9cf1551d2367bcdf230f1bb90e9222cb16.zip
encperf: Optionally disable pixel translation
For 16-bit and 8-bit datasets, you can now run encperf with an argument of -translate=0 to benchmark just the encoder without converting the datasets to 24-bit. This allows the output of encperf to be directly compared with that of the TurboVNC Benchmark Tools.
-rw-r--r--tests/encperf.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/encperf.cxx b/tests/encperf.cxx
index 31d7c736..2628b46a 100644
--- a/tests/encperf.cxx
+++ b/tests/encperf.cxx
@@ -53,6 +53,10 @@ static rfb::IntParameter count("count", "Number of benchmark iterations", 9);
static rfb::StringParameter format("format", "Pixel format (e.g. bgr888)", "");
+static rfb::BoolParameter translate("translate",
+ "Translate 8-bit and 16-bit datasets into 24-bit",
+ true);
+
// The frame buffer (and output) is always this format
static const rfb::PixelFormat fbPF(32, 24, false, true, 255, 255, 255, 0, 8, 16);
@@ -174,8 +178,6 @@ CConn::CConn(const char *filename)
decoders[i] = rfb::Decoder::createDecoder(i, this);
}
- pb.setPF(fbPF);
-
// Need to skip the initial handshake and ServerInit
setState(RFBSTATE_NORMAL);
// That also means that the reader and writer weren't setup
@@ -186,6 +188,8 @@ CConn::CConn(const char *filename)
pf.parse(format);
setPixelFormat(pf);
+ pb.setPF((bool)translate ? fbPF : pf);
+
sc = new SConn();
sc->cp.setPF(pb.getPF());
sc->setEncodings(sizeof(encodings) / sizeof(*encodings), encodings);