You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of coding the n+1 bits of the Sample Difference with Huffman or Range coding (or n+2 bits, in the case of RCT), only the n (or n+1) least significant bits are used, since this is sufficient to recover the original sample. In the equation below, the term "bits" represents bits_per_raw_sample+1 for RCT or bits_per_raw_sample otherwise:
@@ -714,6 +718,10 @@ Parameters( ) { |
714
718
for (i = 1; i < 256; i++) |
715
719
state_transition_delta[ i ] | sr
716
720
colorspace_type | ur
721
+
if (colorspace_type == 2) { |
722
+
for( i = 0; i < 4; i++ ) { |
723
+
cfa_pattern [ i ] | ur
724
+
} |
717
725
if (version >= 1) |
718
726
bits_per_raw_sample | ur
719
727
chroma_planes | br
@@ -808,10 +816,26 @@ If state_transition_delta is not present in the FFV1 bitstream, all Range coder
| 0 | YCbCr | No Pixel transformation | plane then line |
810
818
| 1 | RGB | JPEG2000-RCT | line then plane |
819
+
| 2 | Color Filter Array | JPEG2000-RCT + G difference | line then plane |
811
820
| Other | reserved for future use | reserved for future use | reserved for future use |
812
821
813
822
Restrictions:
814
823
If `colorspace_type` is 1, then `chroma_planes` MUST be 1, `log2_h_chroma_subsample` MUST be 0, and `log2_v_chroma_subsample` MUST be 0.
824
+
If `colorspace_type` is 2, then `chroma_planes` MUST be 1, `log2_h_chroma_subsample` MUST be 0, and `log2_v_chroma_subsample` MUST be 0, transparency MUST be 1.
825
+
826
+
### cfa_pattern
827
+
828
+
`cfa_pattern` indicates the actual color filter array geometric pattern of the image sensor used to capture the single sensor color image.
829
+
The pattern is provided per line top to bottom, and for each line left to right.
830
+
831
+
|value | color |
832
+
|-------|:--------------------------------|
833
+
|0 | red |
834
+
|1 | green |
835
+
|2 | blue |
836
+
837
+
Restrictions:
838
+
At least 1 component of each color must be present.
0 commit comments