summaryrefslogtreecommitdiff
path: root/vrt/lib/expanded_header_cw_tables.h
diff options
context:
space:
mode:
Diffstat (limited to 'vrt/lib/expanded_header_cw_tables.h')
-rw-r--r--vrt/lib/expanded_header_cw_tables.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/vrt/lib/expanded_header_cw_tables.h b/vrt/lib/expanded_header_cw_tables.h
new file mode 100644
index 000000000..fbb9c6b81
--- /dev/null
+++ b/vrt/lib/expanded_header_cw_tables.h
@@ -0,0 +1,14 @@
+inline static size_t cw_header_len(int cw){
+ static const size_t s_cw_header_len[32] = {
+ 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7,
+ };
+ return s_cw_header_len[cw];
+}
+
+inline static size_t cw_trailer_len(int cw){
+ static const size_t s_cw_trailer_len[32] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ };
+ return s_cw_trailer_len[cw];
+}
+