High Jpeg Compression-Level on Sony X (Compact) leads to blurry photos

I have two Sailfish X Devices running at home (Sony XA2 with newest paid Version SFOS 4.3 and Sony X (Compact), paid Version SFOS4.3 with g7-Patch with probably nearly the same Camera (23MP)-Hardware.

I´m wondering why the Filesize of the X Compact image were drastically smaller than by the XA2 (xc = 1,6MB vs xa2 = 9MB) even the Photo is resolution-wise a little bit smaller (CX = 3392 x 5984 vs XA2 = 3096x5504). They also more blurrier and and have less quality.

So i found out that the Devices save their Photos with different Jpeg-Compressions-Levels:

Sony XA2 with Stock Android: 97% (3% loss)
Sony XA2 with Sailfish OS 4.3: 98% (2% loss)
Sony X (Compact) with Sailfish OS4.3: 85% (15% loss)

15% loss in jpeg-Quality is a lot and leads specially on dark scenes to a massive Quality-Decrease by jpeg-artefacts and more blurriness!

So is there a solution to configure the compression it in the System?

Here you can find the original Photos with original EXIF-Informations:

sony_xa2_android.jpg (5984×3376) (schapke.org)

sony_xa2_sfos43.jpg (3096×5504) (schapke.org)

sony_xc_sfos43.jpg (3392×5984) (schapke.org)

Here you can upload a jpeg and see how strong the jpeg-compression was set:
Determine quality or compression level of JPEG image online - IMG online

1 Like

I found out that there is a value named #define DEFAULT_JPEG_QUALITY 90 in File gstdroidcamsrc.c, so its kind of Hardcoded and no quirk if i read and understand the code correctly.

Maybe its a good Idea to leave that hardcoded Value out to a configurable quirk in Future Updates of Sailfish OS?

At this time i´m not able to do a modification and recompile.

https://github.com/sailfishos/gst-droid/blob/master/gst/droidcamsrc/gstdroidcamsrc.c

I’ll look into a recompile and package for this. Such a silly parameter to hardcode…

2 Likes

After a quick glance at the code, I would say it’s not hardcoded.
As the name of the #define suggests, 90 is the default quality set when gst_droidcamsrc_init is called to initialize the GstDroidCamSrc struct. It can be changed later by calling gst_droidcamsrc_set_property.

2 Likes

After a quick glance at the code, I would say it’s not hardcoded. As the name of the #define suggests, 90 is the default quality set gst_droidcamsrc_init is called to initialize the GstDroidCamSrc struct. It can be changed later by calling gst_droidcamsrc_set_property.

Sounds good but where (file path and file) and what (command) to set?

Glad that’s the situation. Much easier to just be able to dictate the setting than track the code change across upgrades.