Lines Matching defs:pc1
68 static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
73 ParseContext *pc = &pc1->pc;
77 size = pc1->size;
86 (!pc1->lastmarker ||
87 pc1->lastmarker == CORE_MARKER(state) ||
88 pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM)) {
89 if (!pc1->lastmarker)
90 pc1->startpos = IS_EXSS_MARKER(state) ? size - 4 : size - 6;
93 pc1->lastmarker = EXSS_MARKER(state);
95 pc1->lastmarker = CORE_MARKER(state);
112 switch (pc1->lastmarker) {
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);
150 pc1->framesize <= size + 2) {
151 pc1->framesize = size + 2;
157 if (size == pc1->framesize + 4) {
158 pc1->framesize += EXSS_FRAMESIZE(state);
164 if (pc1->framesize > size)
168 (pc1->lastmarker == CORE_MARKER(state) ||
169 pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM)) {
172 pc1->size = 0;
180 pc1->size = size;
186 DCAParseContext *pc1 = s->priv_data;
188 pc1->lastmarker = 0;
189 pc1->sr_code = -1;
193 static int dca_parse_params(DCAParseContext *pc1, const uint8_t *buf,
197 DCAExssAsset *asset = &pc1->exss.assets[0];
207 if ((ret = ff_dca_exss_parse(&pc1->exss, buf, buf_size)) < 0)
219 pc1->sr_code = get_bits(&gb, 8);
226 if (pc1->sr_code >= FF_ARRAY_ELEMS(ff_dca_sampling_freqs))
229 *sample_rate = ff_dca_sampling_freqs[pc1->sr_code];
230 *duration = 1024 << ff_dca_freq_ranges[pc1->sr_code];
295 if (ff_dca_exss_parse(&pc1->exss, buf, buf_size) < 0)
310 DCAParseContext *pc1 = s->priv_data;
311 ParseContext *pc = &pc1->pc;
317 next = dca_find_frame_end(pc1, buf, buf_size);
326 if (buf_size > pc1->startpos) {
327 buf += pc1->startpos;
328 buf_size -= pc1->startpos;
330 pc1->startpos = 0;
334 if (!dca_parse_params(pc1, buf, buf_size, &duration, &sample_rate, &avctx->profile)) {