diff --git a/videodecoder/Info.plist b/videodecoder/Info.plist
index 17f3ed9..fb1e769 100644
--- a/videodecoder/Info.plist
+++ b/videodecoder/Info.plist
@@ -291,6 +291,38 @@
MPEG-4 Video (MEncoder)
+
+
+ CodecType
+ Hap1
+ CodecName
+ HAP
+
+
+ CodecType
+ Hap5
+ CodecName
+ HAP Alpha
+
+
+ CodecType
+ HapY
+ CodecName
+ HAP Q
+
+
+ CodecType
+ HapM
+ CodecName
+ HAP Q Alpha
+
+
+ CodecType
+ HapA
+ CodecName
+ HAP Alpha Only
+
+
CodecType
diff --git a/videodecoder/videodecoder.swift b/videodecoder/videodecoder.swift
index 92da2c6..aa2c9e7 100644
--- a/videodecoder/videodecoder.swift
+++ b/videodecoder/videodecoder.swift
@@ -40,6 +40,11 @@ class VideoDecoder: NSObject, MEVideoDecoder {
0x4d50_3431: AV_CODEC_ID_MSMPEG4V1, // 'MP41'
0x4d50_3432: AV_CODEC_ID_MSMPEG4V2, // 'MP42'
0x4d50_3433: AV_CODEC_ID_MSMPEG4V3, // 'MP43'
+ 0x4861_7031: AV_CODEC_ID_HAP, // 'Hap1'
+ 0x4861_7035: AV_CODEC_ID_HAP, // 'Hap5'
+ 0x4861_7059: AV_CODEC_ID_HAP, // 'HapY'
+ 0x4861_704D: AV_CODEC_ID_HAP, // 'HapM'
+ 0x4861_7041: AV_CODEC_ID_HAP, // 'HapA'
]
// Supported pixel formats for QuickTime animation. Non-paletised only.
@@ -215,6 +220,10 @@ class VideoDecoder: NSObject, MEVideoDecoder {
}
}
}
+ case AV_CODEC_ID_HAP:
+ // HAP outputs RGB0 (Hap1/HapY), RGBA (Hap5/HapM), or GRAY8 (HapA).
+ // FFmpeg's hapdec.c sets pix_fmt internally; no extradata needed.
+ params.pointee.color_range = AVCOL_RANGE_JPEG
default:
// Shouldn't get here
logger.error(