/third_party/ffmpeg/libavcodec/ |
D | h2645_parse.c | 35 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() 110 if (nal->skipped_bytes_pos) { in ff_h2645_extract_rbsp() 111 nal->skipped_bytes++; in ff_h2645_extract_rbsp() 112 if (nal->skipped_bytes_pos_size < nal->skipped_bytes) { in ff_h2645_extract_rbsp() 113 nal->skipped_bytes_pos_size *= 2; in ff_h2645_extract_rbsp() [all …]
|
D | hevc_parser.c | 35 #define IS_IRAP_NAL(nal) (nal->type >= 16 && nal->type <= 23) argument 36 #define IS_IDR_NAL(nal) (nal->type == HEVC_NAL_IDR_W_RADL || nal->type == HEVC_NAL_IDR_N_LP) argument 53 static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, in hevc_parse_slice_header() argument 59 GetBitContext *gb = &nal->gb; in hevc_parse_slice_header() 70 if (IS_IRAP_NAL(nal)) { in hevc_parse_slice_header() 155 if (!IS_IDR_NAL(nal)) { in hevc_parse_slice_header() 158 ff_hevc_compute_poc(ps->sps, ctx->pocTid0, pic_order_cnt_lsb, nal->type); in hevc_parse_slice_header() 162 if (nal->temporal_id == 0 && in hevc_parse_slice_header() 163 nal->type != HEVC_NAL_TRAIL_N && in hevc_parse_slice_header() 164 nal->type != HEVC_NAL_TSA_N && in hevc_parse_slice_header() [all …]
|
D | h264_parser.c | 262 H2645NAL nal = { NULL }; in parse_nal_units() local 324 consumed = ff_h2645_extract_rbsp(buf + buf_index, src_length, &rbsp, &nal, 1); in parse_nal_units() 330 ret = init_get_bits8(&nal.gb, nal.data, nal.size); in parse_nal_units() 333 get_bits1(&nal.gb); in parse_nal_units() 334 nal.ref_idc = get_bits(&nal.gb, 2); in parse_nal_units() 335 nal.type = get_bits(&nal.gb, 5); in parse_nal_units() 337 switch (nal.type) { in parse_nal_units() 339 ff_h264_decode_seq_parameter_set(&nal.gb, avctx, &p->ps, 0); in parse_nal_units() 342 ff_h264_decode_picture_parameter_set(&nal.gb, avctx, &p->ps, in parse_nal_units() 343 nal.size_bits); in parse_nal_units() [all …]
|
D | hevc_parse.c | 39 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()
|
D | h264_redundant_pps_bsf.c | 88 CodedBitstreamUnit *nal = &au->units[i]; in h264_redundant_pps_update_fragment() local 90 if (nal->type == H264_NAL_SPS) in h264_redundant_pps_update_fragment() 92 if (nal->type == H264_NAL_PPS) { in h264_redundant_pps_update_fragment() 93 err = h264_redundant_pps_fixup_pps(ctx, nal); in h264_redundant_pps_update_fragment() 104 if (nal->type == H264_NAL_SLICE || in h264_redundant_pps_update_fragment() 105 nal->type == H264_NAL_IDR_SLICE) { in h264_redundant_pps_update_fragment() 106 H264RawSlice *slice = nal->content; in h264_redundant_pps_update_fragment()
|
D | h264dec.c | 500 H2645NAL *nal = &h->pkt.nals[i]; in get_last_needed_nal() local 507 switch (nal->type) { in get_last_needed_nal() 515 ret = init_get_bits8(&gb, nal->data + 1, nal->size - 1); in get_last_needed_nal() 525 first_slice != nal->type) in get_last_needed_nal() 536 first_slice = nal->type; in get_last_needed_nal() 612 H2645NAL *nal = &h->pkt.nals[i]; in decode_nal_units() local 616 nal->ref_idc == 0 && nal->type != H264_NAL_SEI) in decode_nal_units() 620 h->nal_ref_idc = nal->ref_idc; in decode_nal_units() 621 h->nal_unit_type = nal->type; in decode_nal_units() 624 switch (nal->type) { in decode_nal_units() [all …]
|
D | extract_extradata_bsf.c | 165 H2645NAL *nal = &s->h2645_pkt.nals[i]; in extract_extradata_h2645() local 166 if (val_in_array(extradata_nal_types, nb_extradata_nal_types, nal->type)) { in extract_extradata_h2645() 167 extradata_size += nal->raw_size + 3; in extract_extradata_h2645() 169 if (nal->type == HEVC_NAL_SPS) has_sps = 1; in extract_extradata_h2645() 170 if (nal->type == HEVC_NAL_VPS) has_vps = 1; in extract_extradata_h2645() 172 if (nal->type == H264_NAL_SPS) has_sps = 1; in extract_extradata_h2645() 175 filtered_size += nal->raw_size + 3; in extract_extradata_h2645() 208 H2645NAL *nal = &s->h2645_pkt.nals[i]; in extract_extradata_h2645() local 210 nal->type)) { in extract_extradata_h2645() 212 bytestream2_put_bufferu(&pb_extradata, nal->raw_data, nal->raw_size); in extract_extradata_h2645() [all …]
|
D | h264_parse.c | 379 H2645NAL *nal = &pkt.nals[i]; in decode_extradata_ps() local 380 switch (nal->type) { in decode_extradata_ps() 382 GetBitContext tmp_gb = nal->gb; in decode_extradata_ps() 388 init_get_bits8(&tmp_gb, nal->raw_data + 1, nal->raw_size - 1); in decode_extradata_ps() 392 ret = ff_h264_decode_seq_parameter_set(&nal->gb, logctx, ps, 1); in decode_extradata_ps() 398 ret = ff_h264_decode_picture_parameter_set(&nal->gb, logctx, ps, in decode_extradata_ps() 399 nal->size_bits); in decode_extradata_ps() 405 nal->type); in decode_extradata_ps()
|
D | libxavs.c | 128 xavs_nal_t *nal; in XAVS_frame() local 147 if (xavs_encoder_encode(x4->enc, &nal, &nnal, in XAVS_frame() 151 ret = encode_nals(avctx, pkt, nal, nnal); in XAVS_frame() 356 xavs_nal_t *nal; in XAVS_init() local 360 s = xavs_encoder_headers(x4->enc, &nal, &nnal); in XAVS_init() 365 if (nal[i].i_type == NAL_SEI) { in XAVS_init() 366 x4->sei = av_malloc( 5 + nal[i].i_payload * 4 / 3 ); in XAVS_init() 367 if (xavs_nal_encode(x4->sei, &x4->sei_size, 1, nal + i) < 0) in XAVS_init() 372 size = xavs_nal_encode(p, &s, 1, nal + i); in XAVS_init()
|
D | libx265.c | 413 x265_nal *nal; in libx265_encode_init() local 416 avctx->extradata_size = ctx->api->encoder_headers(ctx->encoder, &nal, &nnal); in libx265_encode_init() 431 memcpy(avctx->extradata, nal[0].payload, avctx->extradata_size); in libx265_encode_init() 508 x265_nal *nal; in libx265_encode_frame() local 578 ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal, in libx265_encode_frame() 590 payload += nal[i].sizeBytes; in libx265_encode_frame() 600 memcpy(dst, nal[i].payload, nal[i].sizeBytes); in libx265_encode_frame() 601 dst += nal[i].sizeBytes; in libx265_encode_frame() 603 if (is_keyframe(nal[i].type)) in libx265_encode_frame()
|
D | h265_metadata_bsf.c | 348 const H265RawNALUnitHeader *nal = au->units[i].content; in h265_metadata_update_fragment() local 349 if (!nal) in h265_metadata_update_fragment() 351 if (nal->nuh_temporal_id_plus1 < temporal_id + 1) in h265_metadata_update_fragment() 352 temporal_id = nal->nuh_temporal_id_plus1 - 1; in h265_metadata_update_fragment() 356 layer_id = nal->nuh_layer_id; in h265_metadata_update_fragment()
|
D | libx264.c | 318 x264_nal_t *nal; in X264_frame() local 496 if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0) in X264_frame() 499 ret = encode_nals(ctx, pkt, nal, nnal); in X264_frame() 985 x264_nal_t *nal; in X264_init() local 989 s = x264_encoder_headers(x4->enc, &nal, &nnal); in X264_init() 996 if (nal[i].i_type == NAL_SEI) { in X264_init() 997 av_log(avctx, AV_LOG_INFO, "%s\n", nal[i].p_payload+25); in X264_init() 998 x4->sei_size = nal[i].i_payload; in X264_init() 1002 memcpy(x4->sei, nal[i].p_payload, nal[i].i_payload); in X264_init() 1005 memcpy(p, nal[i].p_payload, nal[i].i_payload); in X264_init() [all …]
|
D | hevcdec.c | 2628 static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) in hls_slice_data_wpp() argument 2630 const uint8_t *data = nal->data; in hls_slice_data_wpp() 2631 int length = nal->size; in hls_slice_data_wpp() 2673 …for (j = 0, cmpt = 0, startheader = offset + s->sh.entry_point_offset[0]; j < nal->skipped_bytes; … in hls_slice_data_wpp() 2674 if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { in hls_slice_data_wpp() 2683 + s->sh.entry_point_offset[i]; j < nal->skipped_bytes; j++) { in hls_slice_data_wpp() 2684 if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { in hls_slice_data_wpp() 3100 static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) in decode_nal_unit() argument 3106 *gb = nal->gb; in decode_nal_unit() 3107 s->nal_unit_type = nal->type; in decode_nal_unit() [all …]
|
D | h264_slice.c | 1541 const H2645NAL *nal, int first_slice) in h264_field_start() argument 1561 h->droppable = (nal->ref_idc == 0); in h264_field_start() 1570 if (nal->type == H264_NAL_IDR_SLICE) in h264_field_start() 1774 h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc); in h264_field_start() 1782 h->picture_idr = nal->type == H264_NAL_IDR_SLICE; in h264_field_start() 1799 h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); in h264_field_start() 1801 if (nal->type == H264_NAL_IDR_SLICE || in h264_field_start() 1802 (h->recovery_frame == h->poc.frame_num && nal->ref_idc)) { in h264_field_start() 1808 if (nal->type == H264_NAL_IDR_SLICE) in h264_field_start() 1833 const H2645NAL *nal) in h264_slice_header_parse() argument [all …]
|
D | cbs_h2645.c | 476 const H2645NAL *nal = &packet->nals[i]; in cbs_h2645_fragment_add_nals() local 478 size_t size = nal->size; in cbs_h2645_fragment_add_nals() 480 if (nal->nuh_layer_id > 0) in cbs_h2645_fragment_add_nals() 484 while (size > 0 && nal->data[size - 1] == 0) in cbs_h2645_fragment_add_nals() 491 ref = (nal->data == nal->raw_data) ? frag->data_ref in cbs_h2645_fragment_add_nals() 494 err = ff_cbs_append_unit_data(frag, nal->type, in cbs_h2645_fragment_add_nals() 495 (uint8_t*)nal->data, size, ref); in cbs_h2645_fragment_add_nals()
|
D | h2645_parse.h | 94 H2645NAL *nal, int small_padding);
|
D | h264dec.h | 580 const H2645NAL *nal, void *logctx); 798 int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal);
|
D | cbs_h264.h | 229 } nal, vcl; member
|
D | h264_refs.c | 834 const H2645NAL *nal, void *logctx) in ff_h264_decode_ref_pic_marking() argument 840 if (nal->type == H264_NAL_IDR_SLICE) { // FIXME fields in ff_h264_decode_ref_pic_marking()
|
/third_party/mesa3d/src/util/ |
D | vl_rbsp.h | 44 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/ffmpeg/tests/api/ |
D | api-h264-slice-test.c | 117 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/ffmpeg/libavformat/ |
D | rtpdec_h264.c | 57 #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/ffmpeg/doc/ |
D | lexicon | 19 nal: network abstraction layer
|
/third_party/ffmpeg/tests/fate/ |
D | api.mak | 17 …-slice: CMD = run $(APITESTSDIR)/api-h264-slice-test$(EXESUF) 2 $(TARGET_SAMPLES)/h264/crew_cif.nal
|
D | h264.mak | 219 FATE_H264-$(call FRAMECRC, MOV, H264) += fate-h264-mixed-nal-coding 443 fate-h264-mixed-nal-coding: CMD = framecrc -i $(TARGET_SAMPLES)/h264/mixed-na…
|