Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoPro HERO5 Black raw "format" #40

Closed
LebedevRI opened this issue Jan 19, 2017 · 12 comments
Closed

GoPro HERO5 Black raw "format" #40

LebedevRI opened this issue Jan 19, 2017 · 12 comments

Comments

@LebedevRI
Copy link
Member

Just so it does not get lost
Copied from https://redmine.darktable.org/issues/11466

The .GPR format is an extension Adobe’s .DNG format, adding enhanced compression (VC5 Standard)

A sample file:
https://raw.pixls.us/getfile.php/936/raw/GOPR0020.GPR

FAQ from GoPro about the file format:
https://gopro.com/help/articles/Question_Answer/What-is-RAW-Format

An interesting blogpost about the "VC5 Standard" 
https://medium.com/@kierank_/reverse-engineering-the-gopro-cineform-codec-7411312bfe1c#.9f7ztpjo8
@supertobi
Copy link

Here is the jpeg version of the photo:

gopr0020

@supertobi
Copy link

GoPro HERO5 Black RawTherapee issue:
Beep6581/RawTherapee#3569

@shoffmeister
Copy link
Contributor

https://trac.ffmpeg.org/ticket/1087

https://git.ffmpeg.org/gitweb/ffmpeg.git/blob_plain/HEAD:/libavcodec/cfhd.c <-- that is supposed to decode the video, so the compression might serve as a template?

This codec goes by VC-5 (misnamed, it seems), cfhd, CineForm HD.

Also: http://cineform.com/compression-subsystem

@supertobi
Copy link

@LebedevRI
Copy link
Member Author

LebedevRI commented Oct 27, 2017

Yep, seen that yesterday.
I suppose libraw will want to link to that.
As for rawspeed, i suppose a clean, minimal implementation (with less horrible code than that, and no double/triple-licensing shenanigans) could be added by implementing from scratch.

@LibRaw
Copy link
Contributor

LibRaw commented Oct 28, 2017

I suppose libraw will want to link to that.

Most likely no in (coming) 0.19, but most likely yes in next version cycle

@pzemlyan
Copy link

pzemlyan commented May 5, 2018

General Purpose Raw image format API was released: https://github.com/gopro/gpr
Also a few HERO6 samples was uploaded: https://raw.pixls.us/getfile.php/2556/nice/GoPro%20-%20HERO6%20Black%20-%2016bit%20(4:3).GPR

@supertobi
Copy link

GoPro just released the HERO7, are there any news here ore in @LibRaw?

@LebedevRI
Copy link
Member Author

Here - no, nothing has changed.

After reading through the existing crumbs of info on the Canon's CRX codec,
they both seem to be based on wavelets, which is, i suppose, not all that surprising.
So maybe after Canon's CRX codec is implemented,
maybe this could be implemented on top of that code.

@lclevy
Copy link

lclevy commented Sep 24, 2018

https://github.com/lclevy/canon_cr3/blob/master/readme.md#crx-compression

@stloeffler
Copy link
Contributor

As I needed this myself, I implemented a basic GPR decompressor in #146 - I hope this helps.

@supertobi
Copy link

Btw. I just discovered this project:
https://github.com/emericg/libcineform

LebedevRI added a commit to LebedevRI/rawspeed that referenced this issue Oct 15, 2018
…essor

Refs. darktable-org#146
Refs. darktable-org#40
Refs. https://redmine.darktable.org/issues/11466

Initial performance numbers:

$ ~/rawspeed/build-Clang-Release/src/utilities/rsbench/rsbench --benchmark_display_aggregates_only=true --benchmark_counters_tabular=true --benchmark_repetitions=100 GOPR9172.GPR
2018-10-09 13:34:47
Running /home/lebedevri/rawspeed/build-Clang-Release/src/utilities/rsbench/rsbench
Run on (8 X 4000 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                        Time           CPU Iterations  CPUTime,s CPUTime/WallTime     Pixels Pixels/CPUTime Pixels/WallTime Raws/CPUTime Raws/WallTime WallTime,s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_mean          334 ms        334 ms          2   0.333654         0.999958        12M       35.9684M        35.9669M      2.99737       2.99724   0.333668
GOPR9172.GPR/threads:8/real_time_median        334 ms        334 ms          2   0.334033                1        12M       35.9246M        35.9213M      2.99372       2.99344   0.334064
GOPR9172.GPR/threads:8/real_time_stddev          3 ms          3 ms          2   3.05262m         73.7799u          0        329.75k        330.147k    0.0274792     0.0275122   3.05653m


* upstream/pr/146:
  Misc comment cleanup in VC5Decompressor
  Simplify GoPro entries in cameras.xml
  clang-format VC5Decompressor and related changes
  Add support for GoPro Fusion and Hero7
  Fix some bit clamping issues in the VC5 decompressor + misc cleanup
  Fix typo and rounding errors in VC5Decompressor
  Fix several clang warnings in VC5Decompressor
  Update table17.inc with new upstream version
  Add support for GoPro's .GPR file format
LebedevRI added a commit to LebedevRI/darktable that referenced this issue Oct 27, 2018
…support

* Support for GoPro ".GPR" raws.
  Thanks to the initial patch by
  Stefan Löffler, https://github.com/stloeffler
  darktable-org/rawspeed#146
  darktable-org/rawspeed#40
* Nikon Z 7 camera support.
  Only uncompressed 14-bit raw does not decode,
  will look into that later, hopefully not many will use
  it anyway, due to it's filesize.

Note that the new VC5Decompressor is parallized using OpenMP,
so it is really best to have openmp support.

Also, update the compiler-versions.cmake from RawSpeed, changes
* gcc 5.0 is still the required version.
* clang 3.9 (instead of 3.5) is now required.
* Thus, both of the compilers provide full OpenMP 4.0 support.
* Outline the forward path (gcc 7, clang 4.0), not yet in effect.

Fixes darktable-org#11466.
Fixes darktable-org#12322.
rawfiner pushed a commit to rawfiner/darktable that referenced this issue Nov 2, 2018
…support

* Support for GoPro ".GPR" raws.
  Thanks to the initial patch by
  Stefan Löffler, https://github.com/stloeffler
  darktable-org/rawspeed#146
  darktable-org/rawspeed#40
* Nikon Z 7 camera support.
  Only uncompressed 14-bit raw does not decode,
  will look into that later, hopefully not many will use
  it anyway, due to it's filesize.

Note that the new VC5Decompressor is parallized using OpenMP,
so it is really best to have openmp support.

Also, update the compiler-versions.cmake from RawSpeed, changes
* gcc 5.0 is still the required version.
* clang 3.9 (instead of 3.5) is now required.
* Thus, both of the compilers provide full OpenMP 4.0 support.
* Outline the forward path (gcc 7, clang 4.0), not yet in effect.

Fixes darktable-org#11466.
Fixes darktable-org#12322.
@LebedevRI LebedevRI added this to All in New Raw Formats via automation Jun 25, 2019
@LebedevRI LebedevRI moved this from All to Resolved in New Raw Formats Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Resolved
New Raw Formats
  
Resolved
Development

No branches or pull requests

7 participants