summaryrefslogtreecommitdiffstats
path: root/dom/media/platforms
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 22:11:39 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 22:11:39 -0500
commitee1300453eb6e6d32962476351cf4e0391e8b4c4 (patch)
tree5d48e10c541abdc32c2ccca40d8c838b7ad37c7d /dom/media/platforms
parent4f63fc3bdd8d6e3e684b6ed8eb794c71889ebf83 (diff)
downloadUXP-ee1300453eb6e6d32962476351cf4e0391e8b4c4.tar
UXP-ee1300453eb6e6d32962476351cf4e0391e8b4c4.tar.gz
UXP-ee1300453eb6e6d32962476351cf4e0391e8b4c4.tar.lz
UXP-ee1300453eb6e6d32962476351cf4e0391e8b4c4.tar.xz
UXP-ee1300453eb6e6d32962476351cf4e0391e8b4c4.zip
Updates to AOMDecoder for aom v1.0.0
This reflects the API changes to the aom_codec_decode function and the removal of I440. It also sets allow_lowbitdepth to give proper support for 8 bit video, and removes the git version from the mime type.
Diffstat (limited to 'dom/media/platforms')
-rw-r--r--dom/media/platforms/agnostic/AOMDecoder.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/dom/media/platforms/agnostic/AOMDecoder.cpp b/dom/media/platforms/agnostic/AOMDecoder.cpp
index 9999aac8f..d4ce299b4 100644
--- a/dom/media/platforms/agnostic/AOMDecoder.cpp
+++ b/dom/media/platforms/agnostic/AOMDecoder.cpp
@@ -62,6 +62,7 @@ AOMDecoder::Init()
PodZero(&config);
config.threads = decode_threads;
config.w = config.h = 0; // set after decode
+ config.allow_lowbitdepth = true;
aom_codec_flags_t flags = 0;
@@ -101,7 +102,6 @@ highbd_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) {
case AOM_IMG_FMT_I420:
case AOM_IMG_FMT_I422:
case AOM_IMG_FMT_I444:
- case AOM_IMG_FMT_I440:
break;
default:
return AOM_CODEC_INVALID_PARAM;
@@ -110,7 +110,6 @@ highbd_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) {
case AOM_IMG_FMT_I42016:
case AOM_IMG_FMT_I42216:
case AOM_IMG_FMT_I44416:
- case AOM_IMG_FMT_I44016:
break;
default:
// We don't support anything that's not 16 bit
@@ -150,7 +149,7 @@ AOMDecoder::DoDecode(MediaRawData* aSample)
"AOM Decode Keyframe error sample->mKeyframe and si.si_kf out of sync");
#endif
- if (aom_codec_err_t r = aom_codec_decode(&mCodec, aSample->Data(), aSample->Size(), nullptr, 0)) {
+ if (aom_codec_err_t r = aom_codec_decode(&mCodec, aSample->Data(), aSample->Size(), nullptr)) {
LOG("AOM Decode error: %s", aom_codec_err_to_string(r));
return MediaResult(
NS_ERROR_DOM_MEDIA_DECODE_ERR,
@@ -305,13 +304,7 @@ AOMDecoder::IsAV1(const nsACString& aMimeType)
bool
AOMDecoder::IsSupportedCodec(const nsAString& aCodecType)
{
- // While AV1 is under development, we describe support
- // for a specific aom commit hash so sites can check
- // compatibility.
- auto version = NS_ConvertASCIItoUTF16("av1.experimental.");
- version.AppendLiteral("d14c5bb4f336ef1842046089849dee4a301fbbf0");
- return aCodecType.EqualsLiteral("av1") ||
- aCodecType.Equals(version);
+ return aCodecType.EqualsLiteral("av1");
}
/* static */