Lines Matching refs:td
396 struct hva_h264_td td; member
598 struct hva_h264_td *td = &task->td; in hva_h264_prepare_task() local
626 memset(td, 0, sizeof(struct hva_h264_td)); in hva_h264_prepare_task()
628 td->frame_width = frame_width; in hva_h264_prepare_task()
629 td->frame_height = frame_height; in hva_h264_prepare_task()
632 td->window_width = frame_width; in hva_h264_prepare_task()
633 td->window_height = frame_height; in hva_h264_prepare_task()
634 td->window_horizontal_offset = 0; in hva_h264_prepare_task()
635 td->window_vertical_offset = 0; in hva_h264_prepare_task()
637 td->first_picture_in_sequence = (!frame_num) ? 1 : 0; in hva_h264_prepare_task()
640 td->pic_order_cnt_type = 2; in hva_h264_prepare_task()
643 td->use_constrained_intra_flag = false; in hva_h264_prepare_task()
644 td->brc_type = (ctrls->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) in hva_h264_prepare_task()
647 td->entropy_coding_mode = (ctrls->entropy_mode == cavlc) ? CAVLC : in hva_h264_prepare_task()
650 td->bit_rate = ctrls->bitrate; in hva_h264_prepare_task()
658 td->framerate_den = 1; in hva_h264_prepare_task()
659 td->framerate_num = (time_per_frame->denominator + in hva_h264_prepare_task()
668 td->bit_rate /= time_per_frame->numerator; in hva_h264_prepare_task()
669 td->bit_rate *= time_per_frame->denominator; in hva_h264_prepare_task()
670 td->bit_rate /= td->framerate_num; in hva_h264_prepare_task()
672 td->framerate_den = time_per_frame->numerator; in hva_h264_prepare_task()
673 td->framerate_num = time_per_frame->denominator; in hva_h264_prepare_task()
685 if (td->bit_rate > max_bitrate) { in hva_h264_prepare_task()
688 pctx->name, td->bit_rate, max_bitrate); in hva_h264_prepare_task()
689 td->bit_rate = max_bitrate; in hva_h264_prepare_task()
693 td->cpb_buffer_size = ctrls->cpb_size * 8000; in hva_h264_prepare_task()
704 if (td->cpb_buffer_size > max_cpb_buffer_size) { in hva_h264_prepare_task()
707 pctx->name, td->cpb_buffer_size, max_cpb_buffer_size); in hva_h264_prepare_task()
708 td->cpb_buffer_size = max_cpb_buffer_size; in hva_h264_prepare_task()
712 td->brc_no_skip = 0; in hva_h264_prepare_task()
716 td->bit_rate) in hva_h264_prepare_task()
717 td->delay = 1000 * (td->cpb_buffer_size / td->bit_rate); in hva_h264_prepare_task()
719 td->delay = 0; in hva_h264_prepare_task()
723 td->sampling_mode = SAMPLING_MODE_NV12; in hva_h264_prepare_task()
726 td->sampling_mode = SAMPLING_MODE_NV21; in hva_h264_prepare_task()
741 td->rgb2_yuv_y_coeff = 0x12031008; in hva_h264_prepare_task()
742 td->rgb2_yuv_u_coeff = 0x800EF7FB; in hva_h264_prepare_task()
743 td->rgb2_yuv_v_coeff = 0x80FEF40E; in hva_h264_prepare_task()
746 td->transform_mode = ctrls->dct8x8; in hva_h264_prepare_task()
749 td->encoder_complexity = 2; in hva_h264_prepare_task()
752 td->quant = 28; in hva_h264_prepare_task()
754 if (td->framerate_den == 0) { in hva_h264_prepare_task()
761 if (td->framerate_num == 0) in hva_h264_prepare_task()
762 td->brc_type = 0; in hva_h264_prepare_task()
765 td->strict_hrd_compliancy = 1; in hva_h264_prepare_task()
768 td->qp_min = clamp_val(ctrls->qpmin, 0, 51); in hva_h264_prepare_task()
769 td->qp_max = clamp_val(ctrls->qpmax, 0, 51); in hva_h264_prepare_task()
771 td->addr_source_buffer = frame->paddr; in hva_h264_prepare_task()
772 td->addr_fwd_ref_buffer = fwd_ref_frame->paddr; in hva_h264_prepare_task()
773 td->addr_rec_buffer = loc_rec_frame->paddr; in hva_h264_prepare_task()
775 td->addr_output_bitstream_end = (u32)stream->paddr + stream->size; in hva_h264_prepare_task()
777 td->addr_output_bitstream_start = (u32)stream->paddr; in hva_h264_prepare_task()
778 td->bitstream_offset = (((u32)stream->paddr & 0xF) << 3) & in hva_h264_prepare_task()
781 td->addr_param_out = (u32)ctx->task->paddr + in hva_h264_prepare_task()
787 td->addr_spatial_context = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
790 td->addr_temporal_context = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
793 td->addr_temporal_context = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
796 td->addr_spatial_context = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
801 td->addr_brc_in_out_parameter = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
803 paddr = td->addr_brc_in_out_parameter + BRC_DATA_SIZE; in hva_h264_prepare_task()
804 td->addr_slice_header = ALIGN(paddr, 0x100); in hva_h264_prepare_task()
805 td->addr_external_sw = ALIGN(addr_esram, 0x100); in hva_h264_prepare_task()
808 td->addr_local_rec_buffer = ALIGN(addr_esram, 0x100); in hva_h264_prepare_task()
811 td->addr_lctx = ALIGN(addr_esram, 0x100); in hva_h264_prepare_task()
814 td->addr_cabac_context_buffer = ALIGN(addr_esram, 0x100); in hva_h264_prepare_task()
817 td->picture_coding_type = PICTURE_CODING_TYPE_I; in hva_h264_prepare_task()
820 td->picture_coding_type = PICTURE_CODING_TYPE_P; in hva_h264_prepare_task()
825 slice_header_vaddr = seq_info->vaddr + (td->addr_slice_header - in hva_h264_prepare_task()
829 &td->slice_header_size_in_bits, in hva_h264_prepare_task()
830 &td->slice_header_offset0, in hva_h264_prepare_task()
831 &td->slice_header_offset1, in hva_h264_prepare_task()
832 &td->slice_header_offset2); in hva_h264_prepare_task()
834 td->chroma_qp_index_offset = 2; in hva_h264_prepare_task()
835 td->slice_synchro_enable = 0; in hva_h264_prepare_task()
836 td->max_slice_number = 1; in hva_h264_prepare_task()
864 td->non_vcl_nalu_size = payload * 8; in hva_h264_prepare_task()
867 td->addr_output_bitstream_start += ((payload >> 4) << 4); in hva_h264_prepare_task()
868 td->bitstream_offset += (payload - ((payload >> 4) << 4)) * 8; in hva_h264_prepare_task()