History

avcodec/sanm: ignore codec45

Codec45 is used in some RA2 videos on top of codec37. It consists of 2 tables (768 and 32768 bytes), and datapackets like codec2 (delta-x, delta-y) with a pixel counter instead of a color value. It then reads the 4 surrounding pixels, looks up 3 separate values for each in table1, adds them together to form an index into table2 for a new pixel value, in a row. The data coming in gets the x/y coordinates out of the visible area very quickly (2-3 iterations); I don't see any visual difference between the ffmpeg-produced frames and ones captured with dosbox from rebel assault 2, which leads me to believe this codec never worked as intended.

Manuel Lauss committed 1 year ago

Commit fd6bfaa1 parent b48bd231 file · +2 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/sanm.c+2−0
@@ -1673,6 +1673,8 @@ static int process_frame_obj(SANMVideoContext *ctx, GetByteContext *gb) · 1672 unmodified lines
1673 return old_codec23(ctx, gb, top, left, w, h, param, parm2);1673 return old_codec23(ctx, gb, top, left, w, h, param, parm2);
1674 case 37:1674 case 37:
1675 return old_codec37(ctx, w, h);1675 return old_codec37(ctx, w, h);
1676 case 45:
1677 return 0;
1676 case 47:1678 case 47:
1677 return old_codec47(ctx, w, h);1679 return old_codec47(ctx, w, h);
1678 case 48:1680 case 48:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t