# load LR+HM each_down_yuv_rec = os.path.join(path_down_rec, prefix_down_rec + each_yuv) array_input_y, array_input_cbcr = read_yuv420(each_down_yuv_rec, w, h, frame_size, start_frame=start_frame) input_y_down_rec = array_input_y.squeeze(axis=3) # diff label-HM each_label = os.path.join(path_label, each_yuv) each_label_rec = os.path.join(path_label_rec, prefix_label_rec + each_yuv) df_psnr_label_rec, df_sse_label_rec, label_y, input_y_label_rec = yuv_diff_n_frame( each_label, start_frame, each_label_rec, start_frame, w_up, h_up, block_size_up, scale, frame_size) # diff label-LR-UP each_down_rec_up = os.path.join(path_down_rec_up, prefix_down_rec_up + each_yuv) df_psnr_down_rec_up, df_sse_down_rec_up, label_y, input_y_down_rec_up = yuv_diff_n_frame( each_label, start_frame, each_down_rec_up, start_frame, w_up, h_up, block_size_up, scale, frame_size) # get HR bitrate info bit_filename = '/home/kkheon/scripts/yuv_diff/dec/dec_hr/decoder_bit_lcu.txt' df_bit_lcu_hr = parse_dec_bit_lcu(bit_filename) # need a transform to down-sampled sized bit # sum 2x2 value into 1
# diff label-LR-UP for each_path_index, each_path in enumerate(list_path): if len(list_id) == len(list_path): id = list_id[each_path_index] else: id = each_path # label each_label = os.path.join(path_label, each_yuv) #each_input = os.path.join(path_target, each_path, 'QP32', prefix_down_rec_up + each_yuv) each_input = os.path.join(path_target, each_path, prefix_down_rec_up + each_yuv) df_psnr, df_sse, label_y, input_y_down_rec_up = yuv_diff_n_frame( each_label, start_frame, each_input, start_frame, w_up, h_up, block_size_up, scale, frame_size) # to list list_df_psnr.append(df_psnr) list_rec.append(input_y_down_rec_up) #list_columns_raw_frm = list_columns_raw + list_id list_columns_raw_frm = list_columns_raw df_raw_frm = pd.DataFrame(columns=list_columns_raw_frm) for y in range(0, h, block_size): for x in range(0, w, block_size): # block index y_up = int(y * 2) x_up = int(x * 2)