diff Core/ImageFormats/ImageBuffer.cpp @ 844:502c49adb5ad jpeg

jpeg lossless
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Jun 2014 14:08:23 +0200
parents a811bdf8b8eb
children 839be3022203
line wrap: on
line diff
--- a/Core/ImageFormats/ImageBuffer.cpp	Wed Jun 04 17:57:59 2014 +0200
+++ b/Core/ImageFormats/ImageBuffer.cpp	Thu Jun 05 14:08:23 2014 +0200
@@ -39,6 +39,13 @@
   {
     if (changed_)
     {
+      /*
+        if (forceMinimalPitch_)
+        {
+        TODO: Align pitch and memory buffer to optimal size for SIMD.
+        }
+      */
+
       pitch_ = GetBytesPerPixel() * width_;
 
       data_.resize(pitch_ * height_);
@@ -59,6 +66,7 @@
   ImageBuffer::ImageBuffer() : changed_(false)
   {
     changed_ = false;
+    forceMinimalPitch_ = true;
     format_ = PixelFormat_Grayscale8;
     width_ = 0;
     height_ = 0;
@@ -106,4 +114,11 @@
     accessor.AssignReadOnly(format_, width_, height_, pitch_, buffer_);
     return accessor;
   }
+
+
+  void ImageBuffer::SetMinimalPitchForced(bool force)
+  {
+    changed_ = true;
+    forceMinimalPitch_ = force;
+  }
 }