supplierdeeply

lossless compression work from ML forum

  • 9 Replies
  • 1467 Views
*

Online reyalp

  • ******
  • 10668
  • Publish
    lossless compression work from ML forum
    « on: 23 / December / 2016, 15:51:44 »
    Advertisements
    ProcessTwoInTwoOutLosslessPath http://www.magiclantern.fm/forum/index.php?topic=18443.0

    Haven't looked at how this might apply to P&S, but the ones with Canon raw likely have something equivalent.
    Don't forget what the H stands for.

    *

    Offline Ant

    • ****
    • 283
  • Publish
    Re: lossless compression work from ML forum
    « Reply #1 on: 23 / December / 2016, 16:01:47 »
    It can be usefull mostly for ML features like RAW video, dual ISO, full size silent pictures etc.
    No one of them were implemented in CHDK.



    *

    Offline Ant

    • ****
    • 283
  • Publish
    Re: lossless compression work from ML forum
    « Reply #2 on: 23 / December / 2016, 16:18:57 »
    To make it usefull on P&S cameras we need to find equivalent of "FA_CreateTestImage" function from DSLR.

    On your G7X_100d look at 0xFCD4609C.

    *

    Online reyalp

    • ******
    • 10668
  • Publish
    Re: lossless compression work from ML forum
    « Reply #3 on: 23 / December / 2016, 16:39:36 »
    It can be usefull mostly for ML features like RAW video, dual ISO, full size silent pictures etc.
    Losslessly compressing CHDK DNG would potentially be quite useful, especially if it could be made to work on cameras without native raw.
    Quote
    No one of them were implemented in CHDK.
    Features get implemented when someone has the interest, time and skill to do the work...
    Don't forget what the H stands for.


    *

    Offline srsa_4c

    • ******
    • 3435
  • Publish
    Re: lossless compression work from ML forum
    « Reply #4 on: 23 / December / 2016, 19:23:01 »
    Haven't looked at how this might apply to P&S, but the ones with Canon raw likely have something equivalent.
    Problem is, their current implementation relies heavily on firmware routines (and their firmwares happen to have a lot more useful annotations and test functions). HW features, that are not supported on a certain camera, have often no supporting code in firmware (one example I know is the real time native histogram).

    *

    Offline Ant

    • ****
    • 283
  • Publish
    Re: lossless compression work from ML forum
    « Reply #5 on: 24 / December / 2016, 02:59:43 »
    and their firmwares happen to have a lot more useful annotations and test functions

    Your firmware(SX280_102b) also has "annotations" (see function 0xFC29DD36) in test functions(see list at 0xFC93B650)

    *

    Offline srsa_4c

    • ******
    • 3435
  • Publish
    Re: lossless compression work from ML forum
    « Reply #6 on: 24 / December / 2016, 06:07:58 »
    Your firmware(SX280_102b) also has "annotations" (see function 0xFC29DD36) in test functions(see list at 0xFC93B650)
    I said "... a lot more ...". Can you locate, for example, any useful lossless compression related strings in the M3 dump? Nope. You can only do one thing: try finding similarities in code, using the info found on the ML site (and their source).

    *

    Offline Ant

    • ****
    • 283
  • Publish
    Re: lossless compression work from ML forum
    « Reply #7 on: 24 / December / 2016, 06:24:09 »
    finding similarities in code, using the info found on the ML site (and their source).
    There is no useful info about Digic 6 DSLRs.


    *

    Online reyalp

    • ******
    • 10668
  • Publish
    Re: lossless compression work from ML forum
    « Reply #8 on: 24 / December / 2016, 14:09:17 »
    FWIW, there is LosslessEncode.c in the G7X firmware. I don't see it in sx280, or other pre-d6 cameras, even ones with native raw support. I have a vague memory that some compression routines were identified on very early cameras (hmm, maybe I'm remembering https://chdk.setepontos.com/index.php?topic=3038.10 which isn't really related ?)

    To make it usefull on P&S cameras we need to find equivalent of "FA_CreateTestImage" function from DSLR.

    On your G7X_100d look at 0xFCD4609C.
    Factory mode functions could be one approach, but the normal raw process must also invoke it.

    The factory mode functions on non-raw capable cameras include various mentions of craw / crw, but my impression (without having dug very deeply) is that they don't actually generate proper CRW files.

    I should note I only posted the original link as something that might be interesting to investigate, not something I expect to be immediately useful.
    Don't forget what the H stands for.

    *

    Offline a1ex

    • *****
    • 671
    • ML dev
  • Publish
    Re: lossless compression work from ML forum
    « Reply #9 on: 28 / December / 2016, 09:01:15 »
    Looks like P&S and DSLR cameras share the same JPCORE firmware (which appears to be processor-based, with unknown architecture):

    http://www.magiclantern.fm/forum/index.php?topic=18443.msg177122#msg177122

    A long time ago, srsa found out how to call the MJPEG encoder, which uses the same hardware: http://chdk.setepontos.com/index.php?topic=7067.0

    I believe a portable (low-level) implementation that works on all models (both PS and DSLR) should be possible. There may be small differences between DIGIC versions or camera generations, but I don't expect them to cause major trouble.

     

    Related Topics