libhevc-mirror/tests/decoder
Harish Mahendrakar 487f4d0012 tests/decoder: Dynamically size input buffer based on frame dimensions
In DecHelper::initDecoder(), mInputBuf was statically allocated with
1 MB (1024 * 1024 bytes). For high-resolution streams with large single-slice
NAL units (such as Main_422_10_B_RExt_Sony_2 at 2560x1600, where the IDR
slice NAL exceeds 1.1 MB), BitsFile::read() was capped by mInputBuf's
capacity, truncating the input bitstream and resulting in incomplete decoding
of the frame.

- In DecHelper::decodeHeader(), dynamically reallocate mInputBuf once
  mWidth, mHeight, and mBitDepth are known if the required size exceeds
  the current buffer capacity.
- In DecHelper::decodeFile(), update inputFrameSize to mInputBuf.capacity()
  instead of mWidth * mHeight * 3 (which didn't account for bit depths > 8).

Test: ./hevc_dec_tests
TAG=agy
CONV=476d1054-10ff-4f19-88d5-a1c8dae7b57f
2026-09-11 12:42:08 -07:00
..
DecHelper.cmake Add initial tests for decoder and encoder 2026-07-27 13:15:45 -07:00
DecHelper.cpp tests/decoder: Dynamically size input buffer based on frame dimensions 2026-09-11 12:42:08 -07:00
DecHelper.h Updated decoder tests to enable HBD 2026-08-22 02:22:06 +00:00
DecTests.cpp Enable YUV444 HBD decoder tests 2026-08-31 10:41:00 -07:00