From da96e2c5f239109042536500fa7eb4e1890ce3e4 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 14 Jun 2024 10:39:37 +0200 Subject: [PATCH] README.md: encode example simplify --- README.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3b28e583..c11e67a4 100644 --- a/README.md +++ b/README.md @@ -194,17 +194,11 @@ For encoding by libgpujpeg library you have to declare two structures and set proper values to them. The first is definition of encoding/decoding parameters, and the second is structure with parameters of input image: - struct gpujpeg_parameters param; - gpujpeg_set_default_parameters(¶m); - param.quality = 80; - // (default value is 75) - param.restart_interval = 16; - // (default value is 8) - param.interleaved = 1; - // (default value is 0) - - struct gpujpeg_image_parameters param_image; - gpujpeg_image_set_default_parameters(¶m_image); + struct gpujpeg_parameters param = gpujpeg_default_parameters(); + // you can adjust parameters: + param.quality = 80; // (default value is 75) + + struct gpujpeg_image_parameters param_image = gpujpeg_default_image_parameter(); param_image.width = 1920; param_image.height = 1080; param_image.color_space = GPUJPEG_RGB; // input colorspace (GPUJPEG_RGB