diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java index 668d5a4595..dab64812a6 100644 --- a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java +++ b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java @@ -213,6 +213,11 @@ public final class Mp4ExtractorParameterizedTest { assertExtractorBehavior("media/mp4/sample_iamf.mp4"); } + @Test + public void mp4SampleWithMvHevc8bit() throws Exception { + assertExtractorBehavior("media/mp4/water_180_mvhevc_5frames.mov"); + } + private void assertExtractorBehavior(String file) throws IOException { ExtractorAsserts.AssertionConfig.Builder assertionConfigBuilder = new ExtractorAsserts.AssertionConfig.Builder(); diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.0.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.0.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.1.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.1.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.2.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.2.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.3.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.3.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.0.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.0.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.1.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.1.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.2.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.2.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.3.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.3.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.unknown_length.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.reading_within_gop_sample_dependencies.unknown_length.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.unknown_length.dump new file mode 100644 index 0000000000..ac64faf227 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/water_180_mvhevc_5frames.mov.unknown_length.dump @@ -0,0 +1,51 @@ +seekMap: + isSeekable = true + duration = 55555 + getPosition(0) = [[timeUs=0, position=36]] + getPosition(1) = [[timeUs=0, position=36]] + getPosition(27777) = [[timeUs=0, position=36]] + getPosition(55555) = [[timeUs=0, position=36]] +numberOfTracks = 1 +track 0: + total output bytes = 86208 + sample count = 5 + format 0: + id = 1 + sampleMimeType = video/mv-hevc + codecs = hvc1.6.40.L156.BF.80 + maxInputSize = 40098 + maxNumReorderSamples = 2 + width = 1934 + height = 2160 + frameRate = 90.0009 + colorInfo: + colorSpace = 1 + colorRange = 2 + colorTransfer = 3 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[Mp4Timestamp: creation time=3803488223, modification time=3803488223, timescale=11520] + initializationData: + data = length 124, hash CAFF1DA1 + data = length 27, hash 23A1DCCE + sample 0: + time = 0 + flags = 1 + data = length 40068, hash A863CAFC + sample 1: + time = 44444 + flags = 0 + data = length 18167, hash AA9B6C63 + sample 2: + time = 22222 + flags = 0 + data = length 11313, hash 39F384B0 + sample 3: + time = 11111 + flags = 0 + data = length 7989, hash 3AAF059 + sample 4: + time = 33333 + flags = 536870912 + data = length 8671, hash 30D44CD +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/media/mp4/water_180_mvhevc_5frames.mov b/libraries/test_data/src/test/assets/media/mp4/water_180_mvhevc_5frames.mov new file mode 100644 index 0000000000..adfa229b92 Binary files /dev/null and b/libraries/test_data/src/test/assets/media/mp4/water_180_mvhevc_5frames.mov differ