{"id":10,"date":"2009-07-01T17:51:20","date_gmt":"2009-07-01T17:51:20","guid":{"rendered":"https:\/\/blogs.scummvm.org\/st\/?p=10"},"modified":"2022-05-23T17:53:37","modified_gmt":"2022-05-23T17:53:37","slug":"beating-jpeg","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/st\/2009\/07\/01\/beating-jpeg\/","title":{"rendered":"Beating JPEG"},"content":{"rendered":"<p>One of the main sticking points for working on The 11th Hour recently (ignoring lack of time) has been the still frames within ROQ files. Although seemingly trivial within T7G, 11H uses more complex\/advanced image compression for both video and stills. The video frames have been working for a while with some very minor glitches however the still frames use JPEG, and it&#8217;s hard to find a decent documentation source. Never-the-less, some work had been done prior to now by <a href=\"https:\/\/web.archive.org\/web\/20120320103227\/http:\/\/clone2727.blogspot.com\/\">clone2727<\/a> (for Mohawk) and jvprat which I obtained last week and then became rather obsessed with fixing =P<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/120.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12\" src=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/120.png\" alt=\"\" width=\"656\" height=\"516\" srcset=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/120.png 656w, https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/120-300x236.png 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/a>From rather simple beginnings, there were some rather critical issues to be fixed first (ie, missing functionality) which rapidly pushed towards a greyscale image.<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/122.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13\" src=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/122.png\" alt=\"\" width=\"656\" height=\"516\" srcset=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/122.png 656w, https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/122-300x236.png 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/a>Fiddling here and there resulted in a vast number of -ish improvements until a breakthrough resulted in the following:<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/129.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14\" src=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/129.png\" alt=\"\" width=\"656\" height=\"516\" srcset=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/129.png 656w, https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/129-300x236.png 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/a>All the AC components of the image seemed fine so after fixing an issue with the DC values, success was reached. Five minutes of tinkering to add JPEG to the <a href=\"https:\/\/web.archive.org\/web\/20120320103227\/http:\/\/scummvmupthorn09.wordpress.com\/\">16bpp branch<\/a> and we have the final image, rendered in RGB.<\/p>\n<p><a href=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/131.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15\" src=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/131.jpg\" alt=\"\" width=\"656\" height=\"516\" srcset=\"https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/131.jpg 656w, https:\/\/blogs.scummvm.org\/st\/wp-content\/uploads\/sites\/40\/2009\/07\/131-300x236.jpg 300w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/a>For those interested in the progress shots, the <a href=\"https:\/\/web.archive.org\/web\/20120320103227\/http:\/\/sthomas.id.au\/non-site\/svm\/jpegs\">(semi-permanent) gallery<\/a> has many ways of not to decode a JPEG.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the main sticking points for working on The 11th Hour recently (ignoring lack of time) has been the still frames within ROQ files. Although seemingly trivial within T7G, 11H uses more complex\/advanced image compression for both video and stills. The video frames have been working for a while with some very minor glitches [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":16,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/posts\/10\/revisions\/16"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/st\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}