Lines Matching refs:sc
59 static RK_S32 hevc_find_frame_end(SplitContext_t *sc, const RK_U8 *buf, in hevc_find_frame_end() argument
67 sc->state64 = (sc->state64 << 8) | buf[i]; in hevc_find_frame_end()
69 if (((sc->state64 >> 3 * 8) & 0xFFFFFF) != START_CODE) in hevc_find_frame_end()
71 nut = (sc->state64 >> (2 * 8 + 1)) & 0x3F; in hevc_find_frame_end()
72 … layer_id = (((sc->state64 >> 2 * 8) & 0x01) << 5) + (((sc->state64 >> 1 * 8) & 0xF8) >> 3); in hevc_find_frame_end()
77 if (sc->frame_start_found && !layer_id) { in hevc_find_frame_end()
78 sc->frame_start_found = 0; in hevc_find_frame_end()
88 if (!sc->frame_start_found) { in hevc_find_frame_end()
89 sc->frame_start_found = 1; in hevc_find_frame_end()
91 sc->frame_start_found = 0; in hevc_find_frame_end()
100 static RK_S32 mpp_combine_frame(SplitContext_t *sc, RK_S32 next, const RK_U8 **buf, RK_S32 *buf_siz… in mpp_combine_frame() argument
102 if (sc->overread) { in mpp_combine_frame()
104 sc->overread, sc->state, next, sc->index, sc->overread_index); in mpp_combine_frame()
109 for (; sc->overread > 0; sc->overread--) { in mpp_combine_frame()
110 sc->buffer[sc->index++] = sc->buffer[sc->overread_index++]; in mpp_combine_frame()
118 sc->last_index = sc->index; in mpp_combine_frame()
122 RK_U32 min_size = (*buf_size) + sc->index + MPP_INPUT_BUFFER_PADDING_SIZE; in mpp_combine_frame()
124 if (min_size > sc->buffer_size) { in mpp_combine_frame()
126 new_buffer = mpp_realloc(sc->buffer, RK_U8, min_size); in mpp_combine_frame()
128 sc->buffer_size = 0; in mpp_combine_frame()
131 sc->buffer_size = min_size; in mpp_combine_frame()
132 sc->buffer = new_buffer; in mpp_combine_frame()
135 memcpy(&sc->buffer[sc->index], *buf, *buf_size); in mpp_combine_frame()
136 sc->index += *buf_size; in mpp_combine_frame()
142 sc->overread_index = sc->index + next; in mpp_combine_frame()
145 if (sc->index) { in mpp_combine_frame()
146 RK_U32 min_size = next + sc->index + MPP_INPUT_BUFFER_PADDING_SIZE; in mpp_combine_frame()
148 if (min_size > sc->buffer_size) { in mpp_combine_frame()
150 new_buffer = mpp_realloc(sc->buffer, RK_U8, min_size); in mpp_combine_frame()
152 sc->buffer_size = 0; in mpp_combine_frame()
155 sc->buffer_size = min_size; in mpp_combine_frame()
156 sc->buffer = new_buffer; in mpp_combine_frame()
160 memcpy(&sc->buffer[sc->index], *buf, in mpp_combine_frame()
162 sc->index = 0; in mpp_combine_frame()
163 *buf = sc->buffer; in mpp_combine_frame()
168 sc->state = (sc->state << 8) | sc->buffer[sc->last_index + next]; in mpp_combine_frame()
169 sc->state64 = (sc->state64 << 8) | sc->buffer[sc->last_index + next]; in mpp_combine_frame()
170 sc->overread++; in mpp_combine_frame()
173 if (sc->overread) { in mpp_combine_frame()
175 sc->overread, sc->state, next, sc->index, sc->overread_index); in mpp_combine_frame()
182 static RK_S32 h265d_split_init(void **sc) in h265d_split_init() argument
188 *sc = s; in h265d_split_init()
222 static RK_S32 h265d_split_frame(void *sc, in h265d_split_frame() argument
229 SplitContext_t *s = (SplitContext_t*)sc; in h265d_split_frame()
288 static RK_S32 h265d_split_reset(void *sc) in h265d_split_reset() argument
292 SplitContext_t *s = (SplitContext_t*)sc; in h265d_split_reset()
293 if (sc == NULL) { in h265d_split_reset()
307 static RK_S32 h265d_split_deinit(void *sc) in h265d_split_deinit() argument
309 SplitContext_t *s = (SplitContext_t *)sc; in h265d_split_deinit()
1939 SplitContext_t *sc = (SplitContext_t*)h265dctx->split_cxt; in h265d_prepare() local
1948 if (sc != NULL) { in h265d_prepare()
1949 sc->eos = s->eos; in h265d_prepare()
1951 h265d_split_init((void**)&sc); in h265d_prepare()
1952 if (sc == NULL) { in h265d_prepare()
1956 h265dctx->split_cxt = sc; in h265d_prepare()
1993 h265d_dbg(H265D_DBG_TIME, "split frame get pts %lld", sc->pts); in h265d_prepare()
1994 s->pts = sc->pts; in h265d_prepare()
1995 s->dts = sc->dts; in h265d_prepare()
2095 SplitContext_t *sc = h265dctx->split_cxt; in h265d_deinit() local
2153 if (sc) { in h265d_deinit()
2154 h265d_split_deinit(sc); in h265d_deinit()
2198 SplitContext_t *sc = (SplitContext_t*)h265dctx->split_cxt; in h265d_init() local
2214 if (sc == NULL && h265dctx->cfg->base.split_parse) { in h265d_init()
2215 h265d_split_init((void**)&sc); in h265d_init()
2216 if (sc == NULL) { in h265d_init()
2220 h265dctx->split_cxt = sc; in h265d_init()