aboutsummaryrefslogtreecommitdiffstats
path: root/tests/api/api-h264-slice-test.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2025-03-11 12:31:37 +0100
committerManuel Lauss <manuel.lauss@gmail.com>2025-03-19 20:58:46 +0100
commit93b0ca26acb912b8f080f221f6165542806bceb3 (patch)
tree0d86ebabe3cb70bbc8a335bb671c92e6fd7687d2 /tests/api/api-h264-slice-test.c
parentf6c6ba95fd69f51d7f30e8f201ff43050a53113f (diff)
downloadffmpeg-93b0ca26acb912b8f080f221f6165542806bceb3.tar.gz
avcodec/sanm: better frame size detection for old codecs
The size of the video frame (FOBJ) of the old codecs (ANIMv0/1/2) can very reliably be determined: - ANIMv0/1 (=Rebel Assault 1) uses a 384x242 internal buffer for everything. The codec parameters only describe the size and offset of the specific FOBJ on that buffer. - ANIMv2 titles usually use one of the fullscreen codecs (37/47/48) as first FOBJ, and their dimensions can generally be trusted. - RA2 uses 424x260 as internal buffer, use that if encountered: 08PLAY.SAN does not use codec37 so we need to guess using the codec coordinates. - ignore sizes smaller than 2x2 or larger than 800x600. - some game videos have an initial fobj with either 1x1 or -1x-1 pixels in size, ignore them with a warning (Full Throttle and the Rebel Assault 2 xxRETRY.SAN videos). Once a known/valid dimension set has been discovered, use it and don't change it for subsequent FOBJs, rather clamp the large frame to the determined dimensions. Tested with RA1, RA2, Full Throttle, Dig, Outlaws, SotE and MotS videos. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Diffstat (limited to 'tests/api/api-h264-slice-test.c')
0 files changed, 0 insertions, 0 deletions