Mostly done using the following Ruby script:
(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
s = File.read(file, encoding: 'iso8859-1')
t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
if t != s
File.open(file, 'w') { |io| io.write(t) }
end
end
Excerpt from specification:
The first byte of each packet is the column skip count;
the second byte is the RLE count byte.
Zero or more data words follow the RLE count byte.
Our decoder currently only supports the standard FLC format which
does not rely on the stored packet count (which is part of the FLI
format and limited to 255 packets per line).
Instead, the image width should be used as criterion when decoding
a frame which allows for more than 255 packets per line.
See also https://www.compuphase.com/flic.htm
The code currenly has 4 logically dead lines. Instead of requiring
both newWidth and newHeight to be non zero, just make sure one of
them is non zero and set the other one to the current size.
Certain codecs seem to use a Surface with Bpp 2, but do not have any proper
format description. Whoever is maintaining these should check this commit and
fix the format properly.
This should not cause any code behavior changes at this time, but if any
of the intermediate VideoDecoder classes ever starts to overload stuff,
this would become important.
svn-id: r55841