Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIDEO: fixed decoding byteRun when there is more than 255 packets on line #1190

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@whiterandrek
Copy link
Member

whiterandrek commented May 14, 2018

We shouldn't rely on chunks count in FLC files. Instead, we should rely on width of the frame.

From https://www.compuphase.com/flic.htm

Each line of the image is compressed separately, starting from the top of the image. The first byte of each line is the packet count. It is a holdover from the FLI format and it should be ignored, because it is now possible to have more than 255 packets on a line (for FLC files). Instead, the width of the frame image now is the criterion for decoding: continue decompressing until the number of uncompressed pixels becomes equal to the image width.

@bonki

This comment has been minimized.

Copy link
Member

bonki commented May 14, 2018

Please fix your indentation (should be tabs, not spaces).

@whiterandrek whiterandrek force-pushed the whiterandrek:flicFix branch from 51e01a5 to f76b8b4 May 15, 2018

@bonki

This comment has been minimized.

Copy link
Member

bonki commented May 16, 2018

Looks reasonable and it seems other decoders do exactly just that. Anybody against me merging this?

@bonki

This comment has been minimized.

Copy link
Member

bonki commented May 17, 2018

The only officially supported engine right now using the FLIC decoder is Tucker and I have checked that this does not break decoding of any of the FLIC files used by the game (there are no lines with >255 packets per line so in the Tucker case it makes no difference).

I've landed this in commit ff1b7ff with an updated commit message. Thanks!

@bonki bonki closed this May 17, 2018

@whiterandrek whiterandrek deleted the whiterandrek:flicFix branch Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.