26 #include <fvutils/color/colorspaces.h> 27 #include <fvutils/compression/jpeg_compressor.h> 29 #include <utils/time/tracker.h> 37 #define IMAGE_WIDTH 500 38 #define IMAGE_HEIGHT 500 40 #define NUM_CYCLES 100 43 #define DEST_BUF_SIZE 500000 46 main(
int argc,
char **argv)
49 unsigned char *yuv422planar = malloc_buffer(YUV422_PLANAR, IMAGE_WIDTH, IMAGE_HEIGHT);
50 unsigned char *compressed = (
unsigned char *)malloc(DEST_BUF_SIZE);
53 JpegImageCompressor::JPEG_CS_RGB);
62 for (
unsigned int i = 0; i < NUM_CYCLES; ++i) {
63 printf(
"Compress %u\n", i);
void ping(unsigned int cls)
Ping class.
virtual void set_compression_destination(ImageCompressor::CompressionDestination cd)
Set compression destination.
Fawkes library namespace.
virtual size_t compressed_size()
Get compressed size.
virtual void compress()
Compress image.
virtual void set_image_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer to compress.
virtual void set_image_dimensions(unsigned int width, unsigned int height)
Set dimensions of image to compress.
virtual void set_destination_buffer(unsigned char *buf, unsigned int buf_size)
Set destination buffer (if compressing to memory).
void print_to_stdout()
Print results to stdout.