Lines Matching refs:width
64 RK_U32 width = 0; in dump_mpp_frame_to_file() local
75 width = mpp_frame_get_width(frame); in dump_mpp_frame_to_file()
105 RK_U8 *tmp_v = tmp + width * height / 2; in dump_mpp_frame_to_file()
108 fwrite(base_y, 1, width, fp); in dump_mpp_frame_to_file()
111 for (j = 0; j < width / 2; j++) { in dump_mpp_frame_to_file()
115 tmp_u += width / 2; in dump_mpp_frame_to_file()
116 tmp_v += width / 2; in dump_mpp_frame_to_file()
119 fwrite(tmp, 1, width * height, fp); in dump_mpp_frame_to_file()
129 fwrite(base_y, 1, width, fp); in dump_mpp_frame_to_file()
132 fwrite(base_c, 1, width, fp); in dump_mpp_frame_to_file()
141 fwrite(base_y, 1, width, fp); in dump_mpp_frame_to_file()
144 fwrite(base_c, 1, width / 2, fp); in dump_mpp_frame_to_file()
147 fwrite(base_c, 1, width / 2, fp); in dump_mpp_frame_to_file()
154 RK_U8 *tmp_line = (RK_U8 *)mpp_malloc(RK_U16, width); in dump_mpp_frame_to_file()
162 for (k = 0; k < MPP_ALIGN(width, 8) / 8; k++) in dump_mpp_frame_to_file()
164 fwrite(tmp_line, width * sizeof(RK_U16), 1, fp); in dump_mpp_frame_to_file()
168 for (k = 0; k < MPP_ALIGN(width, 8) / 8; k++) in dump_mpp_frame_to_file()
170 fwrite(tmp_line, width * sizeof(RK_U16), 1, fp); in dump_mpp_frame_to_file()
182 RK_U8 *tmp_v = tmp + width * height; in dump_mpp_frame_to_file()
185 fwrite(base_y, 1, width, fp); in dump_mpp_frame_to_file()
188 for (j = 0; j < width; j++) { in dump_mpp_frame_to_file()
192 tmp_u += width; in dump_mpp_frame_to_file()
193 tmp_v += width; in dump_mpp_frame_to_file()
196 fwrite(tmp, 1, width * height * 2, fp); in dump_mpp_frame_to_file()
203 RK_U8 *tmp_line = (RK_U8 *)mpp_malloc(RK_U16, width); in dump_mpp_frame_to_file()
211 for (k = 0; k < MPP_ALIGN(width, 8) / 8; k++) in dump_mpp_frame_to_file()
213 fwrite(tmp_line, width * sizeof(RK_U16), 1, fp); in dump_mpp_frame_to_file()
217 for (k = 0; k < MPP_ALIGN(width, 8) / 8; k++) in dump_mpp_frame_to_file()
219 fwrite(tmp_line, width * sizeof(RK_U16), 1, fp); in dump_mpp_frame_to_file()
230 fwrite(base_y, 1, width, fp); in dump_mpp_frame_to_file()
240 RK_U8 *tmp = mpp_malloc(RK_U8, width * height * 4); in dump_mpp_frame_to_file()
243 fwrite(base_y, 1, width * 4, fp); in dump_mpp_frame_to_file()
259 RK_U8 *tmp = mpp_malloc(RK_U8, width * height * 2); in dump_mpp_frame_to_file()
262 fwrite(base_y, 1, width * 2, fp); in dump_mpp_frame_to_file()
269 RK_U8 *tmp = mpp_malloc(RK_U8, width * height * 3); in dump_mpp_frame_to_file()
272 fwrite(base_y, 1, width * 3, fp); in dump_mpp_frame_to_file()
380 RK_U32 width = mpp_frame_get_width(frame); in calc_frm_crc() local
385 grp_line_cnt = data_grp_byte_cnt / ((width + CAL_BYTE - 1) / CAL_BYTE * CAL_BYTE); in calc_frm_crc()
393 wide_bit_sum(&dat8[y * stride], width, &crc->luma.sum[y / grp_line_cnt]); in calc_frm_crc()
397 wide_bit_sum(&dat8[y * stride], width, &crc->luma.sum[y / grp_line_cnt]); in calc_frm_crc()
404 for (x = 0; x < width / 4; x++) in calc_frm_crc()
407 crc->luma.len = height * width; in calc_frm_crc()
416 wide_bit_sum(&dat8[y * stride], width, &crc->chroma.sum[y / grp_line_cnt]); in calc_frm_crc()
420 wide_bit_sum(&dat8[y * stride], width, &crc->chroma.sum[y / grp_line_cnt]); in calc_frm_crc()
427 for (x = 0; x < width / 4; x++) in calc_frm_crc()
430 crc->chroma.len = height * width / 2; in calc_frm_crc()
481 static MPP_RET read_with_pixel_width(RK_U8 *buf, RK_S32 width, RK_S32 height, in read_with_pixel_width() argument
487 if (hor_stride < width * pix_w) { in read_with_pixel_width()
489 8 * pix_w, hor_stride, width, pix_w); in read_with_pixel_width()
493 hor_stride = width * pix_w; in read_with_pixel_width()
497 RK_S32 read_size = fread(buf + row * hor_stride, 1, width * pix_w, fp); in read_with_pixel_width()
502 if (read_size != width * pix_w) { in read_with_pixel_width()
504 width * pix_w, read_size); in read_with_pixel_width()
512 MPP_RET read_image(RK_U8 *buf, FILE *fp, RK_U32 width, RK_U32 height, in read_image() argument
523 RK_U32 align_w = MPP_ALIGN(width, 16); in read_image()
577 read_size = fread(buf_y + row * hor_stride, 1, width, fp); in read_image()
578 if (read_size != width) { in read_image()
585 width = MPP_ALIGN(width, 2); in read_image()
587 read_size = fread(buf_u + row * hor_stride, 1, width, fp); in read_image()
588 if (read_size != width) { in read_image()
596 read_size = fread(buf_y + row * hor_stride, 1, width, fp); in read_image()
597 if (read_size != width) { in read_image()
603 width = MPP_ALIGN(width, 2); in read_image()
606 read_size = fread(buf_u + row * hor_stride / 2, 1, width / 2, fp); in read_image()
607 if (read_size != width / 2) { in read_image()
614 read_size = fread(buf_v + row * hor_stride / 2, 1, width / 2, fp); in read_image()
615 if (read_size != width / 2) { in read_image()
627 ret = read_with_pixel_width(buf_y, width, height, hor_stride, 4, fp); in read_image()
642 ret = read_with_pixel_width(buf_y, width, height, hor_stride, 2, fp); in read_image()
648 ret = read_with_pixel_width(buf_y, width, height, hor_stride, 3, fp); in read_image()
651 ret = read_with_pixel_width(buf_y, width, height, hor_stride, 1, fp); in read_image()
664 static void fill_MPP_FMT_YUV420SP(RK_U8 *buf, RK_U32 width, RK_U32 height, in fill_MPP_FMT_YUV420SP() argument
674 for (x = 0; x < width; x++) { in fill_MPP_FMT_YUV420SP()
681 for (x = 0; x < width / 2; x++) { in fill_MPP_FMT_YUV420SP()
688 static void fill_MPP_FMT_YUV422SP(RK_U8 *buf, RK_U32 width, RK_U32 height, in fill_MPP_FMT_YUV422SP() argument
698 for (x = 0; x < width; x++) { in fill_MPP_FMT_YUV422SP()
705 for (x = 0; x < width / 2; x++) { in fill_MPP_FMT_YUV422SP()
1047 static RK_S32 util_check_stride_by_pixel(RK_S32 workaround, RK_S32 width, in util_check_stride_by_pixel() argument
1050 if (!workaround && hor_stride < width * pixel_size) { in util_check_stride_by_pixel()
1052 hor_stride, width, pixel_size); in util_check_stride_by_pixel()
1076 MPP_RET fill_image(RK_U8 *buf, RK_U32 width, RK_U32 height, in fill_image() argument
1089 fill_MPP_FMT_YUV420SP(buf, width, height, hor_stride, ver_stride, frame_count); in fill_image()
1092 fill_MPP_FMT_YUV422SP(buf, width, height, hor_stride, ver_stride, frame_count); in fill_image()
1098 for (x = 0; x < width; x++) { in fill_image()
1105 for (x = 0; x < width / 2; x++) { in fill_image()
1112 for (x = 0; x < width / 2; x++) { in fill_image()
1121 for (x = 0; x < width; x++) { in fill_image()
1128 for (x = 0; x < width / 2; x++) { in fill_image()
1138 for (x = 0; x < width; x++) { in fill_image()
1145 for (x = 0; x < width / 2; x++) { in fill_image()
1152 for (x = 0; x < width / 2; x++) { in fill_image()
1161 for (x = 0; x < width; x++) { in fill_image()
1168 for (x = 0; x < width / 2; x++) { in fill_image()
1178 for (x = 0; x < width / 2; x++) { in fill_image()
1190 for (x = 0; x < width / 2; x++) { in fill_image()
1202 for (x = 0; x < width / 2; x++) { in fill_image()
1214 for (x = 0; x < width / 2; x++) { in fill_image()
1226 for (x = 0; x < width; x++) { in fill_image()
1235 for (x = 0; x < width; x++) { in fill_image()
1242 for (x = 0; x < width; x++) { in fill_image()
1252 for (x = 0; x < width; x++) { in fill_image()
1258 for (x = 0; x < width; x++) { in fill_image()
1264 for (x = 0; x < width; x++) { in fill_image()
1279 if (util_check_stride_by_pixel(is_pixel_stride, width, hor_stride, pix_w)) { in fill_image()
1291 for (x = 0, i = 0; x < width; x++, i += pix_w) { in fill_image()
1309 if (util_check_stride_by_pixel(is_pixel_stride, width, hor_stride, pix_w)) { in fill_image()
1321 for (x = 0, i = 0; x < width; x++, i += pix_w) { in fill_image()
1335 if (util_check_stride_by_pixel(is_pixel_stride, width, hor_stride, pix_w)) { in fill_image()
1347 for (x = 0, i = 0; x < width; x++, i += pix_w) { in fill_image()