Skip to content

Commit 80d962f

Browse files
Johannes Ballécopybara-github
authored andcommitted
Allow reading either 4:2:0 chroma format.
PiperOrigin-RevId: 555969699 Change-Id: I44f05c10877b6a93825280e9deea5f87f6546dad
1 parent 470ff68 commit 80d962f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tensorflow_compression/cc/kernels/y4m_dataset_kernels.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ class Y4MDatasetOp : public DatasetOpKernel {
349349
case 'C':
350350
if (absl::ConsumePrefix(&header, "420jpeg")) {
351351
chroma_format = ChromaFormat::I420;
352+
} else if (absl::ConsumePrefix(&header, "420")) {
353+
chroma_format = ChromaFormat::I420;
352354
} else if (absl::ConsumePrefix(&header, "444")) {
353355
chroma_format = ChromaFormat::I444;
354356
} else {

0 commit comments

Comments
 (0)