26#include <fvutils/color/colorspaces.h>
27#include <fvutils/compression/jpeg_compressor.h>
28#include <utils/time/tracker.h>
35using namespace firevision;
37#define IMAGE_WIDTH 500
38#define IMAGE_HEIGHT 500
43#define DEST_BUF_SIZE 500000
46main(
int argc,
char **argv)
48 unsigned char *yuv422planar = malloc_buffer(YUV422_PLANAR, IMAGE_WIDTH, IMAGE_HEIGHT);
49 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 print_to_stdout()
Print results to stdout.
void ping(unsigned int cls)
Ping class.
virtual void compress()
Compress image.
virtual size_t compressed_size()
Get compressed size.
virtual void set_image_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer to compress.
virtual void set_compression_destination(ImageCompressor::CompressionDestination cd)
Set compression destination.
virtual void set_destination_buffer(unsigned char *buf, unsigned int buf_size)
Set destination buffer (if compressing to memory).
virtual void set_image_dimensions(unsigned int width, unsigned int height)
Set dimensions of image to compress.
Fawkes library namespace.