Skip to content

Commit

Permalink
Don't include macro block in RDD36 stored dimensions
Browse files Browse the repository at this point in the history
RDD 44:2022 revised the stored dimensions to not be a multiple of
the macro block size as is suggested by ST 377-1 section G.1.1
  • Loading branch information
philipnbbc committed Aug 16, 2023
1 parent 421cf6f commit 27d84a3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/mxf_helper/RDD36MXFDescriptorHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ void RDD36MXFDescriptorHelper::UpdateFileDescriptor(RDD36EssenceParser *essence_
cdci_descriptor->setDisplayF2Offset(0);
}

// stored dimensions are a multiple of 16, the macro block size
cdci_descriptor->setStoredWidth((cdci_descriptor->getDisplayWidth() + 15) / 16 * 16);
cdci_descriptor->setStoredHeight((cdci_descriptor->getDisplayHeight() + 15) / 16 * 16);
// RDD 44:2022 revised the stored dimensions to not be a multiple of the macro block size as
// is suggested by ST 377-1 section G.1.1
cdci_descriptor->setStoredWidth(cdci_descriptor->getDisplayWidth());
cdci_descriptor->setStoredHeight(cdci_descriptor->getDisplayHeight());
cdci_descriptor->setDisplayXOffset(0);
cdci_descriptor->setDisplayYOffset(0);
if (essence_parser->GetChromaFormat() == RDD36_CHROMA_422)
Expand Down
2 changes: 1 addition & 1 deletion test/imf/test_rdd36_1.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
43c166b85bb745f6c3d6524ece0f4a26
1739de248688ba3371d0ad5a8bd0e0a1
2 changes: 1 addition & 1 deletion test/imf/test_rdd36_2.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ce7b2f58f21bde0401c4c1e598d8c37d
1c5c94edfbe653029e4ffb5839799122
2 changes: 1 addition & 1 deletion test/mxf_op1a/rdd36_422.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d66af8c95686e9a7459eb48749a3829d
2e72ef35505629494ca1b40a9c24bee9
2 changes: 1 addition & 1 deletion test/mxf_op1a/rdd36_4444.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ee7bb3b13ebceb2850d2fc8c3dcfb92e
463060631a6da022573fcda8a7189e6c

0 comments on commit 27d84a3

Please sign in to comment.