FPGA - Pictures - RLE scheme
Hi, I am trying to write `RLE' compression scheme in `EBNF'. These are facts I have learnt. - RLE compression is used on bytes, sometimes called RLE1, generally RLE compression may also work with shorts and longs as well (RLE2, RLE4), possibly also in vertical direction - compression occurs horizontally on bitmap lines - each run begins with a run length byte - run lenght is maximum of 127 bytes - there are two types of runs, equal byte run `EBR', non-equal byte run `NEBR' - run len byte counts either from 0,1,2..., or from 255(-1),254(-2),..., for `EBR', `NEBR' respectively - each run ends when a maximum count of 127 bytes, or when a bitmap line end are reached, or when the type of run has changed This should be simple, but my wording seems clumsy and complicated, I wonder if it could be put in `EBNF' at all? -- Tomas Kral <thomas.kral@email.cz>
On Mon, 9 Oct 2017 10:51:49 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
I wonder if it could be put in `EBNF' at all?
This is my first attempt at EBNF formulating ETH Picture format, I think NW has also designed some simplified dialect of EBNF. File.Pict = ID width height depth {run}. ID = $F003$. width = height = depth = word. run = run0 | run1. (run0 = equal byte run, run1 = non-equal byte run) run0 = count byte. run1 = 257-count {byte}. count = byte. byte = 0..255. word = byte byte. (0..32767) -- Tomas Kral <thomas.kral@email.cz>
On Mon, 9 Oct 2017 10:51:49 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
I wonder if it could be put in `EBNF' at all?
This is my first attempt at EBNF formulating ETH Picture format, I think NW has also designed some simplified dialect of EBNF. EDIT (1) colour table added File.Pict = ID width height depth CT {run}. ID = $F003$. width = height = depth = word. CT = {R G B}. R = G = B = byte (colour table, 2 entries for depth=1) run = run0 | run1. (run0 = equal byte run, run1 = non-equal byte run) run0 = count byte. run1 = 257-count {byte}. count = byte. byte = 0..255. word = byte byte. (0..32767) -- Tomas Kral <thomas.kral@email.cz>
participants (1)
-
Tomas Kral