Skip to content

Commit 1a1dc70

Browse files
JPEG2000-RCT formula update
In order to be compatible with files in the wild
1 parent 6467005 commit 1a1dc70

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

ffv1.md

+35
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,41 @@ RFC:```
272272
RFC:b=Cb+g
273273
RFC:```
274274

275+
Exception for the reversible conversions between YCbCr and RGB:
276+
if bits_per_raw_sample is between 9 and 15 inclusive, the following formulae for reversible conversions between YCbCr and RGB MUST be used instead of the ones above:
277+
278+
PDF:$$Cb=g-b$$
279+
RFC:```
280+
RFC:Cb=g-b
281+
RFC:```
282+
283+
PDF:$$Cr=r-b$$
284+
RFC:```
285+
RFC:Cr=r-b
286+
RFC:```
287+
288+
PDF:$$Y=b+(Cb+Cr)>>2$$
289+
RFC:```
290+
RFC:Y=b+(Cb+Cr)>>2
291+
RFC:```
292+
293+
PDF:$$b=Y-(Cb+Cr)>>2$$
294+
RFC:```
295+
RFC:b=Y-(Cb+Cr)>>2
296+
RFC:```
297+
298+
PDF:$$r=Cr+b$$
299+
RFC:```
300+
RFC:r=Cr+b
301+
RFC:```
302+
303+
PDF:$$g=Cb+b$$
304+
RFC:```
305+
RFC:g=Cb+b
306+
RFC:```
307+
308+
Background: At the time of this writing, in all known implementations of FFV1 bitstream, when bits_per_raw_sample was between 9 and 15 inclusive, GBR planes were used as BGR planes during both encoding and decoding. In the meanwhile, 16-bit JPEG2000-RCT color space was implemented without this issue in one implementation and validated by one conformance checker. It is expected (to be confirmed) to remove this exception for the transform in the next version of the bitstream.
309+
275310
[@!ISO.15444-1.2016]
276311

277312
An FFV1 frame using JPEG2000-RCT MUST use one of the following arrangements:

0 commit comments

Comments
 (0)