Browse Source

LibGfx/JPEGWriter: Don't throw away highest-frequency component in FDCT

Nico Weber 1 year ago
parent
commit
c3c7707de4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Libraries/LibGfx/ImageFormats/JPEGWriter.cpp

+ 2 - 2
Userland/Libraries/LibGfx/ImageFormats/JPEGWriter.cpp

@@ -169,9 +169,9 @@ public:
                     return sum;
                     return sum;
                 };
                 };
 
 
-                for (u8 u {}; u < 7; ++u) {
+                for (u8 u {}; u < 8; ++u) {
                     double const cu = u == 0 ? inverse_sqrt_2 : 1;
                     double const cu = u == 0 ? inverse_sqrt_2 : 1;
-                    for (u8 v {}; v < 7; ++v) {
+                    for (u8 v {}; v < 8; ++v) {
                         auto const table_index = u * 8 + v;
                         auto const table_index = u * 8 + v;
 
 
                         double const cv = v == 0 ? inverse_sqrt_2 : 1;
                         double const cv = v == 0 ? inverse_sqrt_2 : 1;