dburckh / AndroidLibRaw

Another Android LibRaw implementation. LibRaw is used to render raw camera files (e.g NEF, CR2, ARW). Contains a sample app that show a simple implementation.
4 stars 5 forks source link

Multithreading #2

Open Almatsum opened 2 years ago

Almatsum commented 2 years ago

Hello sir, Thanks for this great work. I am wondering if it is possible to enable multithreading for an example split the raw image into 4 blocks and decode each block using seprate thread, at the end recombine all the blocks together so in theory we gain 4x speed.

As the main brain of thia project is libraw which is based on dcraw i found this nice guy who did some optimization to it to gain more speed https://github.com/ttyridal/dcraw-fast I will be happy if you could Implement it in your project.

Waiting to your reply.

Thanks in advance.

Almatsum.

dburckh commented 2 years ago

I think you grossly overestimated my knowledge of the inner workings of libraw. :) In a nutshell, I just wrapped libraw and got it to compile for Android. The Android wrapper is is so light compared to what libraw does, there isn't a lot of point in multithreading on my end.

I found this quote from the libraw author on multithreading, but it's quite old now.

https://www.libraw.org/node/1349

Sorry I can't be of more help,

Dustin

Almatsum commented 1 year ago

Hello sir,

Thank you for providing us this awesome wrapper. Just I want to ask about what is the use of decodeTiles function?

dburckh commented 1 year ago

It illustrates how you could decode parts of the image. Most images at 1:1 are well beyond what can be displayed on a screen. This shows how you could cut them into tiles so when you pan, you can just build parts of the image. You could also use it to crop an image to fit the screen.

Tiling is how Google Maps works. They can't load a detailed map of the world into the device, so they cut it up into smaller tiles and send those to the device.

I hope this helps,

Dustin

On Fri, Oct 28, 2022 at 2:36 AM Almatsum @.***> wrote:

Hello sir,

Thank you for providing us this awesome wrapper. Just I want to ask about what is the use of decodeTiles function?

— Reply to this email directly, view it on GitHub https://github.com/dburckh/AndroidLibRaw/issues/2#issuecomment-1294703350, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM2VUIBWAZNBWQZKQOTZQTWFOGCFANCNFSM52DRFKHA . You are receiving this because you commented.Message ID: @.***>