• Home
  • Raw
  • Download

Lines Matching refs:nalu

201 gst_h264_parse_nalu_header (GstH264NalUnit * nalu)  in gst_h264_parse_nalu_header()  argument
203 guint8 *data = nalu->data + nalu->offset; in gst_h264_parse_nalu_header()
207 if (nalu->size < 1) in gst_h264_parse_nalu_header()
210 nalu->type = (data[0] & 0x1f); in gst_h264_parse_nalu_header()
211 nalu->ref_idc = (data[0] & 0x60) >> 5; in gst_h264_parse_nalu_header()
212 nalu->idr_pic_flag = (nalu->type == 5 ? 1 : 0); in gst_h264_parse_nalu_header()
213 nalu->header_bytes = 1; in gst_h264_parse_nalu_header()
215 nalu->extension_type = GST_H264_NAL_EXTENSION_NONE; in gst_h264_parse_nalu_header()
217 switch (nalu->type) { in gst_h264_parse_nalu_header()
220 if (nalu->size < 4) in gst_h264_parse_nalu_header()
222 gst_bit_reader_init (&br, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parse_nalu_header()
223 nalu->size - nalu->header_bytes); in gst_h264_parse_nalu_header()
228 nalu->extension_type = GST_H264_NAL_EXTENSION_SVC; in gst_h264_parse_nalu_header()
231 GstH264NalUnitExtensionMVC *const mvc = &nalu->extension.mvc; in gst_h264_parse_nalu_header()
233 nalu->extension_type = GST_H264_NAL_EXTENSION_MVC; in gst_h264_parse_nalu_header()
242 nalu->idr_pic_flag = !mvc->non_idr_flag; in gst_h264_parse_nalu_header()
244 nalu->header_bytes += 3; in gst_h264_parse_nalu_header()
250 GST_DEBUG ("Nal type %u, ref_idc %u", nalu->type, nalu->ref_idc); in gst_h264_parse_nalu_header()
704 GstH264NalUnit * nalu, NalReader * nr) in gst_h264_slice_parse_dec_ref_pic_marking() argument
716 if (nalu->idr_pic_flag) { in gst_h264_slice_parse_dec_ref_pic_marking()
1434 const guint8 * data, guint offset, gsize size, GstH264NalUnit * nalu) in gst_h264_parser_identify_nalu_unchecked() argument
1438 memset (nalu, 0, sizeof (*nalu)); in gst_h264_parser_identify_nalu_unchecked()
1453 nalu->sc_offset = offset + off1; in gst_h264_parser_identify_nalu_unchecked()
1456 if (nalu->sc_offset > 0 && data[nalu->sc_offset - 1] == 00) in gst_h264_parser_identify_nalu_unchecked()
1457 nalu->sc_offset--; in gst_h264_parser_identify_nalu_unchecked()
1459 nalu->offset = offset + off1 + 3; in gst_h264_parser_identify_nalu_unchecked()
1460 nalu->data = (guint8 *) data; in gst_h264_parser_identify_nalu_unchecked()
1461 nalu->size = size - nalu->offset; in gst_h264_parser_identify_nalu_unchecked()
1463 if (!gst_h264_parse_nalu_header (nalu)) { in gst_h264_parser_identify_nalu_unchecked()
1465 nalu->size = 0; in gst_h264_parser_identify_nalu_unchecked()
1469 nalu->valid = TRUE; in gst_h264_parser_identify_nalu_unchecked()
1471 if (nalu->type == GST_H264_NAL_SEQ_END || in gst_h264_parser_identify_nalu_unchecked()
1472 nalu->type == GST_H264_NAL_STREAM_END) { in gst_h264_parser_identify_nalu_unchecked()
1474 nalu->size = 1; in gst_h264_parser_identify_nalu_unchecked()
1496 const guint8 * data, guint offset, gsize size, GstH264NalUnit * nalu) in gst_h264_parser_identify_nalu() argument
1503 nalu); in gst_h264_parser_identify_nalu()
1510 if (nalu->type == GST_H264_NAL_SEQ_END || in gst_h264_parser_identify_nalu()
1511 nalu->type == GST_H264_NAL_STREAM_END) in gst_h264_parser_identify_nalu()
1514 off2 = scan_for_start_codes (data + nalu->offset, size - nalu->offset); in gst_h264_parser_identify_nalu()
1516 GST_DEBUG ("Nal start %d, No end found", nalu->offset); in gst_h264_parser_identify_nalu()
1524 while (off2 > 0 && data[nalu->offset + off2 - 1] == 00) in gst_h264_parser_identify_nalu()
1527 nalu->size = off2; in gst_h264_parser_identify_nalu()
1528 if (nalu->size < 2) in gst_h264_parser_identify_nalu()
1531 GST_DEBUG ("Complete nal found. Off: %d, Size: %d", nalu->offset, nalu->size); in gst_h264_parser_identify_nalu()
1555 GstH264NalUnit * nalu) in gst_h264_parser_identify_nalu_avc() argument
1559 memset (nalu, 0, sizeof (*nalu)); in gst_h264_parser_identify_nalu_avc()
1565 nalu->size = 0; in gst_h264_parser_identify_nalu_avc()
1578 nalu->size = gst_bit_reader_get_bits_uint32_unchecked (&br, in gst_h264_parser_identify_nalu_avc()
1580 nalu->sc_offset = offset; in gst_h264_parser_identify_nalu_avc()
1581 nalu->offset = offset + nal_length_size; in gst_h264_parser_identify_nalu_avc()
1583 if (nalu->size > G_MAXUINT32 - nal_length_size) { in gst_h264_parser_identify_nalu_avc()
1585 nalu->size = 0; in gst_h264_parser_identify_nalu_avc()
1589 if (size < (gsize) nalu->size + nal_length_size) { in gst_h264_parser_identify_nalu_avc()
1590 nalu->size = 0; in gst_h264_parser_identify_nalu_avc()
1595 nalu->data = (guint8 *) data; in gst_h264_parser_identify_nalu_avc()
1597 if (!gst_h264_parse_nalu_header (nalu)) { in gst_h264_parser_identify_nalu_avc()
1599 nalu->size = 0; in gst_h264_parser_identify_nalu_avc()
1603 nalu->valid = TRUE; in gst_h264_parser_identify_nalu_avc()
1620 gst_h264_parser_parse_nal (GstH264NalParser * nalparser, GstH264NalUnit * nalu) in gst_h264_parser_parse_nal() argument
1625 switch (nalu->type) { in gst_h264_parser_parse_nal()
1627 return gst_h264_parser_parse_sps (nalparser, nalu, &sps); in gst_h264_parser_parse_nal()
1630 return gst_h264_parser_parse_pps (nalparser, nalu, &pps); in gst_h264_parser_parse_nal()
1647 gst_h264_parser_parse_sps (GstH264NalParser * nalparser, GstH264NalUnit * nalu, in gst_h264_parser_parse_sps() argument
1650 GstH264ParserResult res = gst_h264_parse_sps (nalu, sps); in gst_h264_parser_parse_sps()
1919 gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parse_sps() argument
1925 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parse_sps()
1926 nalu->size - nalu->header_bytes); in gst_h264_parse_sps()
1964 GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parser_parse_subset_sps() argument
1968 res = gst_h264_parse_subset_sps (nalu, sps); in gst_h264_parser_parse_subset_sps()
2002 gst_h264_parse_subset_sps (GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parse_subset_sps() argument
2008 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parse_subset_sps()
2009 nalu->size - nalu->header_bytes); in gst_h264_parse_subset_sps()
2045 gst_h264_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu, in gst_h264_parse_pps() argument
2055 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parse_pps()
2056 nalu->size - nalu->header_bytes); in gst_h264_parse_pps()
2180 GstH264NalUnit * nalu, GstH264PPS * pps) in gst_h264_parser_parse_pps() argument
2182 GstH264ParserResult res = gst_h264_parse_pps (nalparser, nalu, pps); in gst_h264_parser_parse_pps()
2226 GstH264NalUnit * nalu, GstH264SliceHdr * slice, in gst_h264_parser_parse_slice_hdr() argument
2237 if (!nalu->size) { in gst_h264_parser_parse_slice_hdr()
2242 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parser_parse_slice_hdr()
2243 nalu->size - nalu->header_bytes); in gst_h264_parser_parse_slice_hdr()
2305 if (nalu->idr_pic_flag) in gst_h264_parser_parse_slice_hdr()
2346 GST_H264_IS_MVC_NALU (nalu))) in gst_h264_parser_parse_slice_hdr()
2357 if (nalu->ref_idc != 0) { in gst_h264_parser_parse_slice_hdr()
2358 if (!gst_h264_slice_parse_dec_ref_pic_marking (slice, nalu, &nr)) in gst_h264_parser_parse_slice_hdr()
2497 gst_h264_parser_parse_sei (GstH264NalParser * nalparser, GstH264NalUnit * nalu, in gst_h264_parser_parse_sei() argument
2505 nal_reader_init (&nr, nalu->data + nalu->offset + nalu->header_bytes, in gst_h264_parser_parse_sei()
2506 nalu->size - nalu->header_bytes); in gst_h264_parser_parse_sei()
3279 GstH264NalUnit nalu; in gst_h264_parser_insert_sei_internal() local
3294 info.data, offset, info.size, nal_prefix_size, &nalu); in gst_h264_parser_insert_sei_internal()
3297 info.data, offset, info.size, &nalu); in gst_h264_parser_insert_sei_internal()
3307 if ((nalu.type >= GST_H264_NAL_SLICE && nalu.type <= GST_H264_NAL_SLICE_IDR) in gst_h264_parser_insert_sei_internal()
3308 || (nalu.type >= GST_H264_NAL_SLICE_AUX in gst_h264_parser_insert_sei_internal()
3309 && nalu.type <= GST_H264_NAL_SLICE_DEPTH)) { in gst_h264_parser_insert_sei_internal()
3311 nalu.type, nalu.sc_offset); in gst_h264_parser_insert_sei_internal()
3315 offset = nalu.offset + nalu.size; in gst_h264_parser_insert_sei_internal()
3330 if (nalu.sc_offset > 0) { in gst_h264_parser_insert_sei_internal()
3332 GST_BUFFER_COPY_MEMORY, 0, nalu.sc_offset)) { in gst_h264_parser_insert_sei_internal()
3344 GST_BUFFER_COPY_MEMORY, nalu.sc_offset, -1)) { in gst_h264_parser_insert_sei_internal()