Lines Matching refs:nus

610         StreamContext *nus= &nut->stream[i];  in write_index()  local
617 if (j && nus->keyframe_pts[j] == nus->keyframe_pts[j-1]) { in write_index()
619 nus->keyframe_pts[j] = AV_NOPTS_VALUE; in write_index()
622 flag = (nus->keyframe_pts[j] != AV_NOPTS_VALUE) ^ (j+1 == nut->sp_count); in write_index()
623 for (; j<nut->sp_count && (nus->keyframe_pts[j] != AV_NOPTS_VALUE) == flag; j++) in write_index()
628 if (nus->keyframe_pts[k] == AV_NOPTS_VALUE) in write_index()
630 av_assert0(nus->keyframe_pts[k] > last_pts); in write_index()
631 put_v(bc, nus->keyframe_pts[k] - last_pts); in write_index()
632 last_pts = nus->keyframe_pts[k]; in write_index()
782 static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc, in get_needed_flags() argument
793 if (pkt->pts - nus->last_pts != fc->pts_delta) in get_needed_flags()
799 if (FFABS(pkt->pts - nus->last_pts) > nus->max_pts_distance) in get_needed_flags()
956 StreamContext *nus = &nut->stream[pkt->stream_index]; in nut_write_packet() local
994 if (key_frame && !(nus->last_flags & FLAG_KEY)) in nut_write_packet()
1006 ff_nut_reset_ts(nut, *nus->time_base, pkt->dts); in nut_write_packet()
1010 nus->time_base->num * (int64_t)nut->stream[i].time_base->den, in nut_write_packet()
1011 nus->time_base->den * (int64_t)nut->stream[i].time_base->num, in nut_write_packet()
1030 put_tt(nut, nus->time_base, dyn_bc, pkt->dts); in nut_write_packet()
1034 put_tt(nut, nus->time_base, dyn_bc, in nut_write_packet()
1035 av_rescale_q(av_gettime(), AV_TIME_BASE_Q, *nus->time_base)); in nut_write_packet()
1047 StreamContext *nus = &nut->stream[i]; in nut_write_packet() local
1048 av_reallocp_array(&nus->keyframe_pts, 2*nut->sp_count, sizeof(*nus->keyframe_pts)); in nut_write_packet()
1049 if (!nus->keyframe_pts) { in nut_write_packet()
1054 nus->keyframe_pts[j] = AV_NOPTS_VALUE; in nut_write_packet()
1058 av_assert0(nus->last_pts != AV_NOPTS_VALUE); in nut_write_packet()
1060 coded_pts = pkt->pts & ((1 << nus->msb_pts_shift) - 1); in nut_write_packet()
1061 if (ff_lsb2full(nus, coded_pts) != pkt->pts) in nut_write_packet()
1062 coded_pts = pkt->pts + (1 << nus->msb_pts_shift); in nut_write_packet()
1075 needed_flags = get_needed_flags(nut, nus, fc, pkt); in nut_write_packet()
1126 needed_flags = get_needed_flags(nut, nus, fc, pkt); in nut_write_packet()
1148 nus->last_flags = flags; in nut_write_packet()
1149 nus->last_pts = pkt->pts; in nut_write_packet()
1160 if (nus->keyframe_pts && nus->keyframe_pts[nut->sp_count] == AV_NOPTS_VALUE) in nut_write_packet()
1161 nus->keyframe_pts[nut->sp_count] = pkt->pts; in nut_write_packet()
1164 …if (!nut->max_pts_tb || av_compare_ts(nut->max_pts, *nut->max_pts_tb, pkt->pts, *nus->time_base) <… in nut_write_packet()
1166 nut->max_pts_tb = nus->time_base; in nut_write_packet()