diff options
author | Leo Uino <leo@norisys.jp> | 2011-07-14 14:31:07 +0900 |
---|---|---|
committer | Leo Uino <leo@norisys.jp> | 2011-07-14 14:31:07 +0900 |
commit | 9f4843d686bca0d75bee174d8249fbf72527b94a (patch) | |
tree | cbe61addaa9a05ba1477af91e9d69cbcd8d95fb5 /lpg/libqr/qr/common.h | |
parent | 3af4ffd175dcaf8aaf735f3f9564da54c4f29403 (diff) | |
download | pdf-simple-sign-9f4843d686bca0d75bee174d8249fbf72527b94a.tar.gz pdf-simple-sign-9f4843d686bca0d75bee174d8249fbf72527b94a.tar.xz pdf-simple-sign-9f4843d686bca0d75bee174d8249fbf72527b94a.zip |
Move RS block size calculation to a separate function
Diffstat (limited to 'lpg/libqr/qr/common.h')
-rw-r--r-- | lpg/libqr/qr/common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lpg/libqr/qr/common.h b/lpg/libqr/qr/common.h index 9caf3e0..f2bd127 100644 --- a/lpg/libqr/qr/common.h +++ b/lpg/libqr/qr/common.h @@ -10,5 +10,16 @@ size_t qr_code_total_capacity(int version); int qr_code_width(const struct qr_code *); +/* See table 19 of the spec for the layout of EC data. There are at + * most two different block lengths, so the total number of data+ec + * blocks is the sum of block_count[]. The total number of 8-bit + * words in each kind of block is data_length + ec_length. + */ +void qr_get_rs_block_sizes(int version, + enum qr_ec_level ec, + int block_count[2], + int data_length[2], + int ec_length[2]); + #endif |