CodecMedia 1.1.3
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[1.1.3] - 2026-03-16
Fixed
- Added strict PNG bit-depth validation in
PngParser.parse()to reject malformed IHDR values outside the PNG spec (1,2,4,8,16). - Added helper
PngParser.isValidBitDepth()to centralize allowed PNG bit-depth values during probe. - Added PNG color-type validation in
PngParser.parse()with helperPngParser.isValidColorType()to accept only spec-valid values (0,2,3,4,6). - Refined JPEG signature sniffing in
JpegParser.isLikelyJpeg()to require the exact 3-byte SOI/prefix check actually used by the parser. - Hardened JPEG SOF validation in
JpegParser.parse()to reject invalidbitsPerSample(only8/12) and unsupported component counts (only1/3/4). - Improved JPEG marker traversal in
JpegParser.parse()to correctly tolerate repeated0xFFfill bytes while preserving marker alignment validation. - Corrected HEIF
pixiFullBox payload parsing inHeifParser.extractPixiBitDepth()by skipping the 4-byte FullBox header before reading channel count and per-channel depths. - Documented FullBox offset semantics for
ispeextraction inHeifParser.extractIspeWidth()andHeifParser.extractIspeHeight(). - Removed non-container boxes (
mdat,skip,free) from recursive traversal candidates inHeifParser.isContainerType()to avoid unnecessary payload recursion. - Added bounds-checked big-endian integer reads in
HeifParser.readBeInt()to return codec-domain errors instead of runtime index failures on malformed inputs. - Added strict BMP
bitsPerPixelvalidation inBmpParser.parse()viaBmpParser.isValidBitsPerPixel(), allowing only spec-valid values (1,2,4,8,16,24,32). - Added defensive TIFF IFD entry-count bounds validation in
TiffParser.parse()to reject corruptentryCountvalues that exceed available bytes. - Documented WebP probe bit-depth assumption in
WebpParserwith explicit constantASSUMED_WEBP_BIT_DEPTH, applied consistently acrossVP8,VP8L, andVP8Xparsing.
Verified
- Confirmed compile stability after PNG/JPEG/HEIF/BMP/TIFF/WebP parser hardening with
mvn -q -DskipTests compile.
[1.1.2] - 2026-03-15
Added
- Added safe top-level codec helper
ProbeResult.primaryCodec()to avoid directstreams().get(0)access for empty-stream cases. - Added no-arg
ConversionOptions.defaults()with fallback target format. - Added model/options consistency tests in
ModelOptionsConsistencyTest. - Added AVIF image transcode regression coverage in
CodecMediaFacadeTest, including runtime-safe behavior when HEIF/AVIF writers are unavailable.
Changed
- Aligned
ConversionOptions.defaults(String)with fallback behavior fornull/blank target format. - Documented default validation policy in
ValidationOptions.defaults(), including 500 MiB default size limit. - Documented nullable semantics of
PlaybackResult.message. - Extended image transcode extension routing in
ImageTranscodeConverterto recognizeavifas part of the HEIF-family conversion path. - Clarified intentional unsupported fallback behavior in
ConversionRouteResolverfornull/unknown/container/non-mapped routes. - Updated image conversion support notes in
README.mdto includeavifand document intentional unsupported container/unknown route handling. - Optimized
StubCodecMediaEngine.probe()to avoid redundant full-file reads when the probe prefix already contains the complete file. - Reworded
StubCodecMediaEngine.extractAudio()format-mismatch error message to user-facing language (removed internal "Stub" wording).
Verified
- Confirmed model/options polish via
mvn -Dtest=ModelOptionsConsistencyTest test. - Confirmed AVIF conversion-path regression with
mvn -Dtest=CodecMediaFacadeTest#convert_shouldTranscodePngToAvif test. - Confirmed facade behavior regression coverage with
mvn -Dtest=CodecMediaFacadeTest test.
[1.1.1] - 2026-03-14
Fixed
- Improved MP3 duration estimation in
Mp3Parser.estimateDurationMillis()to prioritize Xing/VBRI frame-count metadata before scanned sample totals. - Excluded trailing ID3v1 tag bytes from MP3 audio scan range in
Mp3Parser, reducing bitrate drift when footer tags are present. - Added clearer non-Layer III error handling in
Mp3Parser.parse()for MPEG Layer I/II inputs. - Strengthened OGG logical-stream parsing in
OggParserwith per-stream page-sequence validation and serial-scoped metrics for multiplexed files. - Refined Vorbis bitrate-mode classification in
OggParser.detectVorbisBitrateMode()to infer from observed bitrate variation instead of coarse nominal/page-count heuristics. - Replaced broad OGG payload string scanning with structured Vorbis/Opus comment-header parsing in
OggParser, and fixed sequence tracking to uselongto avoid overflow. - Updated
WavParserto read/validateaudioFormatfromfmtand reject unsupported compressed WAV formats instead of silently computing incorrect duration. - Added RF64-aware WAV parsing in
WavParser, including unsigned chunk-size handling anddatasize sentinel (0xFFFFFFFF) resolution viads64. - Updated
FlacParserto reject reserved metadata block type127per FLAC spec. - Updated
FlacParserbitrate estimation to use encoded audio payload region after metadata blocks (instead of whole file bytes), reducing artwork/metadata inflation. - Updated
AiffParserto validate AIFCCOMMcompression type and reject unsupported compressed variants.
Added
- Added MP3 parser regression tests for Xing-priority duration, trailing ID3v1 handling, and unsupported Layer I/II diagnostics in
Mp3ParserTest. - Added OGG parser tests for Vorbis CBR/VBR mode inference, broken page-sequence detection, and multiplexed-stream metric isolation in
OggParserTest. - Added WAV parser tests for unsupported compressed format rejection and RF64
ds64/datasentinel handling inWavParserTest. - Added FLAC parser tests for reserved block type rejection and metadata-heavy bitrate estimation behavior in
FlacParserTest. - Added explicit decode-only intent comment in
FlacCodec. - Added AIFF parser tests for supported AIFC
NONEand unsupported compression-type rejection inAiffParserTest. - Added explicit decode-only intent comment in
AiffCodec.
Verified
- Confirmed MP3 parser updates with
mvn -Dtest=Mp3ParserTest test. - Confirmed OGG parser updates with
mvn -Dtest=OggParserTest test. - Confirmed WAV parser updates with
mvn -Dtest=WavParserTest test. - Confirmed FLAC parser updates with
mvn -Dtest=FlacParserTest test. - Confirmed AIFF parser updates with
mvn -Dtest=AiffParserTest test. - Confirmed CLI argument/dispatch regression tests in
CodecMediaCliTestwithmvn test(incodecmedia-cli). - Confirmed Kotlin wrapper refactor stability with
gradlew.bat test(incodecmedia-kotlin).