• Home
  • Raw
  • Download

Lines Matching refs:nalu

233 gst_h265_parse_nalu_header (GstH265NalUnit * nalu)  in gst_h265_parse_nalu_header()  argument
235 guint8 *data = nalu->data + nalu->offset; in gst_h265_parse_nalu_header()
238 if (nalu->size < 2) in gst_h265_parse_nalu_header()
241 gst_bit_reader_init (&br, data, nalu->size - nalu->offset); in gst_h265_parse_nalu_header()
246 nalu->type = gst_bit_reader_get_bits_uint8_unchecked (&br, 6); in gst_h265_parse_nalu_header()
247 nalu->layer_id = gst_bit_reader_get_bits_uint8_unchecked (&br, 6); in gst_h265_parse_nalu_header()
248 nalu->temporal_id_plus1 = gst_bit_reader_get_bits_uint8_unchecked (&br, 3); in gst_h265_parse_nalu_header()
249 nalu->header_bytes = 2; in gst_h265_parse_nalu_header()
1396 const guint8 * data, guint offset, gsize size, GstH265NalUnit * nalu) in gst_h265_parser_identify_nalu_unchecked() argument
1400 memset (nalu, 0, sizeof (*nalu)); in gst_h265_parser_identify_nalu_unchecked()
1415 nalu->sc_offset = offset + off1; in gst_h265_parser_identify_nalu_unchecked()
1419 if (size - nalu->sc_offset - 3 < 2) { in gst_h265_parser_identify_nalu_unchecked()
1425 if (nalu->sc_offset > 0 && data[nalu->sc_offset - 1] == 00) in gst_h265_parser_identify_nalu_unchecked()
1426 nalu->sc_offset--; in gst_h265_parser_identify_nalu_unchecked()
1428 nalu->offset = offset + off1 + 3; in gst_h265_parser_identify_nalu_unchecked()
1429 nalu->data = (guint8 *) data; in gst_h265_parser_identify_nalu_unchecked()
1430 nalu->size = size - nalu->offset; in gst_h265_parser_identify_nalu_unchecked()
1432 if (!gst_h265_parse_nalu_header (nalu)) { in gst_h265_parser_identify_nalu_unchecked()
1434 nalu->size = 0; in gst_h265_parser_identify_nalu_unchecked()
1438 nalu->valid = TRUE; in gst_h265_parser_identify_nalu_unchecked()
1440 if (nalu->type == GST_H265_NAL_EOS || nalu->type == GST_H265_NAL_EOB) { in gst_h265_parser_identify_nalu_unchecked()
1442 nalu->size = 2; in gst_h265_parser_identify_nalu_unchecked()
1463 const guint8 * data, guint offset, gsize size, GstH265NalUnit * nalu) in gst_h265_parser_identify_nalu() argument
1470 nalu); in gst_h265_parser_identify_nalu()
1477 if (nalu->type == GST_H265_NAL_EOS || nalu->type == GST_H265_NAL_EOB) in gst_h265_parser_identify_nalu()
1480 off2 = scan_for_start_codes (data + nalu->offset, size - nalu->offset); in gst_h265_parser_identify_nalu()
1482 GST_DEBUG ("Nal start %d, No end found", nalu->offset); in gst_h265_parser_identify_nalu()
1491 if (size - (nalu->offset + off2) < 5) { in gst_h265_parser_identify_nalu()
1499 while (off2 > 0 && data[nalu->offset + off2 - 1] == 00) in gst_h265_parser_identify_nalu()
1502 nalu->size = off2; in gst_h265_parser_identify_nalu()
1503 if (nalu->size < 3) in gst_h265_parser_identify_nalu()
1506 GST_DEBUG ("Complete nal found. Off: %d, Size: %d", nalu->offset, nalu->size); in gst_h265_parser_identify_nalu()
1528 GstH265NalUnit * nalu) in gst_h265_parser_identify_nalu_hevc() argument
1532 memset (nalu, 0, sizeof (*nalu)); in gst_h265_parser_identify_nalu_hevc()
1538 nalu->size = 0; in gst_h265_parser_identify_nalu_hevc()
1551 nalu->size = gst_bit_reader_get_bits_uint32_unchecked (&br, in gst_h265_parser_identify_nalu_hevc()
1553 nalu->sc_offset = offset; in gst_h265_parser_identify_nalu_hevc()
1554 nalu->offset = offset + nal_length_size; in gst_h265_parser_identify_nalu_hevc()
1556 if (nalu->size > G_MAXUINT32 - nal_length_size) { in gst_h265_parser_identify_nalu_hevc()
1558 nalu->size = 0; in gst_h265_parser_identify_nalu_hevc()
1562 if (size < (gsize) nalu->size + nal_length_size) { in gst_h265_parser_identify_nalu_hevc()
1563 nalu->size = 0; in gst_h265_parser_identify_nalu_hevc()
1568 nalu->data = (guint8 *) data; in gst_h265_parser_identify_nalu_hevc()
1570 if (!gst_h265_parse_nalu_header (nalu)) { in gst_h265_parser_identify_nalu_hevc()
1572 nalu->size = 0; in gst_h265_parser_identify_nalu_hevc()
1576 if (nalu->size < 2) in gst_h265_parser_identify_nalu_hevc()
1579 nalu->valid = TRUE; in gst_h265_parser_identify_nalu_hevc()
1596 gst_h265_parser_parse_nal (GstH265Parser * parser, GstH265NalUnit * nalu) in gst_h265_parser_parse_nal() argument
1602 switch (nalu->type) { in gst_h265_parser_parse_nal()
1604 return gst_h265_parser_parse_vps (parser, nalu, &vps); in gst_h265_parser_parse_nal()
1607 return gst_h265_parser_parse_sps (parser, nalu, &sps, FALSE); in gst_h265_parser_parse_nal()
1610 return gst_h265_parser_parse_pps (parser, nalu, &pps); in gst_h265_parser_parse_nal()
1627 gst_h265_parser_parse_vps (GstH265Parser * parser, GstH265NalUnit * nalu, in gst_h265_parser_parse_vps() argument
1630 GstH265ParserResult res = gst_h265_parse_vps (nalu, vps); in gst_h265_parser_parse_vps()
1652 gst_h265_parse_vps (GstH265NalUnit * nalu, GstH265VPS * vps) in gst_h265_parse_vps() argument
1659 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h265_parse_vps()
1660 nalu->size - nalu->header_bytes); in gst_h265_parse_vps()
1796 gst_h265_parser_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu, in gst_h265_parser_parse_sps() argument
1800 gst_h265_parse_sps (parser, nalu, sps, parse_vui_params); in gst_h265_parser_parse_sps()
1824 gst_h265_parse_sps (GstH265Parser * parser, GstH265NalUnit * nalu, in gst_h265_parse_sps() argument
1837 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h265_parse_sps()
1838 nalu->size - nalu->header_bytes); in gst_h265_parse_sps()
2110 gst_h265_parse_pps (GstH265Parser * parser, GstH265NalUnit * nalu, in gst_h265_parse_pps() argument
2122 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h265_parse_pps()
2123 nalu->size - nalu->header_bytes); in gst_h265_parse_pps()
2404 GstH265NalUnit * nalu, GstH265PPS * pps) in gst_h265_parser_parse_pps() argument
2406 GstH265ParserResult res = gst_h265_parse_pps (parser, nalu, pps); in gst_h265_parser_parse_pps()
2431 GstH265NalUnit * nalu, GstH265SliceHdr * slice) in gst_h265_parser_parse_slice_hdr() argument
2445 if (!nalu->size) { in gst_h265_parser_parse_slice_hdr()
2450 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h265_parser_parse_slice_hdr()
2451 nalu->size - nalu->header_bytes); in gst_h265_parser_parse_slice_hdr()
2457 if (GST_H265_IS_NAL_TYPE_IRAP (nalu->type)) in gst_h265_parser_parse_slice_hdr()
2508 if (!GST_H265_IS_NAL_TYPE_IDR (nalu->type)) { in gst_h265_parser_parse_slice_hdr()
2994 gst_h265_parser_parse_sei (GstH265Parser * nalparser, GstH265NalUnit * nalu, in gst_h265_parser_parse_sei() argument
3002 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h265_parser_parse_sei()
3003 nalu->size - nalu->header_bytes); in gst_h265_parser_parse_sei()
3008 res = gst_h265_parser_parse_sei_message (nalparser, nalu->type, &nr, &sei); in gst_h265_parser_parse_sei()
4159 GstH265NalUnit nalu; in gst_h265_parser_insert_sei_internal() local
4198 info.data, offset, info.size, nal_prefix_size, &nalu); in gst_h265_parser_insert_sei_internal()
4201 info.data, offset, info.size, &nalu); in gst_h265_parser_insert_sei_internal()
4211 if (nalu.type <= GST_H265_NAL_SLICE_RASL_R in gst_h265_parser_insert_sei_internal()
4212 || (nalu.type >= GST_H265_NAL_SLICE_BLA_W_LP in gst_h265_parser_insert_sei_internal()
4213 && nalu.type <= GST_H265_NAL_SLICE_CRA_NUT)) { in gst_h265_parser_insert_sei_internal()
4214 GST_DEBUG ("Found slice nal type %d at offset %d", nalu.type, in gst_h265_parser_insert_sei_internal()
4215 nalu.sc_offset); in gst_h265_parser_insert_sei_internal()
4219 offset = nalu.offset + nalu.size; in gst_h265_parser_insert_sei_internal()
4234 if (nalu.sc_offset > 0) { in gst_h265_parser_insert_sei_internal()
4236 GST_BUFFER_COPY_MEMORY, 0, nalu.sc_offset)) { in gst_h265_parser_insert_sei_internal()
4246 if (sei_nalu.layer_id != nalu.layer_id || sei_nalu.temporal_id_plus1 != in gst_h265_parser_insert_sei_internal()
4247 nalu.temporal_id_plus1) { in gst_h265_parser_insert_sei_internal()
4267 layer_id_temporal_id = ((nalu.layer_id << 3) & 0x1f8); in gst_h265_parser_insert_sei_internal()
4268 layer_id_temporal_id |= (nalu.temporal_id_plus1 & 0x7); in gst_h265_parser_insert_sei_internal()
4282 GST_BUFFER_COPY_MEMORY, nalu.sc_offset, -1)) { in gst_h265_parser_insert_sei_internal()