Home
last modified time | relevance | path

Searched refs:nal (Results 1 – 25 of 65) sorted by relevance

123

/third_party/ffmpeg/libavcodec/
Dh2645_parse.c35 H2645RBSP *rbsp, H2645NAL *nal, int small_padding) in ff_h2645_extract_rbsp() argument
40 nal->skipped_bytes = 0; in ff_h2645_extract_rbsp()
87 nal->data = in ff_h2645_extract_rbsp()
88 nal->raw_data = src; in ff_h2645_extract_rbsp()
89 nal->size = in ff_h2645_extract_rbsp()
90 nal->raw_size = length; in ff_h2645_extract_rbsp()
95 nal->rbsp_buffer = &rbsp->rbsp_buffer[rbsp->rbsp_buffer_size]; in ff_h2645_extract_rbsp()
96 dst = nal->rbsp_buffer; in ff_h2645_extract_rbsp()
111 if (nal->skipped_bytes_pos) { in ff_h2645_extract_rbsp()
112 nal->skipped_bytes++; in ff_h2645_extract_rbsp()
[all …]
Dhevc_parser.c36 #define IS_IRAP_NAL(nal) (nal->type >= 16 && nal->type <= 23) argument
37 #define IS_IDR_NAL(nal) (nal->type == HEVC_NAL_IDR_W_RADL || nal->type == HEVC_NAL_IDR_N_LP) argument
54 static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, in hevc_parse_slice_header() argument
60 GetBitContext *gb = &nal->gb; in hevc_parse_slice_header()
71 if (IS_IRAP_NAL(nal)) { in hevc_parse_slice_header()
156 if (!IS_IDR_NAL(nal)) { in hevc_parse_slice_header()
159 ff_hevc_compute_poc(ps->sps, ctx->pocTid0, pic_order_cnt_lsb, nal->type); in hevc_parse_slice_header()
163 if (nal->temporal_id == 0 && in hevc_parse_slice_header()
164 nal->type != HEVC_NAL_TRAIL_N && in hevc_parse_slice_header()
165 nal->type != HEVC_NAL_TSA_N && in hevc_parse_slice_header()
[all …]
Dh264_parser.c250 H2645NAL nal = { NULL }; in parse_nal_units() local
311 consumed = ff_h2645_extract_rbsp(buf + buf_index, src_length, &rbsp, &nal, 1); in parse_nal_units()
317 ret = init_get_bits8(&nal.gb, nal.data, nal.size); in parse_nal_units()
320 get_bits1(&nal.gb); in parse_nal_units()
321 nal.ref_idc = get_bits(&nal.gb, 2); in parse_nal_units()
322 nal.type = get_bits(&nal.gb, 5); in parse_nal_units()
324 switch (nal.type) { in parse_nal_units()
326 ff_h264_decode_seq_parameter_set(&nal.gb, avctx, &p->ps, 0); in parse_nal_units()
329 ff_h264_decode_picture_parameter_set(&nal.gb, avctx, &p->ps, in parse_nal_units()
330 nal.size_bits); in parse_nal_units()
[all …]
Dhevc_parse.c39 H2645NAL *nal = &pkt.nals[i]; in hevc_decode_nal_units() local
40 if (nal->nuh_layer_id > 0) in hevc_decode_nal_units()
44 switch (nal->type) { in hevc_decode_nal_units()
46 ret = ff_hevc_decode_nal_vps(&nal->gb, logctx, ps); in hevc_decode_nal_units()
51 ret = ff_hevc_decode_nal_sps(&nal->gb, logctx, ps, apply_defdispwin); in hevc_decode_nal_units()
56 ret = ff_hevc_decode_nal_pps(&nal->gb, logctx, ps); in hevc_decode_nal_units()
62 ret = ff_hevc_decode_nal_sei(&nal->gb, logctx, sei, ps, nal->type); in hevc_decode_nal_units()
67 av_log(logctx, AV_LOG_VERBOSE, "Ignoring NAL type %d in extradata\n", nal->type); in hevc_decode_nal_units()
Dh264_redundant_pps_bsf.c89 CodedBitstreamUnit *nal = &au->units[i]; in h264_redundant_pps_update_fragment() local
91 if (nal->type == H264_NAL_SPS) in h264_redundant_pps_update_fragment()
93 if (nal->type == H264_NAL_PPS) { in h264_redundant_pps_update_fragment()
94 err = h264_redundant_pps_fixup_pps(ctx, nal); in h264_redundant_pps_update_fragment()
105 if (nal->type == H264_NAL_SLICE || in h264_redundant_pps_update_fragment()
106 nal->type == H264_NAL_IDR_SLICE) { in h264_redundant_pps_update_fragment()
107 H264RawSlice *slice = nal->content; in h264_redundant_pps_update_fragment()
Dh264dec.c492 H2645NAL *nal = &h->pkt.nals[i]; in get_last_needed_nal() local
499 switch (nal->type) { in get_last_needed_nal()
507 ret = init_get_bits8(&gb, nal->data + 1, nal->size - 1); in get_last_needed_nal()
517 first_slice != nal->type) in get_last_needed_nal()
520 first_slice = nal->type; in get_last_needed_nal()
594 H2645NAL *nal = &h->pkt.nals[i]; in decode_nal_units() local
598 nal->ref_idc == 0 && nal->type != H264_NAL_SEI) in decode_nal_units()
602 h->nal_ref_idc = nal->ref_idc; in decode_nal_units()
603 h->nal_unit_type = nal->type; in decode_nal_units()
606 switch (nal->type) { in decode_nal_units()
[all …]
Dextract_extradata_bsf.c166 H2645NAL *nal = &s->h2645_pkt.nals[i]; in extract_extradata_h2645() local
167 if (val_in_array(extradata_nal_types, nb_extradata_nal_types, nal->type)) { in extract_extradata_h2645()
168 extradata_size += nal->raw_size + 3; in extract_extradata_h2645()
170 if (nal->type == HEVC_NAL_SPS) has_sps = 1; in extract_extradata_h2645()
171 if (nal->type == HEVC_NAL_VPS) has_vps = 1; in extract_extradata_h2645()
173 if (nal->type == H264_NAL_SPS) has_sps = 1; in extract_extradata_h2645()
176 filtered_size += nal->raw_size + 3; in extract_extradata_h2645()
209 H2645NAL *nal = &s->h2645_pkt.nals[i]; in extract_extradata_h2645() local
211 nal->type)) { in extract_extradata_h2645()
213 bytestream2_put_bufferu(&pb_extradata, nal->raw_data, nal->raw_size); in extract_extradata_h2645()
[all …]
Dh264_parse.c377 H2645NAL *nal = &pkt.nals[i]; in decode_extradata_ps() local
378 switch (nal->type) { in decode_extradata_ps()
380 GetBitContext tmp_gb = nal->gb; in decode_extradata_ps()
386 init_get_bits8(&tmp_gb, nal->raw_data + 1, nal->raw_size - 1); in decode_extradata_ps()
390 ret = ff_h264_decode_seq_parameter_set(&nal->gb, logctx, ps, 1); in decode_extradata_ps()
396 ret = ff_h264_decode_picture_parameter_set(&nal->gb, logctx, ps, in decode_extradata_ps()
397 nal->size_bits); in decode_extradata_ps()
403 nal->type); in decode_extradata_ps()
Dlibxavs.c123 xavs_nal_t *nal; in XAVS_frame() local
142 if (xavs_encoder_encode(x4->enc, &nal, &nnal, in XAVS_frame()
146 ret = encode_nals(avctx, pkt, nal, nnal); in XAVS_frame()
401 xavs_nal_t *nal; in XAVS_init() local
405 s = xavs_encoder_headers(x4->enc, &nal, &nnal); in XAVS_init()
410 if (nal[i].i_type == NAL_SEI) { in XAVS_init()
411 x4->sei = av_malloc( 5 + nal[i].i_payload * 4 / 3 ); in XAVS_init()
412 if (xavs_nal_encode(x4->sei, &x4->sei_size, 1, nal + i) < 0) in XAVS_init()
417 size = xavs_nal_encode(p, &s, 1, nal + i); in XAVS_init()
Dlibx265.c385 x265_nal *nal; in libx265_encode_init() local
388 avctx->extradata_size = ctx->api->encoder_headers(ctx->encoder, &nal, &nnal); in libx265_encode_init()
403 memcpy(avctx->extradata, nal[0].payload, avctx->extradata_size); in libx265_encode_init()
480 x265_nal *nal; in libx265_encode_frame() local
520 ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal, in libx265_encode_frame()
532 payload += nal[i].sizeBytes; in libx265_encode_frame()
542 memcpy(dst, nal[i].payload, nal[i].sizeBytes); in libx265_encode_frame()
543 dst += nal[i].sizeBytes; in libx265_encode_frame()
545 if (is_keyframe(nal[i].type)) in libx265_encode_frame()
Dh265_metadata_bsf.c347 const H265RawNALUnitHeader *nal = au->units[i].content; in h265_metadata_update_fragment() local
348 if (!nal) in h265_metadata_update_fragment()
350 if (nal->nuh_temporal_id_plus1 < temporal_id + 1) in h265_metadata_update_fragment()
351 temporal_id = nal->nuh_temporal_id_plus1 - 1; in h265_metadata_update_fragment()
355 layer_id = nal->nuh_layer_id; in h265_metadata_update_fragment()
Dlibx264.c298 x264_nal_t *nal; in X264_frame() local
444 if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0) in X264_frame()
447 ret = encode_nals(ctx, pkt, nal, nnal); in X264_frame()
953 x264_nal_t *nal; in X264_init() local
957 s = x264_encoder_headers(x4->enc, &nal, &nnal); in X264_init()
964 if (nal[i].i_type == NAL_SEI) { in X264_init()
965 av_log(avctx, AV_LOG_INFO, "%s\n", nal[i].p_payload+25); in X264_init()
966 x4->sei_size = nal[i].i_payload; in X264_init()
970 memcpy(x4->sei, nal[i].p_payload, nal[i].i_payload); in X264_init()
973 memcpy(p, nal[i].p_payload, nal[i].i_payload); in X264_init()
[all …]
Dhevcdec.c2606 static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) in hls_slice_data_wpp() argument
2608 const uint8_t *data = nal->data; in hls_slice_data_wpp()
2609 int length = nal->size; in hls_slice_data_wpp()
2651 …for (j = 0, cmpt = 0, startheader = offset + s->sh.entry_point_offset[0]; j < nal->skipped_bytes; … in hls_slice_data_wpp()
2652 if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { in hls_slice_data_wpp()
2661 + s->sh.entry_point_offset[i]; j < nal->skipped_bytes; j++) { in hls_slice_data_wpp()
2662 if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { in hls_slice_data_wpp()
2956 static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) in decode_nal_unit() argument
2962 *gb = nal->gb; in decode_nal_unit()
2963 s->nal_unit_type = nal->type; in decode_nal_unit()
[all …]
Dh264_slice.c1455 const H2645NAL *nal, int first_slice) in h264_field_start() argument
1475 h->droppable = (nal->ref_idc == 0); in h264_field_start()
1683 h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc); in h264_field_start()
1691 h->picture_idr = nal->type == H264_NAL_IDR_SLICE; in h264_field_start()
1708 h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); in h264_field_start()
1710 if (nal->type == H264_NAL_IDR_SLICE || in h264_field_start()
1711 (h->recovery_frame == h->poc.frame_num && nal->ref_idc)) { in h264_field_start()
1717 if (nal->type == H264_NAL_IDR_SLICE) in h264_field_start()
1742 const H2645NAL *nal) in h264_slice_header_parse() argument
1774 if (nal->type == H264_NAL_IDR_SLICE && in h264_slice_header_parse()
[all …]
/third_party/mesa3d/src/util/
Dvl_rbsp.h44 struct vl_vlc nal; member
51 static inline void vl_rbsp_init(struct vl_rbsp *rbsp, struct vl_vlc *nal, unsigned num_bits) in vl_rbsp_init() argument
53 unsigned valid, bits_left = vl_vlc_bits_left(nal); in vl_rbsp_init()
57 rbsp->nal = *nal; in vl_rbsp_init()
60 while (vl_vlc_search_byte(nal, num_bits, 0x00)) { in vl_rbsp_init()
61 if (vl_vlc_peekbits(nal, 24) == 0x000001 || in vl_rbsp_init()
62 vl_vlc_peekbits(nal, 32) == 0x00000001) { in vl_rbsp_init()
63 vl_vlc_limit(&rbsp->nal, bits_left - vl_vlc_bits_left(nal)); in vl_rbsp_init()
66 vl_vlc_eatbits(nal, 8); in vl_rbsp_init()
69 valid = vl_vlc_valid_bits(&rbsp->nal); in vl_rbsp_init()
[all …]
/third_party/gstreamer/gstplugins_bad/tests/check/elements/
Davtpcvfdepay.c562 GstBuffer *in, *out, *nal; in GST_START_TEST() local
673 nal = fetch_nal (out, &offset); in GST_START_TEST()
674 fail_unless_equals_uint64 (nal_size (nal), 17); in GST_START_TEST()
675 fail_unless (check_nal_filling (nal, 40) == TRUE); in GST_START_TEST()
676 fail_unless_equals_uint64 (nal_type (nal), 4); in GST_START_TEST()
677 gst_buffer_unref (nal); in GST_START_TEST()
680 nal = fetch_nal (out, &offset); in GST_START_TEST()
681 fail_unless (nal == NULL); in GST_START_TEST()
694 GstBuffer *in, *out, *nal; in GST_START_TEST() local
758 nal = fetch_nal (out, &offset); in GST_START_TEST()
[all …]
/third_party/ffmpeg/tests/api/
Dapi-h264-slice-test.c117 char * nal = NULL; in main() local
139 nal = av_malloc(MAX_SLICES * UINT16_MAX + AV_INPUT_BUFFER_PADDING_SIZE); in main()
140 if (!nal) in main()
142 p = nal; in main()
206 pkt->data = nal; in main()
207 pkt->size = p - nal; in main()
211 memset(nal, 0, MAX_SLICES * UINT16_MAX + AV_INPUT_BUFFER_PADDING_SIZE); in main()
213 p = nal; in main()
218 pkt->data = nal; in main()
219 pkt->size = p - nal; in main()
[all …]
/third_party/gstreamer/gstplugins_bad/ext/avtp/
Dgstavtpcvfpay.c284 GstBuffer *nal; in gst_avtp_cvf_pay_extract_nals() local
306 nal = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset, nal_len); in gst_avtp_cvf_pay_extract_nals()
307 GST_BUFFER_PTS (nal) = GST_BUFFER_PTS (buffer); in gst_avtp_cvf_pay_extract_nals()
308 GST_BUFFER_DTS (nal) = GST_BUFFER_DTS (buffer); in gst_avtp_cvf_pay_extract_nals()
309 g_ptr_array_add (nals, nal); in gst_avtp_cvf_pay_extract_nals()
327 gst_avtp_cvf_pay_is_nal_vcl (GstAvtpCvfPay * avtpcvfpay, GstBuffer * nal) in gst_avtp_cvf_pay_is_nal_vcl() argument
331 gst_buffer_extract (nal, 0, &nal_header, 1); in gst_avtp_cvf_pay_is_nal_vcl()
338 gst_avtpcvpay_fragment_nal (GstAvtpCvfPay * avtpcvfpay, GstBuffer * nal, in gst_avtpcvpay_fragment_nal() argument
346 nal_size = gst_buffer_get_size (nal); in gst_avtpcvpay_fragment_nal()
354 return gst_buffer_ref (nal); in gst_avtpcvpay_fragment_nal()
[all …]
Dgstavtpcvfdepay.c512 GstBuffer *nal; in gst_avtp_cvf_depay_process_last_fragment() local
528 nal = gst_buffer_new_allocate (NULL, 4 + 1, NULL); in gst_avtp_cvf_depay_process_last_fragment()
529 if (G_UNLIKELY (nal == NULL)) { in gst_avtp_cvf_depay_process_last_fragment()
535 gst_buffer_map (nal, &map_nal, GST_MAP_READWRITE); in gst_avtp_cvf_depay_process_last_fragment()
546 gst_buffer_unmap (nal, &map_nal); in gst_avtp_cvf_depay_process_last_fragment()
548 nal = gst_buffer_append (nal, avtpcvfdepay->fragments); in gst_avtp_cvf_depay_process_last_fragment()
551 GST_BUFFER_PTS (nal) = pts; in gst_avtp_cvf_depay_process_last_fragment()
552 GST_BUFFER_DTS (nal) = dts; in gst_avtp_cvf_depay_process_last_fragment()
555 ret = gst_avtp_cvf_depay_internal_push (avtpcvfdepay, nal, M); in gst_avtp_cvf_depay_process_last_fragment()
652 GstBuffer *nal; in gst_avtp_cvf_depay_handle_single_nal() local
[all …]
/third_party/gstreamer/gstplugins_good/gst/rtp/
Dgstrtph264depay.c641 GPtrArray * pps_array, GstBuffer * nal) in gst_rtp_h264_add_sps_pps() argument
647 gst_buffer_map (nal, &map, GST_MAP_READ); in gst_rtp_h264_add_sps_pps()
679 g_ptr_array_add (sps_array, nal); in gst_rtp_h264_add_sps_pps()
687 g_ptr_array_add (sps_array, nal); in gst_rtp_h264_add_sps_pps()
720 g_ptr_array_add (pps_array, nal); in gst_rtp_h264_add_sps_pps()
729 g_ptr_array_add (pps_array, nal); in gst_rtp_h264_add_sps_pps()
735 gst_buffer_unmap (nal, &map); in gst_rtp_h264_add_sps_pps()
740 gst_buffer_unmap (nal, &map); in gst_rtp_h264_add_sps_pps()
741 gst_buffer_unref (nal); in gst_rtp_h264_add_sps_pps()
748 gst_rtp_h264_depay_add_sps_pps (GstRtpH264Depay * rtph264depay, GstBuffer * nal) in gst_rtp_h264_depay_add_sps_pps() argument
[all …]
Dgstrtph265depay.c669 GPtrArray * sps_array, GPtrArray * pps_array, GstBuffer * nal) in gst_rtp_h265_add_vps_sps_pps() argument
675 gst_buffer_map (nal, &map, GST_MAP_READ); in gst_rtp_h265_add_vps_sps_pps()
699 g_ptr_array_add (vps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
707 g_ptr_array_add (vps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
734 g_ptr_array_add (sps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
742 g_ptr_array_add (sps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
773 g_ptr_array_add (pps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
782 g_ptr_array_add (pps_array, nal); in gst_rtp_h265_add_vps_sps_pps()
788 gst_buffer_unmap (nal, &map); in gst_rtp_h265_add_vps_sps_pps()
793 gst_buffer_unmap (nal, &map); in gst_rtp_h265_add_vps_sps_pps()
[all …]
/third_party/gstreamer/gstplugins_bad/ext/x265/
Dgstx265enc.c1067 x265_nal_free (x265_nal * nal) in x265_nal_free() argument
1069 g_free (nal->payload); in x265_nal_free()
1070 g_free (nal); in x265_nal_free()
1076 x265_nal *nal, *vps_nal; in gst_x265_enc_set_level_tier_and_profile() local
1090 header_return = api->encoder_headers (encoder->x265enc, &nal, &i_nal); in gst_x265_enc_set_level_tier_and_profile()
1099 g_assert (nal[0].type == NAL_UNIT_VPS); in gst_x265_enc_set_level_tier_and_profile()
1100 vps_nal = gst_x265_enc_bytestream_to_nal (&nal[0]); in gst_x265_enc_set_level_tier_and_profile()
1151 x265_nal *nal; in gst_x265_enc_get_header_buffer() local
1161 header_return = api->encoder_headers (encoder->x265enc, &nal, &i_nal); in gst_x265_enc_get_header_buffer()
1176 if (nal[i].type == NAL_UNIT_VPS) { in gst_x265_enc_get_header_buffer()
[all …]
/third_party/ffmpeg/libavformat/
Drtpdec_h264.c57 #define COUNT_NAL_TYPE(data, nal) data->packet_types_received[(nal) & 0x1f]++ argument
60 #define COUNT_NAL_TYPE(data, nal) do { } while (0) argument
289 uint8_t fu_indicator, fu_header, start_bit, nal_type, nal; in h264_handle_packet_fu_a() local
300 nal = fu_indicator & 0xe0 | nal_type; in h264_handle_packet_fu_a()
308 return ff_h264_handle_frag_packet(pkt, buf, len, start_bit, &nal, 1); in h264_handle_packet_fu_a()
317 uint8_t nal; in h264_handle_packet() local
325 nal = buf[0]; in h264_handle_packet()
326 type = nal & 0x1f; in h264_handle_packet()
339 COUNT_NAL_TYPE(data, nal); in h264_handle_packet()
/third_party/gstreamer/gstplugins_bad/gst/videoparsers/
Dgsth265parse.c1405 GstBuffer *buf, *nal; in gst_h265_parse_make_codec_data() local
1421 if ((nal = h265parse->vps_nals[i])) { in gst_h265_parse_make_codec_data()
1424 vps_size += gst_buffer_get_size (nal) + 2; in gst_h265_parse_make_codec_data()
1431 if ((nal = h265parse->sps_nals[i])) { in gst_h265_parse_make_codec_data()
1434 sps_size += gst_buffer_get_size (nal) + 2; in gst_h265_parse_make_codec_data()
1442 if ((nal = h265parse->pps_nals[i])) { in gst_h265_parse_make_codec_data()
1445 pps_size += gst_buffer_get_size (nal) + 2; in gst_h265_parse_make_codec_data()
1537 if ((nal = h265parse->vps_nals[i])) { in gst_h265_parse_make_codec_data()
1538 gsize nal_size = gst_buffer_get_size (nal); in gst_h265_parse_make_codec_data()
1540 gst_buffer_extract (nal, 0, data + 2, nal_size); in gst_h265_parse_make_codec_data()
[all …]
/third_party/gstreamer/gstplugins_bad/sys/decklink/osx/
DDeckLinkAPIStreaming.h361 virtual HRESULT IsNALSequenceParameterSet (/* in */ IBMDStreamingH264NALPacket* nal) = 0;
362 virtual HRESULT IsNALPictureParameterSet (/* in */ IBMDStreamingH264NALPacket* nal) = 0;
363 …virtual HRESULT GetProfileAndLevelFromSPS (/* in */ IBMDStreamingH264NALPacket* nal, /* out */ uin…

123