Here soft for Raydel Abreu Espinet (CM2ESP) and for all radio amateurs — LPPT Decoder and 72K and 80K sample bin files
Warning if your computer is less than 1 GB of RAM the LRPToffLineDecoder may run very slowly!
LRPToffLineDecoder_2014.09.01.0006.zip — this decoder undestands RAW files.
LRPToffLineDecoder_2014.09.17.0007.zip — Leaves a little less holes in the image.
LRPToffLineDecoder_2014.09.19.0009.zip — Visualization of the constellation for RAW files.
LRPToffLineDecoder_2014.09.22.0010.zip — the latest version of the «Meteor-M N2» LRPT decoder. Code optimizing.
Meteor_LRPT_001_Enrico.raw — the sample of 72K 3bit-soft bin file ( file provided by «Enrico Gobbetti» <email@example.com>).
Meteor-M-N2_LRPT_2014-8-8-10-33-11-834_raw.dat2014-8-8-10-51-2-110.s — the sample of 72K 8bit-soft bin file.
Meteor-M-N2_LRPT INT_2014-8-11-9-33-44-428_raw.dat2014-8-11-9-52-5-204.s — the sample of 80K 8bit-soft bin file.
Jerry, it is was my mistake. I gave you not CVCDU file. I gave you the CADU file with OR-ed CVCDU. And true sync is 1ACFFC1D, of course. Beginning of the file is very noisy and analyze better indented 100 SYNC
Attention!!! There is error in BIS-MW (adopter MSU-MR to LRPT). 2-bits Sequence Flag in the CCSDS primary header is faulty. Device BIS-MW instead of the flag last segment («10») erroneously generates the flag continuation segment («00»).
Image compression algorithm for JPEG for equipment BIS-MW (adopter MSU-MR to LRPT)
This algorithm is designed in accordance with the documents:
- Digital Compression and Coding of Continuous-tone Still Images, ISO/IEC 10918-1:1 1993(E);
- LRPT Reference Compressor and Decompressor,Ref. MO-TN-ESA-SY-0124, Issue 1.1, 15 April 2000.
JPEG compression is subjected to a minimum coding unit (MCU), which is an element of 8 pixels x 8 pixels. MCU data width of 8 bits / pixel.
For Meteor-M N1 — Line scanner is 1536 pixels, thus the scan (8 lines) is 192 MCU. For Meteor-M N2 — Line scanner is 1568 pixels, thus the scan (8 lines) is 196 MCU.
1. Level shift.
Data is converted into 8 bit signed representation by subtracting 128 from each element MCU.
2. Discrete Cosine Transform (DCT).
DCT is applied to each minimum coding unit (MCU). As a result of the conversion element MCU is a table 8×8 of a factor DCT.
Applied initial quantization table (HTK) is a standard according to ISO / IEC 10918-1.
This algorithm uses the method of calculating working quantization table (PTK), depending on the degree of image compression F:
PTK — Worksheet quantization table,
F — compression ratio,
HTK — initial quantization table.
The compression ratio is variable depending on the quality factor Q. The Q value factor is transferred to the segment header of partial package equipment BIS-MW of satellite «Meteor-M». Q can be set from 20 to 100.
Each element of MCU divided by the number of the working quantization table, and the result rounded to the nearest integer, with a minimum value is 1.
S — MCU DCT coefficients,
PTK — Worksheet quantization table,
Sq — MCU after quantization.
4. Entropy coding.
4.1 Zig-zag permutation.
64 the number of MCU line up one after the other with a zigzag ordering (Figure 1)
4.2. RLE and Huffman method.
Non-zero transform coefficients are compressed using Huffman.
4.2.1. The first of these properties (coefficient of DC) is processed separately from other properties (AC coefficients). For the first partial package MCU itself is encoded coefficient DC, and for the next 11 (for N1) or 13 (for N2) encoded difference between the current and previous MCU.
DC coefficient is encoded as follows:
According to Table F.1 of the ISO / IEC 10918-1 (Table 1) is the category number and the column number in which it is starting from zero.
Next, the table K.3 of ISO / IEC 10918-1 (Table 2) is determined codeword. Then, the codeword is attributed column number as R-bit numbers, where R is a category of a number.
4.2.2. Coding of AC coefficients.
Compressing 63 AC coefficients using RLE encoding combined with Huffman. In this case, we obtain a pair of type (omit the number), where the «miss» is counter to skip zeros, and «number» — the value to be put in the next cell. According to Table F.2 of the ISO / IEC 10918-1 (Table 3) define the category (R) and the column number C (counting starts with zero column). For example, for the pair (1, -2) R = 2, C = 1.
According to Table K.5 of ISO / IEC 10918-1 (in Table 4 shows part K.5) define the codeword where Size corresponds to the category number.
In our case, for Run = 1, R = Size = 2 the codeword equals 11011
Then, the codeword is attributed column number as R-bit numbers, where R — the category number. For C = 1, we get 01.
So the pair (1, -2) encoded by the word: 1101101.
At the end of the sequence is a pair (0,0), which corresponds to the code 1010 (EOB — End Of Block).
ZRL encodes 15 consecutive zeros as their number exceeds 15.
5. Alignment of information.
Partial packet (user data) is an even number of bytes, so after 12 MCU encoding information is supplemented by bits «1» to parity bytes in the packet.