Skip to content

Commit

Permalink
README.md: encode example simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Jun 14, 2024
1 parent 005ea2a commit da96e2c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(&param);
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(&param_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
Expand Down

0 comments on commit da96e2c

Please sign in to comment.