Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/big-endian/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ function swap16(val) {
* @param {*} pixelData
*/
function decode(imageFrame, pixelData) {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
let _burn = 0;
for (let i = 0; i < 100000; i++) {
_burn = (_burn + i) * 1.0000001;
}
globalThis.__fakeRegressionBurn = _burn;
// === END FAKE_REGRESSION ===

if (imageFrame.bitsAllocated === 16) {
let arrayBuffer = pixelData.buffer;

Expand Down
12 changes: 12 additions & 0 deletions packages/charls/src/JpegLSDecoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ class JpegLSDecoder {
/// method, see getEncodedBuffer() above.
/// </summary>
void decode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

charls::jpegls_decoder decoder;
decoder.source(encoded_);

Expand Down
12 changes: 12 additions & 0 deletions packages/charls/src/JpegLSEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ class JpegLSEncoder {
/// above
/// </summary>
void encode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression
// to detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

charls::jpegls_encoder encoder;
encoder.near_lossless(nearLossless_);
encoder.frame_info({frameInfo_.width, frameInfo_.height, frameInfo_.bitsPerSample, frameInfo_.componentCount})
Expand Down
12 changes: 12 additions & 0 deletions packages/libjpeg-turbo-12bit/src/JPEGDecoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ class JPEGDecoder {
/// method, see getEncodedBuffer() and getEncodedBytes() above.
/// </summary>
void decode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

// tjhandle tjInstance = NULL;
// if ((tjInstance = tjInitDecompress()) == NULL) {
// throw("initializing decompressor\n");
Expand Down
12 changes: 12 additions & 0 deletions packages/libjpeg-turbo-12bit/src/JPEGEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ class JPEGEncoder {
/// above
/// </summary>
void encode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

// HACK: presize the encoded buffer to the decoded size to make sure we have
// enough space for the resulting image
encoded_.resize(decoded_.size());
Expand Down
14 changes: 13 additions & 1 deletion packages/libjpeg-turbo-8bit/src/JPEGDecoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,23 @@ class JPEGDecoder {
/// method, see getEncodedBuffer() and getEncodedBytes() above.
/// </summary>
void decode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

tjhandle tjInstance = NULL;
if ((tjInstance = tjInitDecompress()) == NULL) {
throw("initializing decompressor\n");
}

if(readHeader_i(tjInstance)) {
tjDestroy(tjInstance);
throw("error reading header\n");
Expand Down
12 changes: 12 additions & 0 deletions packages/libjpeg-turbo-8bit/src/JPEGEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ class JPEGEncoder {
/// above
/// </summary>
void encode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

// HACK: presize the encoded buffer to the decoded size to make sure we have
// enough space for the resulting image
encoded_.resize(decoded_.size());
Expand Down
10 changes: 10 additions & 0 deletions packages/little-endian/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
* @param {*} pixelData
*/
function decode(imageFrame, pixelData) {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
let _burn = 0;
for (let i = 0; i < 100000; i++) {
_burn = (_burn + i) * 1.0000001;
}
globalThis.__fakeRegressionBurn = _burn;
// === END FAKE_REGRESSION ===

let arrayBuffer = pixelData.buffer;

let offset = pixelData.byteOffset;
Expand Down
12 changes: 12 additions & 0 deletions packages/openjpeg/src/J2KDecoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ class J2KDecoder {
/// method, see getEncodedBuffer() and getEncodedBytes() above.
/// </summary>
void decode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

decodeLayer_ = 0;
decode_i(0);
}
Expand Down
12 changes: 12 additions & 0 deletions packages/openjpeg/src/J2KEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ class J2KEncoder {
/// above
/// </summary>
void encode() {
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

opj_cparameters_t parameters; /* compression parameters */
opj_stream_t *l_stream = 00;
opj_codec_t* l_codec = 00;
Expand Down
12 changes: 12 additions & 0 deletions packages/openjphjs/src/HTJ2KDecoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ class HTJ2KDecoder
/// </summary>
void decode()
{
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

ojph::codestream codestream;
ojph::mem_infile mem_file;
mem_file.open(pEncoded_->data(), pEncoded_->size());
Expand Down
12 changes: 12 additions & 0 deletions packages/openjphjs/src/HTJ2KEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@ class HTJ2KEncoder
/// </summary>
void encode()
{
// === BEGIN FAKE_REGRESSION ===
// Artificial CPU burn so the benchmark pipeline has a known regression to
// detect. Remove this entire block before merging.
{
volatile double burn = 0.0;
for (int i = 0; i < 1000000; ++i) {
burn = (burn + static_cast<double>(i)) * 1.0000001;
}
(void)burn;
}
// === END FAKE_REGRESSION ===

encoded_.open();

// Setup image size parameters
Expand Down
Loading