codec3 is codec1 which writes zero values instead of skipping them.
This fixes a lot of RA1 videos.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
- clear the front buffer with color 0 on the first FOBJ.
Fixes a lot of Rebel Assault 1 videos and Rebel Assault 2 space
scenes (e.g. 08PLAY.SAN which consists only of codec1/2/21 objects
which only ever touch parts of the buffer).
- for ANIMv1 (Rebel Assault 1): set palette index 0 to all zeroes.
This fixes a lot of stray colors in e.g L1HANGAR.ANM, L2INTRO.ANM,
space scenes.
- Esp in RA1, there are a lot of FRME objects which don't contain
any video data (prebuffering some audio only). Account for that.
- In RA1 L2PLAY.ANM there are a few unaligned FOBJs, handle this
in a generic way.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
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>
The left/top parameters of a FOBJ are signed values. Adjust
codec1 code accordingly to not draw outside the buffer area.
Rebel Assault 1 makes heavy use of this.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
The block-based codecs 37/47/48 work on the full frame, and there's no
existing LucasArts game video that uses left/top offsets for these,
as it doesn't make sense. Ignore the left/top parameters for these codecs.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
fix ticket: 10786
parse the SPS from extradata and
get profile_compatibility, tier, constraints which was been hard code before.
HEVC CODECS Attribute reference to: ISO/IEC14496-15
Signed-off-by: Jack Lau <jacklau1222@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
If h2645data.c were changed in a way that makes it rely on another
object file, all components that need h2645data.o would need to be
updated. And given that the VVC decoder->h2645data.o dependency is
currently hidden in a separate Makefile, it would likely be forgotten.
So move it to the libavcodec/Makefile.
Reviewed-by: Nuo Mi <nuomi2021@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
swscale internals don't distinguish between 16-bit and higher bit depth
output formats internally when it comes to the choice of intermediate
representation.
Clamping this value both prevents a SIGFPE and also aligns the check
with reality.
The linker command can exceed the maximum argument limit on MinGW,
especially for libavcodec.
The objects list is now stored in a file and passed to the linker.
This patch adds a fully-featured level 3 and 4 decoder for FFv1,
supporting Golomb and all Range coding variants, all pixel formats,
and all features, except for the newly added floating-point formats.
On a 6000 Ada, for 3840x2160 bgr0 content at 50Mbps (standard desktop
recording), it is able to do 400fps.
An Alder Lake with 24 threads can barely do 100fps.
This commit adds a reference to the buffer as an argument to
start_frame, and adapts all existing code.
This allows for asynchronous hardware accelerators to skip
copying packet data by referencing it.
This commit adds support for hardware accelerated decoding to
the decoder.
The previous commits already refactored the decoder, this commit
simply adds calls to hooks to decode.
Previously, the callback was only called on init. This makes it
get called on every frame.
We should switch to VK_KHR_video_maintenance2 and provide all params
upfront, but almost nothing supports it yet.
This commit uses the recently exported code for host mapping images back
where it was exported from.
The function also had broken download code for image downloading since its
recent refactor.