dud...@gmail.com schrieb am Mittwoch, 27. September 2023 um 00:01:02 UTC+2:

Just want to put out this again but with a refined change.
In *ImageTransformsGPU.cpp *we have following
*:*
    const int bytesPerDestPixel = 16 + 16 + 8
                                  + ((XGLMap[destGLTransferFormat] != 
GL_RGBA32F_ARB) ? BytesPerPixel[destGLTransferFormat] : 0)
                                  + ((destAlphaBuffer != NULL) ? 1 : 0);
    const long long int maxDestPixels = gpuMemoryRemaining / 
bytesPerDestPixel;


*Change to below for mac M1 ARM 64-bit:*
    const int bytesPerDestPixel = 16 + 16 + 8
                                  + ((XGLMap[destGLTransferFormat] != 
GL_RGBA32F_ARB) ? BytesPerPixel[destGLTransferFormat] : 0)
                                  + ((destAlphaBuffer != NULL) ? 1 : 0);
    #ifdef __aarch64__  // Check for ARM 64-bit architecture
   * const long long int maxDestPixels = gpuMemoryRemaining / 
bytesPerDestPixel / 2;*
    #else
    const long long int maxDestPixels = gpuMemoryRemaining / 
bytesPerDestPixel;
    #endif


I asked you already the last time to use a diff file and not to copy this 
into the mail. The mail program does often mangle the format. And the exact 
line in the code is unknown, I have to guess. (It may works in this simple 
case, but for more complicated one this becomes more complicated.)
 


By reducing bytesPerDestPixel by half I can process huge files on my M1. 
Tested 20000 X  13333 pixel files and they come out just fine. My first fix 
would segfault on these files.
Of course this could be tested more and maybe you want a version to try 
mikko? You are actually the first person I hear about selecting the GPU 
option working on M1.

If tested around some maybe it would be a legit fix? What´s your opinion 
T.Modes?


If you can explain why a factor of 2 is needed only for the Mac M1, yes. 
And why 2 and not any other random number?
And it works for me is not enough.  There are many more use case than your 
limited testing with only 20000 pixel and only a limited format variation.

Thomas

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/8c62eaf2-2b34-4af3-8242-14fdcee5bf5en%40googlegroups.com.

Reply via email to