Skip to content

Commit e35b0c1

Browse files
committed
Revert "Bug 1997997 - add test for 10/12-bit VP9 video. r=media-playback-reviewers,alwu" for causing mda failure on test_non_8bit_video.html
This reverts commit 1a24cc9. This reverts commit 392dd46.
1 parent cbb0a6f commit e35b0c1

File tree

6 files changed

+12
-27
lines changed

6 files changed

+12
-27
lines changed

dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -649,11 +649,6 @@ void FFmpegVideoDecoder<LIBAV_VER>::InitHWDecoderIfAllowed() {
649649
}
650650
#endif // MOZ_USE_HWDECODE
651651

652-
static bool ShouldEnable8BitConversion(const struct AVCodec* aCodec) {
653-
return 0 == strncmp(aCodec->name, "libdav1d", 8) ||
654-
0 == strncmp(aCodec->name, "vp9", 3);
655-
}
656-
657652
RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init() {
658653
AUTO_PROFILER_LABEL("FFmpegVideoDecoder::Init", MEDIA_PLAYBACK);
659654
FFMPEG_LOG("FFmpegVideoDecoder, init, IsHardwareAccelerated=%d\n",
@@ -666,9 +661,11 @@ RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init() {
666661
if (NS_FAILED(rv)) {
667662
return InitPromise::CreateAndReject(rv, __func__);
668663
}
669-
m8BitOutput = m8BitOutput && ShouldEnable8BitConversion(mCodecContext->codec);
664+
// Enable 8-bit conversion only for dav1d.
665+
m8BitOutput =
666+
m8BitOutput && 0 == strncmp(mCodecContext->codec->name, "libdav1d", 8);
670667
if (m8BitOutput) {
671-
FFMPEG_LOG("Enable 8-bit output for %s", mCodecContext->codec->name);
668+
FFMPEG_LOG("Enable 8-bit output for dav1d");
672669
m8BitRecycleBin = MakeRefPtr<BufferRecycleBin>();
673670
}
674671
return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
@@ -1689,11 +1686,6 @@ MediaResult FFmpegVideoDecoder<LIBAV_VER>::CreateImage(
16891686
// that. If this shared memory buffer path also generated a
16901687
// MacIOSurfaceImage, then we could use it for HDR.
16911688
requiresCopy = (b.mColorDepth != gfx::ColorDepth::COLOR_8);
1692-
# endif
1693-
# ifdef MOZ_WIDGET_ANDROID
1694-
// Some Android devices can only render 8-bit images and cannot use high
1695-
// bit-depth decoded data directly.
1696-
requiresCopy = m8BitOutput && b.mColorDepth != gfx::ColorDepth::COLOR_8;
16971689
# endif
16981690
if (mIsUsingShmemBufferForDecode && *mIsUsingShmemBufferForDecode &&
16991691
!requiresCopy) {

dom/media/test/mochitest_compat.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -694,10 +694,6 @@ support-files = [
694694
"video-overhang.ogg^headers^",
695695
"vp9-superframes.webm",
696696
"vp9-superframes.webm^headers^",
697-
"vp9-yuv420p10.webm",
698-
"vp9-yuv420p10.webm^headers^",
699-
"vp9-yuv420p12.webm",
700-
"vp9-yuv420p12.webm^headers^",
701697
"vp9.webm",
702698
"vp9.webm^headers^",
703699
"vp9-short.webm",
@@ -770,6 +766,8 @@ support-files = [
770766
["test_audioDocumentTitle.html"]
771767
skip-if = ["true"] # bug 475110 - disabled since we don't play Wave files standalone
772768

769+
["test_av1_high_professional_profiles.html"]
770+
773771
["test_buffered.html"]
774772

775773
["test_bug1431810_opus_downmix_to_mono.html"]
@@ -898,8 +896,6 @@ skip-if = ["os == 'win' && os_version == '11.26100' && arch == 'x86_64' && debug
898896

899897
["test_no_load_event.html"]
900898

901-
["test_non_8bit_video.html"]
902-
903899
["test_not_reset_playbackRate_when_removing_nonloaded_media_from_document.html"]
904900

905901
["test_paused.html"]

dom/media/test/test_non_8bit_video.html renamed to dom/media/test/test_av1_high_professional_profiles.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Test 10/12-bit video files</title>
4+
<title>Test High and Professional profile AV1 video files</title>
55
<script src="/tests/SimpleTest/SimpleTest.js"></script>
66
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
77
<script type="application/javascript">
88

9-
/** This test checks if 10- and 12-bit video plays. */
10-
const videos = ["av1-yuv444p10.webm", "av1-yuv422p10.webm", "av1-yuv444p12.webm",
11-
"vp9-yuv420p10.webm", "vp9-yuv420p12.webm"];
9+
/** This test checks if 10- and 12-bit AV1 video plays. */
10+
const av1Files = ["av1-yuv444p10.webm", "av1-yuv422p10.webm", "av1-yuv444p12.webm"];
1211
add_task(async function testPlayAll() {
13-
await Promise.all(videos.map(
12+
await Promise.all(av1Files.map(
1413
(f) => {
1514
let v = document.createElement("video");
1615
document.body.appendChild(v);
1716
v.src = f;
1817
return v;
1918
}).map(
2019
(v) => v.play())).then(
21-
() => ok(true, "All video played."),
22-
(e) => ok(false, "Play video error: " + e));
20+
() => ok(true, "All AV1 video played."),
21+
(e) => ok(false, "Play AV1 video error: " + e));
2322
});
2423

2524
</script>

dom/media/test/vp9-yuv420p10.webm^headers^

Lines changed: 0 additions & 1 deletion
This file was deleted.

dom/media/test/vp9-yuv420p12.webm

-23.4 KB
Binary file not shown.

dom/media/test/vp9-yuv420p12.webm^headers^

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)