Lines Matching refs:buf
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()
83 int first_slice_segment_in_pic_flag = buf[i] >> 7; 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
105 mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); in mpp_combine_frame()
135 memcpy(&sc->buffer[sc->index], *buf, *buf_size); in mpp_combine_frame()
160 memcpy(&sc->buffer[sc->index], *buf, in mpp_combine_frame()
163 *buf = sc->buffer; in mpp_combine_frame()
176 mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); in mpp_combine_frame()
224 const RK_U8 *buf, RK_S32 buf_size, RK_S64 pts, in h265d_split_frame() argument
257 next = hevc_find_frame_end(s, buf, buf_size); in h265d_split_frame()
262 if (mpp_combine_frame(s, next, &buf, &buf_size) < 0) { in h265d_split_frame()
269 *poutbuf = buf; in h265d_split_frame()
290 RK_U8 *buf = NULL; in h265d_split_reset() local
296 buf = s->buffer; in h265d_split_reset()
300 s->buffer = buf; in h265d_split_reset()
1615 static RK_S32 split_nal_units(HEVCContext *s, RK_U8 *buf, RK_U32 length) in split_nal_units() argument
1626 extract_length = (extract_length << 8) | buf[i]; in split_nal_units()
1627 buf += s->nal_length_size; in split_nal_units()
1637 if (buf[2] == 0) { in split_nal_units()
1639 buf++; in split_nal_units()
1642 if (buf[0] != 0 || buf[1] != 0 || buf[2] != 1) { in split_nal_units()
1646 state = (state << 8) | buf[i]; in split_nal_units()
1656 buf += i; in split_nal_units()
1669 buf += 3; in split_nal_units()
1705 consumed = mpp_hevc_extract_rbsp(s, buf, extract_length, nal); in split_nal_units()
1730 buf += consumed; in split_nal_units()
1941 RK_U8 *buf = NULL; in h265d_prepare() local
1959 buf = (RK_U8 *)mpp_packet_get_pos(pkt); in h265d_prepare()
1968 h265dctx->extradata = buf; in h265d_prepare()
1973 pos = buf + length; in h265d_prepare()
1985 (const RK_U8*)buf, length, pts, dts); in h265d_prepare()
1986 pos = buf + consume; in h265d_prepare()
1989 buf = split_out_buf; in h265d_prepare()
1991 s->checksum_buf = buf; //check with openhevc in h265d_prepare()
2001 pos = buf + length; in h265d_prepare()
2014 fwrite(buf, 1, length, fp); in h265d_prepare()
2017 ret = (MPP_RET)split_nal_units(s, buf, length); in h265d_prepare()
2029 MPP_RET h265d_get_stream(void *ctx, RK_U8 **buf, RK_S32 *size) in h265d_get_stream() argument
2034 *buf = s->checksum_buf; in h265d_get_stream()
2096 RK_U8 *buf = NULL; in h265d_deinit() local
2137 buf = mpp_packet_get_data(s->input_packet); in h265d_deinit()
2138 mpp_free(buf); in h265d_deinit()
2200 RK_U8 *buf = NULL; in h265d_init() local
2262 buf = mpp_malloc(RK_U8, size); in h265d_init()
2264 if (buf == NULL) { in h265d_init()
2268 if (MPP_OK != mpp_packet_init(&s->input_packet, (void*)buf, size)) { in h265d_init()