Lines Matching refs:length

1084         RK_U32 length = 0;  in hls_slice_header()  local
1087 READ_UE(gb, &length); in hls_slice_header()
1088 for (i = 0; (RK_U32)i < length; i++) { in hls_slice_header()
1340 static RK_S32 parser_nal_unit(HEVCContext *s, const RK_U8 *nal, int length) in parser_nal_unit() argument
1346 mpp_set_bitread_ctx(gb, (RK_U8*)nal, length); in parser_nal_unit()
1360 h265d_dbg(H265D_DBG_GLOBAL, "s->nal_unit_type = %d,len = %d \n", s->nal_unit_type, length); in parser_nal_unit()
1386 s->pre_pps_data = mpp_calloc(RK_U8, length + 128); in parser_nal_unit()
1387 memcpy(s->pre_pps_data, nal, length); in parser_nal_unit()
1388 s->pps_len = length; in parser_nal_unit()
1389 s->pps_buf_size = length + 128; in parser_nal_unit()
1391 } else if (s->pps_len == length) { in parser_nal_unit()
1392 if (memcmp(s->pre_pps_data, nal, length)) { in parser_nal_unit()
1394 memcpy(s->pre_pps_data, nal, length); in parser_nal_unit()
1397 if (s->pps_buf_size < length) { in parser_nal_unit()
1399 s->pre_pps_data = mpp_calloc(RK_U8, length + 128); in parser_nal_unit()
1400 memcpy(s->pre_pps_data, nal, length); in parser_nal_unit()
1401 s->pps_buf_size = length + 128; in parser_nal_unit()
1402 s->pps_len = length; in parser_nal_unit()
1553 RK_S32 mpp_hevc_extract_rbsp(HEVCContext *s, const RK_U8 *src, int length, in mpp_hevc_extract_rbsp() argument
1561 if (i + 2 < length && src[i + 1] == 0 && src[i + 2] == 1) { \ in mpp_hevc_extract_rbsp()
1563 length = i; \ in mpp_hevc_extract_rbsp()
1574 for (i = 0; i + 1 < length; i += 5) { in mpp_hevc_extract_rbsp()
1586 for (i = 0; i + 1 < length; i += 2) { in mpp_hevc_extract_rbsp()
1595 if (length + MPP_INPUT_BUFFER_PADDING_SIZE > nal->rbsp_buffer_size) { in mpp_hevc_extract_rbsp()
1596 RK_S32 min_size = length + MPP_INPUT_BUFFER_PADDING_SIZE; in mpp_hevc_extract_rbsp()
1607 memcpy(nal->rbsp_buffer, src, length); in mpp_hevc_extract_rbsp()
1609 nal->size = length; in mpp_hevc_extract_rbsp()
1611 memset(nal->rbsp_buffer + length, 0, MPP_INPUT_BUFFER_PADDING_SIZE); in mpp_hevc_extract_rbsp()
1612 return length; in mpp_hevc_extract_rbsp()
1615 static RK_S32 split_nal_units(HEVCContext *s, RK_U8 *buf, RK_U32 length) in split_nal_units() argument
1620 while (length >= 4) { in split_nal_units()
1628 length -= s->nal_length_size; in split_nal_units()
1630 if ((RK_U32)extract_length > length) { in split_nal_units()
1638 length--; in split_nal_units()
1645 for (i = 0; i < (RK_S32)length; i++) { in split_nal_units()
1655 length -= i; in split_nal_units()
1670 length -= 3; in split_nal_units()
1674 extract_length = length; in split_nal_units()
1731 length -= consumed; in split_nal_units()
1904 RK_U32 length = 0; in hevc_parser_extradata() local
1909 length = U16_AT(ptr); in hevc_parser_extradata()
1913 if (size < length) { in hevc_parser_extradata()
1916 parser_nal_unit(s, ptr, length); in hevc_parser_extradata()
1917 ptr += length; in hevc_parser_extradata()
1918 size -= length; in hevc_parser_extradata()
1943 RK_S32 length = 0; in h265d_prepare() local
1963 length = (RK_S32)mpp_packet_get_length(pkt); in h265d_prepare()
1967 h265dctx->extradata_size = length; in h265d_prepare()
1973 pos = buf + length; in h265d_prepare()
1985 (const RK_U8*)buf, length, pts, dts); in h265d_prepare()
1990 length = split_size; in h265d_prepare()
2001 pos = buf + length; in h265d_prepare()
2005 if (s->eos && !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()