Lines Matching defs:state
43 #define IS_CORE_MARKER(state) \
44 (((state & 0xFFFFFFFFF0FF) == (((uint64_t)DCA_SYNCWORD_CORE_14B_LE << 16) | 0xF007)) || \
45 ((state & 0xFFFFFFFFFFF0) == (((uint64_t)DCA_SYNCWORD_CORE_14B_BE << 16) | 0x07F0)) || \
46 ((state & 0xFFFFFFFF00FC) == (((uint64_t)DCA_SYNCWORD_CORE_LE << 16) | 0x00FC)) || \
47 ((state & 0xFFFFFFFFFC00) == (((uint64_t)DCA_SYNCWORD_CORE_BE << 16) | 0xFC00)))
49 #define IS_EXSS_MARKER(state) ((state & 0xFFFFFFFF) == DCA_SYNCWORD_SUBSTREAM)
51 #define IS_MARKER(state) (IS_CORE_MARKER(state) || IS_EXSS_MARKER(state))
53 #define CORE_MARKER(state) ((state >> 16) & 0xFFFFFFFF)
54 #define EXSS_MARKER(state) (state & 0xFFFFFFFF)
56 #define STATE_LE(state) (((state & 0xFF00FF00) >> 8) | ((state & 0x00FF00FF) << 8))
57 #define STATE_14(state) (((state & 0x3FFF0000) >> 8) | ((state & 0x00003FFF) >> 6))
59 #define CORE_FRAMESIZE(state) (((state >> 4) & 0x3FFF) + 1)
60 #define EXSS_FRAMESIZE(state) ((state & 0x2000000000) ? \
61 ((state >> 5) & 0xFFFFF) + 1 : \
62 ((state >> 13) & 0x0FFFF) + 1)
72 uint64_t state;
76 state = pc->state64;
83 state = (state << 8) | buf[i];
85 if (IS_MARKER(state) &&
87 pc1->lastmarker == CORE_MARKER(state) ||
90 pc1->startpos = IS_EXSS_MARKER(state) ? size - 4 : size - 6;
92 if (IS_EXSS_MARKER(state))
93 pc1->lastmarker = EXSS_MARKER(state);
95 pc1->lastmarker = CORE_MARKER(state);
109 state = (state << 8) | buf[i];
115 pc1->framesize = CORE_FRAMESIZE(state);
121 pc1->framesize = CORE_FRAMESIZE(STATE_LE(state));
127 pc1->framesize = CORE_FRAMESIZE(STATE_14(state));
133 pc1->framesize = CORE_FRAMESIZE(STATE_14(STATE_LE(state)));
139 pc1->framesize = EXSS_FRAMESIZE(state);
149 if (start_found == 2 && IS_EXSS_MARKER(state) &&
158 pc1->framesize += EXSS_FRAMESIZE(state);
167 if (IS_MARKER(state) &&
168 (pc1->lastmarker == CORE_MARKER(state) ||
173 return IS_EXSS_MARKER(state) ? i - 3 : i - 5;
179 pc->state64 = state;