hardware/intel/intel-driver
Revision | ebcfb7c9c3e6ce77ea813fa711c3b59b067623ea (tree) |
---|---|
Time | 2015-03-19 11:01:29 |
Author | Qu,Pengfei <Pengfei.Qu@inte...> |
Commiter | Xiang, Haihao |
Just Style alignment
Signed-off-by: Qu,Pengfei <Pengfei.Qu@intel.com>
(cherry picked from commit 22439f1fcebbd2c1d563503720b1123a4bb97160)
@@ -631,8 +631,8 @@ VAStatus intel_mfc_avc_prepare(VADriverContextP ctx, | ||
631 | 631 | int height_in_mbs = pSequenceParameter->picture_height_in_mbs; |
632 | 632 | |
633 | 633 | if (IS_GEN6(i965->intel.device_info)) { |
634 | - /* On the SNB it should be fixed to 128 for the DMV buffer */ | |
635 | - width_in_mbs = 128; | |
634 | + /* On the SNB it should be fixed to 128 for the DMV buffer */ | |
635 | + width_in_mbs = 128; | |
636 | 636 | } |
637 | 637 | |
638 | 638 | for (j = 0; j < encode_state->num_slice_params_ext && enable_avc_ildb == 0; j++) { |
@@ -735,7 +735,7 @@ VAStatus intel_mfc_avc_prepare(VADriverContextP ctx, | ||
735 | 735 | break; |
736 | 736 | } |
737 | 737 | } |
738 | - | |
738 | + | |
739 | 739 | mfc_context->uncompressed_picture_source.bo = encode_state->input_yuv_object->bo; |
740 | 740 | dri_bo_reference(mfc_context->uncompressed_picture_source.bo); |
741 | 741 |
@@ -807,7 +807,7 @@ int intel_format_lutvalue(int value, int max) | ||
807 | 807 | if (temp1 > temp2) |
808 | 808 | ret = max; |
809 | 809 | return ret; |
810 | - | |
810 | + | |
811 | 811 | } |
812 | 812 | |
813 | 813 |
@@ -842,40 +842,40 @@ void intel_vme_update_mbmv_cost(VADriverContextP ctx, | ||
842 | 842 | |
843 | 843 | |
844 | 844 | if (encoder_context->rate_control_mode == VA_RC_CQP) |
845 | - qp = pic_param->pic_init_qp + slice_param->slice_qp_delta; | |
845 | + qp = pic_param->pic_init_qp + slice_param->slice_qp_delta; | |
846 | 846 | else |
847 | - qp = mfc_context->bit_rate_control_context[slice_type].QpPrimeY; | |
848 | - | |
847 | + qp = mfc_context->bit_rate_control_context[slice_type].QpPrimeY; | |
848 | + | |
849 | 849 | if (vme_state_message == NULL) |
850 | - return; | |
851 | - | |
850 | + return; | |
851 | + | |
852 | 852 | assert(qp <= QP_MAX); |
853 | 853 | lambda = intel_lambda_qp(qp); |
854 | 854 | if (slice_type == SLICE_TYPE_I) { |
855 | - vme_state_message[MODE_INTRA_16X16] = 0; | |
856 | - m_cost = lambda * 4; | |
857 | - vme_state_message[MODE_INTRA_8X8] = intel_format_lutvalue(m_cost, 0x8f); | |
858 | - m_cost = lambda * 16; | |
859 | - vme_state_message[MODE_INTRA_4X4] = intel_format_lutvalue(m_cost, 0x8f); | |
860 | - m_cost = lambda * 3; | |
861 | - vme_state_message[MODE_INTRA_NONPRED] = intel_format_lutvalue(m_cost, 0x6f); | |
855 | + vme_state_message[MODE_INTRA_16X16] = 0; | |
856 | + m_cost = lambda * 4; | |
857 | + vme_state_message[MODE_INTRA_8X8] = intel_format_lutvalue(m_cost, 0x8f); | |
858 | + m_cost = lambda * 16; | |
859 | + vme_state_message[MODE_INTRA_4X4] = intel_format_lutvalue(m_cost, 0x8f); | |
860 | + m_cost = lambda * 3; | |
861 | + vme_state_message[MODE_INTRA_NONPRED] = intel_format_lutvalue(m_cost, 0x6f); | |
862 | 862 | } else { |
863 | - m_cost = 0; | |
864 | - vme_state_message[MODE_INTER_MV0] = intel_format_lutvalue(m_cost, 0x6f); | |
865 | - for (j = 1; j < 3; j++) { | |
863 | + m_cost = 0; | |
864 | + vme_state_message[MODE_INTER_MV0] = intel_format_lutvalue(m_cost, 0x6f); | |
865 | + for (j = 1; j < 3; j++) { | |
866 | 866 | m_costf = (log2f((float)(j + 1)) + 1.718f) * lambda; |
867 | 867 | m_cost = (int)m_costf; |
868 | 868 | vme_state_message[MODE_INTER_MV0 + j] = intel_format_lutvalue(m_cost, 0x6f); |
869 | - } | |
870 | - mv_count = 3; | |
871 | - for (j = 4; j <= 64; j *= 2) { | |
869 | + } | |
870 | + mv_count = 3; | |
871 | + for (j = 4; j <= 64; j *= 2) { | |
872 | 872 | m_costf = (log2f((float)(j + 1)) + 1.718f) * lambda; |
873 | 873 | m_cost = (int)m_costf; |
874 | 874 | vme_state_message[MODE_INTER_MV0 + mv_count] = intel_format_lutvalue(m_cost, 0x6f); |
875 | 875 | mv_count++; |
876 | - } | |
876 | + } | |
877 | 877 | |
878 | - if (qp <= 25) { | |
878 | + if (qp <= 25) { | |
879 | 879 | vme_state_message[MODE_INTRA_16X16] = 0x4a; |
880 | 880 | vme_state_message[MODE_INTRA_8X8] = 0x4a; |
881 | 881 | vme_state_message[MODE_INTRA_4X4] = 0x4a; |
@@ -887,17 +887,17 @@ void intel_vme_update_mbmv_cost(VADriverContextP ctx, | ||
887 | 887 | vme_state_message[MODE_INTER_4X4] = 0x4a; |
888 | 888 | vme_state_message[MODE_INTER_BWD] = 0x2a; |
889 | 889 | return; |
890 | - } | |
891 | - m_costf = lambda * 10; | |
892 | - vme_state_message[MODE_INTRA_16X16] = intel_format_lutvalue(m_cost, 0x8f); | |
893 | - m_cost = lambda * 14; | |
894 | - vme_state_message[MODE_INTRA_8X8] = intel_format_lutvalue(m_cost, 0x8f); | |
895 | - m_cost = lambda * 24; | |
896 | - vme_state_message[MODE_INTRA_4X4] = intel_format_lutvalue(m_cost, 0x8f); | |
897 | - m_costf = lambda * 3.5; | |
898 | - m_cost = m_costf; | |
899 | - vme_state_message[MODE_INTRA_NONPRED] = intel_format_lutvalue(m_cost, 0x6f); | |
900 | - if (slice_type == SLICE_TYPE_P) { | |
890 | + } | |
891 | + m_costf = lambda * 10; | |
892 | + vme_state_message[MODE_INTRA_16X16] = intel_format_lutvalue(m_cost, 0x8f); | |
893 | + m_cost = lambda * 14; | |
894 | + vme_state_message[MODE_INTRA_8X8] = intel_format_lutvalue(m_cost, 0x8f); | |
895 | + m_cost = lambda * 24; | |
896 | + vme_state_message[MODE_INTRA_4X4] = intel_format_lutvalue(m_cost, 0x8f); | |
897 | + m_costf = lambda * 3.5; | |
898 | + m_cost = m_costf; | |
899 | + vme_state_message[MODE_INTRA_NONPRED] = intel_format_lutvalue(m_cost, 0x6f); | |
900 | + if (slice_type == SLICE_TYPE_P) { | |
901 | 901 | m_costf = lambda * 2.5; |
902 | 902 | m_cost = m_costf; |
903 | 903 | vme_state_message[MODE_INTER_16X16] = intel_format_lutvalue(m_cost, 0x8f); |
@@ -915,7 +915,7 @@ void intel_vme_update_mbmv_cost(VADriverContextP ctx, | ||
915 | 915 | vme_state_message[MODE_INTER_4X4] = intel_format_lutvalue(m_cost, 0x6f); |
916 | 916 | /* BWD is not used in P-frame */ |
917 | 917 | vme_state_message[MODE_INTER_BWD] = 0; |
918 | - } else { | |
918 | + } else { | |
919 | 919 | m_costf = lambda * 2.5; |
920 | 920 | m_cost = m_costf; |
921 | 921 | vme_state_message[MODE_INTER_16X16] = intel_format_lutvalue(m_cost, 0x8f); |
@@ -934,7 +934,7 @@ void intel_vme_update_mbmv_cost(VADriverContextP ctx, | ||
934 | 934 | m_costf = lambda * 1.5; |
935 | 935 | m_cost = m_costf; |
936 | 936 | vme_state_message[MODE_INTER_BWD] = intel_format_lutvalue(m_cost, 0x6f); |
937 | - } | |
937 | + } | |
938 | 938 | } |
939 | 939 | } |
940 | 940 |
@@ -1030,7 +1030,7 @@ gen7_vme_scoreboard_init(VADriverContextP ctx, struct gen6_vme_context *vme_cont | ||
1030 | 1030 | vme_context->gpe_context.vfe_desc6.scoreboard1.delta_y1 = -1; |
1031 | 1031 | vme_context->gpe_context.vfe_desc6.scoreboard1.delta_x2 = 1; |
1032 | 1032 | vme_context->gpe_context.vfe_desc6.scoreboard1.delta_y2 = -1; |
1033 | - | |
1033 | + | |
1034 | 1034 | vme_context->gpe_context.vfe_desc7.dword = 0; |
1035 | 1035 | return; |
1036 | 1036 | } |
@@ -1043,7 +1043,7 @@ static inline int loop_in_bounds(int x_index, int y_index, int first_mb, int num | ||
1043 | 1043 | return -1; |
1044 | 1044 | if (y_index < 0 || y_index >= mb_height) |
1045 | 1045 | return -1; |
1046 | - | |
1046 | + | |
1047 | 1047 | mb_index = y_index * mb_width + x_index; |
1048 | 1048 | if (mb_index < first_mb || mb_index > (first_mb + num_mb)) |
1049 | 1049 | return -1; |
@@ -1069,103 +1069,103 @@ gen7_vme_walker_fill_vme_batchbuffer(VADriverContextP ctx, | ||
1069 | 1069 | command_ptr = vme_context->vme_batchbuffer.bo->virtual; |
1070 | 1070 | |
1071 | 1071 | for (s = 0; s < encode_state->num_slice_params_ext; s++) { |
1072 | - VAEncSliceParameterBufferH264 *pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[s]->buffer; | |
1073 | - int first_mb = pSliceParameter->macroblock_address; | |
1074 | - int num_mb = pSliceParameter->num_macroblocks; | |
1075 | - unsigned int mb_intra_ub, score_dep; | |
1076 | - int x_outer, y_outer, x_inner, y_inner; | |
1077 | - int xtemp_outer = 0; | |
1078 | - | |
1079 | - x_outer = first_mb % mb_width; | |
1080 | - y_outer = first_mb / mb_width; | |
1081 | - mb_row = y_outer; | |
1082 | - | |
1083 | - for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1084 | - x_inner = x_outer; | |
1085 | - y_inner = y_outer; | |
1086 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1087 | - mb_intra_ub = 0; | |
1088 | - score_dep = 0; | |
1089 | - if (x_inner != 0) { | |
1090 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1091 | - score_dep |= MB_SCOREBOARD_A; | |
1092 | - } | |
1093 | - if (y_inner != mb_row) { | |
1094 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1095 | - score_dep |= MB_SCOREBOARD_B; | |
1096 | - if (x_inner != 0) | |
1097 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1098 | - if (x_inner != (mb_width -1)) { | |
1099 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1100 | - score_dep |= MB_SCOREBOARD_C; | |
1072 | + VAEncSliceParameterBufferH264 *pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[s]->buffer; | |
1073 | + int first_mb = pSliceParameter->macroblock_address; | |
1074 | + int num_mb = pSliceParameter->num_macroblocks; | |
1075 | + unsigned int mb_intra_ub, score_dep; | |
1076 | + int x_outer, y_outer, x_inner, y_inner; | |
1077 | + int xtemp_outer = 0; | |
1078 | + | |
1079 | + x_outer = first_mb % mb_width; | |
1080 | + y_outer = first_mb / mb_width; | |
1081 | + mb_row = y_outer; | |
1082 | + | |
1083 | + for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1084 | + x_inner = x_outer; | |
1085 | + y_inner = y_outer; | |
1086 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1087 | + mb_intra_ub = 0; | |
1088 | + score_dep = 0; | |
1089 | + if (x_inner != 0) { | |
1090 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1091 | + score_dep |= MB_SCOREBOARD_A; | |
1092 | + } | |
1093 | + if (y_inner != mb_row) { | |
1094 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1095 | + score_dep |= MB_SCOREBOARD_B; | |
1096 | + if (x_inner != 0) | |
1097 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1098 | + if (x_inner != (mb_width -1)) { | |
1099 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1100 | + score_dep |= MB_SCOREBOARD_C; | |
1101 | 1101 | } |
1102 | - } | |
1103 | - | |
1104 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1105 | - *command_ptr++ = kernel; | |
1106 | - *command_ptr++ = USE_SCOREBOARD; | |
1107 | - /* Indirect data */ | |
1108 | - *command_ptr++ = 0; | |
1109 | - /* the (X, Y) term of scoreboard */ | |
1110 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
1111 | - *command_ptr++ = score_dep; | |
1112 | - /*inline data */ | |
1113 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1114 | - *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
1115 | - x_inner -= 2; | |
1116 | - y_inner += 1; | |
1117 | - } | |
1118 | - x_outer += 1; | |
1119 | - } | |
1102 | + } | |
1103 | + | |
1104 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1105 | + *command_ptr++ = kernel; | |
1106 | + *command_ptr++ = USE_SCOREBOARD; | |
1107 | + /* Indirect data */ | |
1108 | + *command_ptr++ = 0; | |
1109 | + /* the (X, Y) term of scoreboard */ | |
1110 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
1111 | + *command_ptr++ = score_dep; | |
1112 | + /*inline data */ | |
1113 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1114 | + *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
1115 | + x_inner -= 2; | |
1116 | + y_inner += 1; | |
1117 | + } | |
1118 | + x_outer += 1; | |
1119 | + } | |
1120 | 1120 | |
1121 | - xtemp_outer = mb_width - 2; | |
1122 | - if (xtemp_outer < 0) | |
1121 | + xtemp_outer = mb_width - 2; | |
1122 | + if (xtemp_outer < 0) | |
1123 | 1123 | xtemp_outer = 0; |
1124 | - x_outer = xtemp_outer; | |
1125 | - y_outer = first_mb / mb_width; | |
1126 | - for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1127 | - y_inner = y_outer; | |
1128 | - x_inner = x_outer; | |
1129 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1130 | - mb_intra_ub = 0; | |
1131 | - score_dep = 0; | |
1132 | - if (x_inner != 0) { | |
1133 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1134 | - score_dep |= MB_SCOREBOARD_A; | |
1135 | - } | |
1136 | - if (y_inner != mb_row) { | |
1137 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1138 | - score_dep |= MB_SCOREBOARD_B; | |
1139 | - if (x_inner != 0) | |
1140 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1141 | - | |
1142 | - if (x_inner != (mb_width -1)) { | |
1143 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1144 | - score_dep |= MB_SCOREBOARD_C; | |
1124 | + x_outer = xtemp_outer; | |
1125 | + y_outer = first_mb / mb_width; | |
1126 | + for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1127 | + y_inner = y_outer; | |
1128 | + x_inner = x_outer; | |
1129 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1130 | + mb_intra_ub = 0; | |
1131 | + score_dep = 0; | |
1132 | + if (x_inner != 0) { | |
1133 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1134 | + score_dep |= MB_SCOREBOARD_A; | |
1135 | + } | |
1136 | + if (y_inner != mb_row) { | |
1137 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1138 | + score_dep |= MB_SCOREBOARD_B; | |
1139 | + if (x_inner != 0) | |
1140 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1141 | + | |
1142 | + if (x_inner != (mb_width -1)) { | |
1143 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1144 | + score_dep |= MB_SCOREBOARD_C; | |
1145 | 1145 | } |
1146 | - } | |
1147 | - | |
1148 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1149 | - *command_ptr++ = kernel; | |
1150 | - *command_ptr++ = USE_SCOREBOARD; | |
1151 | - /* Indirect data */ | |
1152 | - *command_ptr++ = 0; | |
1153 | - /* the (X, Y) term of scoreboard */ | |
1154 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
1155 | - *command_ptr++ = score_dep; | |
1156 | - /*inline data */ | |
1157 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1158 | - *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
1159 | - | |
1160 | - x_inner -= 2; | |
1161 | - y_inner += 1; | |
1162 | - } | |
1163 | - x_outer++; | |
1164 | - if (x_outer >= mb_width) { | |
1165 | - y_outer += 1; | |
1166 | - x_outer = xtemp_outer; | |
1167 | - } | |
1168 | - } | |
1146 | + } | |
1147 | + | |
1148 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1149 | + *command_ptr++ = kernel; | |
1150 | + *command_ptr++ = USE_SCOREBOARD; | |
1151 | + /* Indirect data */ | |
1152 | + *command_ptr++ = 0; | |
1153 | + /* the (X, Y) term of scoreboard */ | |
1154 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
1155 | + *command_ptr++ = score_dep; | |
1156 | + /*inline data */ | |
1157 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1158 | + *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
1159 | + | |
1160 | + x_inner -= 2; | |
1161 | + y_inner += 1; | |
1162 | + } | |
1163 | + x_outer++; | |
1164 | + if (x_outer >= mb_width) { | |
1165 | + y_outer += 1; | |
1166 | + x_outer = xtemp_outer; | |
1167 | + } | |
1168 | + } | |
1169 | 1169 | } |
1170 | 1170 | |
1171 | 1171 | *command_ptr++ = 0; |
@@ -1339,7 +1339,7 @@ void intel_vme_mpeg2_state_setup(VADriverContextP ctx, | ||
1339 | 1339 | */ |
1340 | 1340 | vme_state_message[MODE_INTRA_16X16] = intel_format_lutvalue(m_cost, 0x8f); |
1341 | 1341 | vme_state_message[MODE_INTER_16X16] = intel_format_lutvalue(m_cost, 0x8f); |
1342 | - | |
1342 | + | |
1343 | 1343 | vme_state_message[MODE_INTER_16X8] = 0; |
1344 | 1344 | vme_state_message[MODE_INTER_8X8] = 0; |
1345 | 1345 | vme_state_message[MODE_INTER_8X4] = 0; |
@@ -1369,105 +1369,105 @@ gen7_vme_mpeg2_walker_fill_vme_batchbuffer(VADriverContextP ctx, | ||
1369 | 1369 | command_ptr = vme_context->vme_batchbuffer.bo->virtual; |
1370 | 1370 | |
1371 | 1371 | { |
1372 | - unsigned int mb_intra_ub, score_dep; | |
1373 | - int x_outer, y_outer, x_inner, y_inner; | |
1374 | - int xtemp_outer = 0; | |
1375 | - int first_mb = 0; | |
1376 | - int num_mb = mb_width * mb_height; | |
1377 | - | |
1378 | - x_outer = 0; | |
1379 | - y_outer = 0; | |
1380 | - | |
1381 | - | |
1382 | - for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1383 | - x_inner = x_outer; | |
1384 | - y_inner = y_outer; | |
1385 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1386 | - mb_intra_ub = 0; | |
1387 | - score_dep = 0; | |
1388 | - if (x_inner != 0) { | |
1389 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1390 | - score_dep |= MB_SCOREBOARD_A; | |
1391 | - } | |
1392 | - if (y_inner != 0) { | |
1393 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1394 | - score_dep |= MB_SCOREBOARD_B; | |
1395 | - | |
1396 | - if (x_inner != 0) | |
1397 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1398 | - | |
1399 | - if (x_inner != (mb_width -1)) { | |
1400 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1401 | - score_dep |= MB_SCOREBOARD_C; | |
1402 | - } | |
1403 | - } | |
1404 | - | |
1405 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1406 | - *command_ptr++ = kernel; | |
1407 | - *command_ptr++ = MPEG2_SCOREBOARD; | |
1408 | - /* Indirect data */ | |
1409 | - *command_ptr++ = 0; | |
1410 | - /* the (X, Y) term of scoreboard */ | |
1411 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
1412 | - *command_ptr++ = score_dep; | |
1413 | - /*inline data */ | |
1414 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1415 | - *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
1416 | - x_inner -= 2; | |
1417 | - y_inner += 1; | |
1418 | - } | |
1419 | - x_outer += 1; | |
1420 | - } | |
1372 | + unsigned int mb_intra_ub, score_dep; | |
1373 | + int x_outer, y_outer, x_inner, y_inner; | |
1374 | + int xtemp_outer = 0; | |
1375 | + int first_mb = 0; | |
1376 | + int num_mb = mb_width * mb_height; | |
1377 | + | |
1378 | + x_outer = 0; | |
1379 | + y_outer = 0; | |
1380 | + | |
1381 | + | |
1382 | + for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1383 | + x_inner = x_outer; | |
1384 | + y_inner = y_outer; | |
1385 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1386 | + mb_intra_ub = 0; | |
1387 | + score_dep = 0; | |
1388 | + if (x_inner != 0) { | |
1389 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1390 | + score_dep |= MB_SCOREBOARD_A; | |
1391 | + } | |
1392 | + if (y_inner != 0) { | |
1393 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1394 | + score_dep |= MB_SCOREBOARD_B; | |
1395 | + | |
1396 | + if (x_inner != 0) | |
1397 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1398 | + | |
1399 | + if (x_inner != (mb_width -1)) { | |
1400 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1401 | + score_dep |= MB_SCOREBOARD_C; | |
1402 | + } | |
1403 | + } | |
1404 | + | |
1405 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1406 | + *command_ptr++ = kernel; | |
1407 | + *command_ptr++ = MPEG2_SCOREBOARD; | |
1408 | + /* Indirect data */ | |
1409 | + *command_ptr++ = 0; | |
1410 | + /* the (X, Y) term of scoreboard */ | |
1411 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
1412 | + *command_ptr++ = score_dep; | |
1413 | + /*inline data */ | |
1414 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1415 | + *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
1416 | + x_inner -= 2; | |
1417 | + y_inner += 1; | |
1418 | + } | |
1419 | + x_outer += 1; | |
1420 | + } | |
1421 | 1421 | |
1422 | - xtemp_outer = mb_width - 2; | |
1423 | - if (xtemp_outer < 0) | |
1422 | + xtemp_outer = mb_width - 2; | |
1423 | + if (xtemp_outer < 0) | |
1424 | 1424 | xtemp_outer = 0; |
1425 | - x_outer = xtemp_outer; | |
1426 | - y_outer = 0; | |
1427 | - for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1428 | - y_inner = y_outer; | |
1429 | - x_inner = x_outer; | |
1430 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1431 | - mb_intra_ub = 0; | |
1432 | - score_dep = 0; | |
1433 | - if (x_inner != 0) { | |
1434 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1435 | - score_dep |= MB_SCOREBOARD_A; | |
1436 | - } | |
1437 | - if (y_inner != 0) { | |
1438 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1439 | - score_dep |= MB_SCOREBOARD_B; | |
1440 | - | |
1441 | - if (x_inner != 0) | |
1442 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1443 | - | |
1444 | - if (x_inner != (mb_width -1)) { | |
1445 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1446 | - score_dep |= MB_SCOREBOARD_C; | |
1447 | - } | |
1448 | - } | |
1449 | - | |
1450 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1451 | - *command_ptr++ = kernel; | |
1452 | - *command_ptr++ = MPEG2_SCOREBOARD; | |
1453 | - /* Indirect data */ | |
1454 | - *command_ptr++ = 0; | |
1455 | - /* the (X, Y) term of scoreboard */ | |
1456 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
1457 | - *command_ptr++ = score_dep; | |
1458 | - /*inline data */ | |
1459 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1460 | - *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
1461 | - | |
1462 | - x_inner -= 2; | |
1463 | - y_inner += 1; | |
1464 | - } | |
1465 | - x_outer++; | |
1466 | - if (x_outer >= mb_width) { | |
1467 | - y_outer += 1; | |
1468 | - x_outer = xtemp_outer; | |
1469 | - } | |
1470 | - } | |
1425 | + x_outer = xtemp_outer; | |
1426 | + y_outer = 0; | |
1427 | + for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
1428 | + y_inner = y_outer; | |
1429 | + x_inner = x_outer; | |
1430 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
1431 | + mb_intra_ub = 0; | |
1432 | + score_dep = 0; | |
1433 | + if (x_inner != 0) { | |
1434 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
1435 | + score_dep |= MB_SCOREBOARD_A; | |
1436 | + } | |
1437 | + if (y_inner != 0) { | |
1438 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
1439 | + score_dep |= MB_SCOREBOARD_B; | |
1440 | + | |
1441 | + if (x_inner != 0) | |
1442 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
1443 | + | |
1444 | + if (x_inner != (mb_width -1)) { | |
1445 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
1446 | + score_dep |= MB_SCOREBOARD_C; | |
1447 | + } | |
1448 | + } | |
1449 | + | |
1450 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
1451 | + *command_ptr++ = kernel; | |
1452 | + *command_ptr++ = MPEG2_SCOREBOARD; | |
1453 | + /* Indirect data */ | |
1454 | + *command_ptr++ = 0; | |
1455 | + /* the (X, Y) term of scoreboard */ | |
1456 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
1457 | + *command_ptr++ = score_dep; | |
1458 | + /*inline data */ | |
1459 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
1460 | + *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
1461 | + | |
1462 | + x_inner -= 2; | |
1463 | + y_inner += 1; | |
1464 | + } | |
1465 | + x_outer++; | |
1466 | + if (x_outer >= mb_width) { | |
1467 | + y_outer += 1; | |
1468 | + x_outer = xtemp_outer; | |
1469 | + } | |
1470 | + } | |
1471 | 1471 | } |
1472 | 1472 | |
1473 | 1473 | *command_ptr++ = 0; |
@@ -51,13 +51,13 @@ | ||
51 | 51 | |
52 | 52 | #define VME_INTRA_SHADER 0 |
53 | 53 | #define VME_INTER_SHADER 1 |
54 | -#define VME_BINTER_SHADER 2 | |
54 | +#define VME_BINTER_SHADER 2 | |
55 | 55 | |
56 | 56 | #define CURBE_ALLOCATION_SIZE 37 /* in 256-bit */ |
57 | 57 | #define CURBE_TOTAL_DATA_LENGTH (4 * 32) /* in byte, it should be less than or equal to CURBE_ALLOCATION_SIZE * 32 */ |
58 | 58 | #define CURBE_URB_ENTRY_LENGTH 4 /* in 256-bit, it should be less than or equal to CURBE_TOTAL_DATA_LENGTH / 32 */ |
59 | 59 | |
60 | -#define VME_MSG_LENGTH 32 | |
60 | +#define VME_MSG_LENGTH 32 | |
61 | 61 | |
62 | 62 | static const uint32_t gen9_vme_intra_frame[][4] = { |
63 | 63 | #include "shaders/vme/intra_frame_gen9.g9b" |
@@ -337,15 +337,15 @@ gen9_vme_surface_setup(VADriverContextP ctx, | ||
337 | 337 | gen9_vme_media_chroma_source_surface_state(ctx, 6, obj_surface, encoder_context); |
338 | 338 | |
339 | 339 | if (!is_intra) { |
340 | - VAEncSliceParameterBufferH264 *slice_param = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[0]->buffer; | |
341 | - int slice_type; | |
340 | + VAEncSliceParameterBufferH264 *slice_param = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[0]->buffer; | |
341 | + int slice_type; | |
342 | 342 | |
343 | - slice_type = intel_avc_enc_slice_type_fixup(slice_param->slice_type); | |
344 | - assert(slice_type != SLICE_TYPE_I && slice_type != SLICE_TYPE_SI); | |
343 | + slice_type = intel_avc_enc_slice_type_fixup(slice_param->slice_type); | |
344 | + assert(slice_type != SLICE_TYPE_I && slice_type != SLICE_TYPE_SI); | |
345 | 345 | |
346 | - intel_avc_vme_reference_state(ctx, encode_state, encoder_context, 0, 1, gen9_vme_source_surface_state); | |
346 | + intel_avc_vme_reference_state(ctx, encode_state, encoder_context, 0, 1, gen9_vme_source_surface_state); | |
347 | 347 | |
348 | - if (slice_type == SLICE_TYPE_B) | |
348 | + if (slice_type == SLICE_TYPE_B) | |
349 | 349 | intel_avc_vme_reference_state(ctx, encode_state, encoder_context, 1, 2, gen9_vme_source_surface_state); |
350 | 350 | } |
351 | 351 |
@@ -481,107 +481,107 @@ gen9wa_vme_walker_fill_vme_batchbuffer(VADriverContextP ctx, | ||
481 | 481 | command_ptr = vme_context->vme_batchbuffer.bo->virtual; |
482 | 482 | |
483 | 483 | for (s = 0; s < encode_state->num_slice_params_ext; s++) { |
484 | - VAEncSliceParameterBufferH264 *pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[s]->buffer; | |
485 | - int first_mb = pSliceParameter->macroblock_address; | |
486 | - int num_mb = pSliceParameter->num_macroblocks; | |
487 | - unsigned int mb_intra_ub, score_dep; | |
488 | - int x_outer, y_outer, x_inner, y_inner; | |
489 | - int xtemp_outer = 0; | |
490 | - | |
491 | - x_outer = first_mb % mb_width; | |
492 | - y_outer = first_mb / mb_width; | |
493 | - mb_row = y_outer; | |
494 | - | |
495 | - for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
496 | - x_inner = x_outer; | |
497 | - y_inner = y_outer; | |
498 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
499 | - mb_intra_ub = 0; | |
500 | - score_dep = 0; | |
501 | - if (x_inner != 0) { | |
502 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
503 | - score_dep |= MB_SCOREBOARD_A; | |
484 | + VAEncSliceParameterBufferH264 *pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[s]->buffer; | |
485 | + int first_mb = pSliceParameter->macroblock_address; | |
486 | + int num_mb = pSliceParameter->num_macroblocks; | |
487 | + unsigned int mb_intra_ub, score_dep; | |
488 | + int x_outer, y_outer, x_inner, y_inner; | |
489 | + int xtemp_outer = 0; | |
490 | + | |
491 | + x_outer = first_mb % mb_width; | |
492 | + y_outer = first_mb / mb_width; | |
493 | + mb_row = y_outer; | |
494 | + | |
495 | + for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
496 | + x_inner = x_outer; | |
497 | + y_inner = y_outer; | |
498 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
499 | + mb_intra_ub = 0; | |
500 | + score_dep = 0; | |
501 | + if (x_inner != 0) { | |
502 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
503 | + score_dep |= MB_SCOREBOARD_A; | |
504 | 504 | } |
505 | - if (y_inner != mb_row) { | |
506 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
507 | - score_dep |= MB_SCOREBOARD_B; | |
508 | - if (x_inner != 0) | |
509 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
510 | - if (x_inner != (mb_width -1)) { | |
511 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
512 | - score_dep |= MB_SCOREBOARD_C; | |
505 | + if (y_inner != mb_row) { | |
506 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
507 | + score_dep |= MB_SCOREBOARD_B; | |
508 | + if (x_inner != 0) | |
509 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
510 | + if (x_inner != (mb_width -1)) { | |
511 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
512 | + score_dep |= MB_SCOREBOARD_C; | |
513 | 513 | } |
514 | - } | |
515 | - | |
516 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
517 | - *command_ptr++ = kernel; | |
518 | - *command_ptr++ = USE_SCOREBOARD; | |
519 | - /* Indirect data */ | |
520 | - *command_ptr++ = 0; | |
521 | - /* the (X, Y) term of scoreboard */ | |
522 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
523 | - *command_ptr++ = score_dep; | |
524 | - /*inline data */ | |
525 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
526 | - *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
514 | + } | |
515 | + | |
516 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
517 | + *command_ptr++ = kernel; | |
518 | + *command_ptr++ = USE_SCOREBOARD; | |
519 | + /* Indirect data */ | |
520 | + *command_ptr++ = 0; | |
521 | + /* the (X, Y) term of scoreboard */ | |
522 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
523 | + *command_ptr++ = score_dep; | |
524 | + /*inline data */ | |
525 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
526 | + *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
527 | 527 | *command_ptr++ = CMD_MEDIA_STATE_FLUSH; |
528 | 528 | *command_ptr++ = 0; |
529 | 529 | |
530 | - x_inner -= 2; | |
531 | - y_inner += 1; | |
532 | - } | |
533 | - x_outer += 1; | |
534 | - } | |
530 | + x_inner -= 2; | |
531 | + y_inner += 1; | |
532 | + } | |
533 | + x_outer += 1; | |
534 | + } | |
535 | 535 | |
536 | - xtemp_outer = mb_width - 2; | |
537 | - if (xtemp_outer < 0) | |
536 | + xtemp_outer = mb_width - 2; | |
537 | + if (xtemp_outer < 0) | |
538 | 538 | xtemp_outer = 0; |
539 | - x_outer = xtemp_outer; | |
540 | - y_outer = first_mb / mb_width; | |
541 | - for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
539 | + x_outer = xtemp_outer; | |
540 | + y_outer = first_mb / mb_width; | |
541 | + for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
542 | 542 | y_inner = y_outer; |
543 | - x_inner = x_outer; | |
544 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
545 | - mb_intra_ub = 0; | |
546 | - score_dep = 0; | |
547 | - if (x_inner != 0) { | |
548 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
549 | - score_dep |= MB_SCOREBOARD_A; | |
543 | + x_inner = x_outer; | |
544 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
545 | + mb_intra_ub = 0; | |
546 | + score_dep = 0; | |
547 | + if (x_inner != 0) { | |
548 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
549 | + score_dep |= MB_SCOREBOARD_A; | |
550 | 550 | } |
551 | - if (y_inner != mb_row) { | |
552 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
553 | - score_dep |= MB_SCOREBOARD_B; | |
554 | - if (x_inner != 0) | |
555 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
556 | - | |
557 | - if (x_inner != (mb_width -1)) { | |
558 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
559 | - score_dep |= MB_SCOREBOARD_C; | |
551 | + if (y_inner != mb_row) { | |
552 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
553 | + score_dep |= MB_SCOREBOARD_B; | |
554 | + if (x_inner != 0) | |
555 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
556 | + | |
557 | + if (x_inner != (mb_width -1)) { | |
558 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
559 | + score_dep |= MB_SCOREBOARD_C; | |
560 | 560 | } |
561 | - } | |
562 | - | |
563 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
564 | - *command_ptr++ = kernel; | |
565 | - *command_ptr++ = USE_SCOREBOARD; | |
566 | - /* Indirect data */ | |
567 | - *command_ptr++ = 0; | |
568 | - /* the (X, Y) term of scoreboard */ | |
569 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
570 | - *command_ptr++ = score_dep; | |
571 | - /*inline data */ | |
572 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
573 | - *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
561 | + } | |
562 | + | |
563 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
564 | + *command_ptr++ = kernel; | |
565 | + *command_ptr++ = USE_SCOREBOARD; | |
566 | + /* Indirect data */ | |
567 | + *command_ptr++ = 0; | |
568 | + /* the (X, Y) term of scoreboard */ | |
569 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
570 | + *command_ptr++ = score_dep; | |
571 | + /*inline data */ | |
572 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
573 | + *command_ptr++ = ((1 << 18) | (1 << 16) | transform_8x8_mode_flag | (mb_intra_ub << 8)); | |
574 | 574 | |
575 | 575 | *command_ptr++ = CMD_MEDIA_STATE_FLUSH; |
576 | 576 | *command_ptr++ = 0; |
577 | - x_inner -= 2; | |
578 | - y_inner += 1; | |
579 | - } | |
580 | - x_outer++; | |
581 | - if (x_outer >= mb_width) { | |
582 | - y_outer += 1; | |
583 | - x_outer = xtemp_outer; | |
584 | - } | |
577 | + x_inner -= 2; | |
578 | + y_inner += 1; | |
579 | + } | |
580 | + x_outer++; | |
581 | + if (x_outer >= mb_width) { | |
582 | + y_outer += 1; | |
583 | + x_outer = xtemp_outer; | |
584 | + } | |
585 | 585 | } |
586 | 586 | } |
587 | 587 |
@@ -612,34 +612,34 @@ gen9_vme_fill_vme_batchbuffer(VADriverContextP ctx, | ||
612 | 612 | int slice_mb_begin = pSliceParameter->macroblock_address; |
613 | 613 | int slice_mb_number = pSliceParameter->num_macroblocks; |
614 | 614 | unsigned int mb_intra_ub; |
615 | - int slice_mb_x = pSliceParameter->macroblock_address % mb_width; | |
615 | + int slice_mb_x = pSliceParameter->macroblock_address % mb_width; | |
616 | 616 | for (i = 0; i < slice_mb_number; ) { |
617 | 617 | int mb_count = i + slice_mb_begin; |
618 | 618 | mb_x = mb_count % mb_width; |
619 | 619 | mb_y = mb_count / mb_width; |
620 | - mb_intra_ub = 0; | |
621 | - if (mb_x != 0) { | |
622 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
623 | - } | |
624 | - if (mb_y != 0) { | |
625 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
626 | - if (mb_x != 0) | |
620 | + mb_intra_ub = 0; | |
621 | + if (mb_x != 0) { | |
622 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
623 | + } | |
624 | + if (mb_y != 0) { | |
625 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
626 | + if (mb_x != 0) | |
627 | 627 | mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; |
628 | - if (mb_x != (mb_width -1)) | |
628 | + if (mb_x != (mb_width -1)) | |
629 | 629 | mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; |
630 | - } | |
631 | - if (i < mb_width) { | |
632 | - if (i == 0) | |
630 | + } | |
631 | + if (i < mb_width) { | |
632 | + if (i == 0) | |
633 | 633 | mb_intra_ub &= ~(INTRA_PRED_AVAIL_FLAG_AE); |
634 | - mb_intra_ub &= ~(INTRA_PRED_AVAIL_FLAG_BCD_MASK); | |
635 | - if ((i == (mb_width - 1)) && slice_mb_x) { | |
634 | + mb_intra_ub &= ~(INTRA_PRED_AVAIL_FLAG_BCD_MASK); | |
635 | + if ((i == (mb_width - 1)) && slice_mb_x) { | |
636 | 636 | mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; |
637 | - } | |
638 | - } | |
637 | + } | |
638 | + } | |
639 | 639 | |
640 | - if ((i == mb_width) && slice_mb_x) { | |
641 | - mb_intra_ub &= ~(INTRA_PRED_AVAIL_FLAG_D); | |
642 | - } | |
640 | + if ((i == mb_width) && slice_mb_x) { | |
641 | + mb_intra_ub &= ~(INTRA_PRED_AVAIL_FLAG_D); | |
642 | + } | |
643 | 643 | *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); |
644 | 644 | *command_ptr++ = kernel; |
645 | 645 | *command_ptr++ = 0; |
@@ -763,7 +763,7 @@ static VAStatus gen9_vme_prepare(VADriverContextP ctx, | ||
763 | 763 | |
764 | 764 | if (!vme_context->h264_level || |
765 | 765 | (vme_context->h264_level != pSequenceParameter->level_idc)) { |
766 | - vme_context->h264_level = pSequenceParameter->level_idc; | |
766 | + vme_context->h264_level = pSequenceParameter->level_idc; | |
767 | 767 | } |
768 | 768 | |
769 | 769 | intel_vme_update_mbmv_cost(ctx, encode_state, encoder_context); |
@@ -893,109 +893,109 @@ gen9wa_vme_mpeg2_walker_fill_vme_batchbuffer(VADriverContextP ctx, | ||
893 | 893 | command_ptr = vme_context->vme_batchbuffer.bo->virtual; |
894 | 894 | |
895 | 895 | { |
896 | - unsigned int mb_intra_ub, score_dep; | |
897 | - int x_outer, y_outer, x_inner, y_inner; | |
898 | - int xtemp_outer = 0; | |
899 | - int first_mb = 0; | |
900 | - int num_mb = mb_width * mb_height; | |
901 | - | |
902 | - x_outer = 0; | |
903 | - y_outer = 0; | |
904 | - | |
905 | - for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
906 | - x_inner = x_outer; | |
907 | - y_inner = y_outer; | |
908 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
909 | - mb_intra_ub = 0; | |
910 | - score_dep = 0; | |
911 | - if (x_inner != 0) { | |
912 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
913 | - score_dep |= MB_SCOREBOARD_A; | |
896 | + unsigned int mb_intra_ub, score_dep; | |
897 | + int x_outer, y_outer, x_inner, y_inner; | |
898 | + int xtemp_outer = 0; | |
899 | + int first_mb = 0; | |
900 | + int num_mb = mb_width * mb_height; | |
901 | + | |
902 | + x_outer = 0; | |
903 | + y_outer = 0; | |
904 | + | |
905 | + for (; x_outer < (mb_width -2 ) && !loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
906 | + x_inner = x_outer; | |
907 | + y_inner = y_outer; | |
908 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
909 | + mb_intra_ub = 0; | |
910 | + score_dep = 0; | |
911 | + if (x_inner != 0) { | |
912 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
913 | + score_dep |= MB_SCOREBOARD_A; | |
914 | 914 | } |
915 | - if (y_inner != 0) { | |
916 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
917 | - score_dep |= MB_SCOREBOARD_B; | |
918 | - | |
919 | - if (x_inner != 0) | |
920 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
921 | - | |
922 | - if (x_inner != (mb_width -1)) { | |
923 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
924 | - score_dep |= MB_SCOREBOARD_C; | |
925 | - } | |
926 | - } | |
927 | - | |
928 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
929 | - *command_ptr++ = kernel; | |
930 | - *command_ptr++ = MPEG2_SCOREBOARD; | |
931 | - /* Indirect data */ | |
932 | - *command_ptr++ = 0; | |
933 | - /* the (X, Y) term of scoreboard */ | |
934 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
935 | - *command_ptr++ = score_dep; | |
936 | - /*inline data */ | |
937 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
938 | - *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
915 | + if (y_inner != 0) { | |
916 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
917 | + score_dep |= MB_SCOREBOARD_B; | |
918 | + | |
919 | + if (x_inner != 0) | |
920 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
921 | + | |
922 | + if (x_inner != (mb_width -1)) { | |
923 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
924 | + score_dep |= MB_SCOREBOARD_C; | |
925 | + } | |
926 | + } | |
927 | + | |
928 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
929 | + *command_ptr++ = kernel; | |
930 | + *command_ptr++ = MPEG2_SCOREBOARD; | |
931 | + /* Indirect data */ | |
932 | + *command_ptr++ = 0; | |
933 | + /* the (X, Y) term of scoreboard */ | |
934 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
935 | + *command_ptr++ = score_dep; | |
936 | + /*inline data */ | |
937 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
938 | + *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
939 | 939 | *command_ptr++ = CMD_MEDIA_STATE_FLUSH; |
940 | 940 | *command_ptr++ = 0; |
941 | 941 | |
942 | - x_inner -= 2; | |
943 | - y_inner += 1; | |
944 | - } | |
945 | - x_outer += 1; | |
946 | - } | |
942 | + x_inner -= 2; | |
943 | + y_inner += 1; | |
944 | + } | |
945 | + x_outer += 1; | |
946 | + } | |
947 | 947 | |
948 | - xtemp_outer = mb_width - 2; | |
949 | - if (xtemp_outer < 0) | |
948 | + xtemp_outer = mb_width - 2; | |
949 | + if (xtemp_outer < 0) | |
950 | 950 | xtemp_outer = 0; |
951 | - x_outer = xtemp_outer; | |
952 | - y_outer = 0; | |
953 | - for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
951 | + x_outer = xtemp_outer; | |
952 | + y_outer = 0; | |
953 | + for (;!loop_in_bounds(x_outer, y_outer, first_mb, num_mb, mb_width, mb_height); ) { | |
954 | 954 | y_inner = y_outer; |
955 | - x_inner = x_outer; | |
956 | - for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
957 | - mb_intra_ub = 0; | |
958 | - score_dep = 0; | |
959 | - if (x_inner != 0) { | |
960 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
961 | - score_dep |= MB_SCOREBOARD_A; | |
955 | + x_inner = x_outer; | |
956 | + for (; !loop_in_bounds(x_inner, y_inner, first_mb, num_mb, mb_width, mb_height);) { | |
957 | + mb_intra_ub = 0; | |
958 | + score_dep = 0; | |
959 | + if (x_inner != 0) { | |
960 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_AE; | |
961 | + score_dep |= MB_SCOREBOARD_A; | |
962 | 962 | } |
963 | - if (y_inner != 0) { | |
964 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
965 | - score_dep |= MB_SCOREBOARD_B; | |
966 | - | |
967 | - if (x_inner != 0) | |
968 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
969 | - | |
970 | - if (x_inner != (mb_width -1)) { | |
971 | - mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
972 | - score_dep |= MB_SCOREBOARD_C; | |
973 | - } | |
974 | - } | |
975 | - | |
976 | - *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
977 | - *command_ptr++ = kernel; | |
978 | - *command_ptr++ = MPEG2_SCOREBOARD; | |
979 | - /* Indirect data */ | |
980 | - *command_ptr++ = 0; | |
981 | - /* the (X, Y) term of scoreboard */ | |
982 | - *command_ptr++ = ((y_inner << 16) | x_inner); | |
983 | - *command_ptr++ = score_dep; | |
984 | - /*inline data */ | |
985 | - *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
986 | - *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
963 | + if (y_inner != 0) { | |
964 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_B; | |
965 | + score_dep |= MB_SCOREBOARD_B; | |
966 | + | |
967 | + if (x_inner != 0) | |
968 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_D; | |
969 | + | |
970 | + if (x_inner != (mb_width -1)) { | |
971 | + mb_intra_ub |= INTRA_PRED_AVAIL_FLAG_C; | |
972 | + score_dep |= MB_SCOREBOARD_C; | |
973 | + } | |
974 | + } | |
975 | + | |
976 | + *command_ptr++ = (CMD_MEDIA_OBJECT | (8 - 2)); | |
977 | + *command_ptr++ = kernel; | |
978 | + *command_ptr++ = MPEG2_SCOREBOARD; | |
979 | + /* Indirect data */ | |
980 | + *command_ptr++ = 0; | |
981 | + /* the (X, Y) term of scoreboard */ | |
982 | + *command_ptr++ = ((y_inner << 16) | x_inner); | |
983 | + *command_ptr++ = score_dep; | |
984 | + /*inline data */ | |
985 | + *command_ptr++ = (mb_width << 16 | y_inner << 8 | x_inner); | |
986 | + *command_ptr++ = ((1 << 18) | (1 << 16) | (mb_intra_ub << 8)); | |
987 | 987 | |
988 | 988 | *command_ptr++ = CMD_MEDIA_STATE_FLUSH; |
989 | 989 | *command_ptr++ = 0; |
990 | - x_inner -= 2; | |
991 | - y_inner += 1; | |
992 | - } | |
993 | - x_outer++; | |
994 | - if (x_outer >= mb_width) { | |
995 | - y_outer += 1; | |
996 | - x_outer = xtemp_outer; | |
990 | + x_inner -= 2; | |
991 | + y_inner += 1; | |
992 | + } | |
993 | + x_outer++; | |
994 | + if (x_outer >= mb_width) { | |
995 | + y_outer += 1; | |
996 | + x_outer = xtemp_outer; | |
997 | 997 | } |
998 | - } | |
998 | + } | |
999 | 999 | } |
1000 | 1000 | |
1001 | 1001 | *command_ptr++ = MI_BATCH_BUFFER_END; |
@@ -1094,23 +1094,23 @@ gen9_vme_mpeg2_pipeline_programing(VADriverContextP ctx, | ||
1094 | 1094 | VAEncPictureParameterBufferMPEG2 *pic_param = NULL; |
1095 | 1095 | |
1096 | 1096 | for (s = 0; s < encode_state->num_slice_params_ext; s++) { |
1097 | - int j; | |
1097 | + int j; | |
1098 | 1098 | VAEncSliceParameterBufferMPEG2 *slice_param = (VAEncSliceParameterBufferMPEG2 *)encode_state->slice_params_ext[s]->buffer; |
1099 | 1099 | |
1100 | 1100 | for (j = 0; j < encode_state->slice_params_ext[s]->num_elements; j++) { |
1101 | - if (slice_param->macroblock_address % width_in_mbs) { | |
1102 | - allow_hwscore = false; | |
1103 | - break; | |
1104 | - } | |
1105 | - } | |
1101 | + if (slice_param->macroblock_address % width_in_mbs) { | |
1102 | + allow_hwscore = false; | |
1103 | + break; | |
1104 | + } | |
1105 | + } | |
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | pic_param = (VAEncPictureParameterBufferMPEG2 *)encode_state->pic_param_ext->buffer; |
1109 | 1109 | if (pic_param->picture_type == VAEncPictureTypeIntra) { |
1110 | - allow_hwscore = false; | |
1111 | - kernel_shader = VME_INTRA_SHADER; | |
1110 | + allow_hwscore = false; | |
1111 | + kernel_shader = VME_INTRA_SHADER; | |
1112 | 1112 | } else { |
1113 | - kernel_shader = VME_INTER_SHADER; | |
1113 | + kernel_shader = VME_INTER_SHADER; | |
1114 | 1114 | } |
1115 | 1115 | |
1116 | 1116 | if (allow_hwscore) |
@@ -1120,7 +1120,7 @@ gen9_vme_mpeg2_pipeline_programing(VADriverContextP ctx, | ||
1120 | 1120 | kernel_shader, |
1121 | 1121 | encoder_context); |
1122 | 1122 | else |
1123 | - gen9_vme_mpeg2_fill_vme_batchbuffer(ctx, | |
1123 | + gen9_vme_mpeg2_fill_vme_batchbuffer(ctx, | |
1124 | 1124 | encode_state, |
1125 | 1125 | width_in_mbs, height_in_mbs, |
1126 | 1126 | is_intra ? VME_INTRA_SHADER : VME_INTER_SHADER, |
@@ -1156,7 +1156,7 @@ gen9_vme_mpeg2_prepare(VADriverContextP ctx, | ||
1156 | 1156 | |
1157 | 1157 | if ((!vme_context->mpeg2_level) || |
1158 | 1158 | (vme_context->mpeg2_level != (seq_param->sequence_extension.bits.profile_and_level_indication & MPEG2_LEVEL_MASK))) { |
1159 | - vme_context->mpeg2_level = seq_param->sequence_extension.bits.profile_and_level_indication & MPEG2_LEVEL_MASK; | |
1159 | + vme_context->mpeg2_level = seq_param->sequence_extension.bits.profile_and_level_indication & MPEG2_LEVEL_MASK; | |
1160 | 1160 | } |
1161 | 1161 | |
1162 | 1162 | /*Setup all the memory object*/ |
@@ -1772,8 +1772,8 @@ gen9_vme_context_destroy(void *context) | ||
1772 | 1772 | vme_context->vme_batchbuffer.bo = NULL; |
1773 | 1773 | |
1774 | 1774 | if (vme_context->vme_state_message) { |
1775 | - free(vme_context->vme_state_message); | |
1776 | - vme_context->vme_state_message = NULL; | |
1775 | + free(vme_context->vme_state_message); | |
1776 | + vme_context->vme_state_message = NULL; | |
1777 | 1777 | } |
1778 | 1778 | |
1779 | 1779 | free(vme_context); |
@@ -501,7 +501,7 @@ static void cpuid(unsigned int op, | ||
501 | 501 | uint32_t *eax, uint32_t *ebx, |
502 | 502 | uint32_t *ecx, uint32_t *edx) |
503 | 503 | { |
504 | - __cpuid_count(op, 0, *eax, *ebx, *ecx, *edx); | |
504 | + __cpuid_count(op, 0, *eax, *ebx, *ecx, *edx); | |
505 | 505 | } |
506 | 506 | |
507 | 507 | /* |
@@ -522,7 +522,7 @@ static int intel_driver_detect_cpustring(char *model_id) | ||
522 | 522 | |
523 | 523 | /* If the max extended CPUID info is less than 0x80000004, fail */ |
524 | 524 | if (rdata[0] < 0x80000004) |
525 | - return -EINVAL; | |
525 | + return -EINVAL; | |
526 | 526 | |
527 | 527 | /* obtain the CPUID string */ |
528 | 528 | cpuid(0x80000002, &rdata[0], &rdata[1], &rdata[2], &rdata[3]); |
@@ -584,18 +584,18 @@ static void hsw_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *cod | ||
584 | 584 | model_ptr = (char *)hsw_cpu_hook_list[i]; |
585 | 585 | |
586 | 586 | if (strlen(model_ptr) != model_len) |
587 | - continue; | |
587 | + continue; | |
588 | 588 | |
589 | 589 | if (strncasecmp(model_string, model_ptr, model_len) == 0) { |
590 | 590 | found = true; |
591 | 591 | break; |
592 | - } | |
592 | + } | |
593 | 593 | } |
594 | 594 | |
595 | 595 | if (found) { |
596 | - codec_info->has_h264_encoding = 0; | |
597 | - codec_info->has_h264_mvc_encoding = 0; | |
598 | - codec_info->has_mpeg2_encoding = 0; | |
596 | + codec_info->has_h264_encoding = 0; | |
597 | + codec_info->has_h264_mvc_encoding = 0; | |
598 | + codec_info->has_mpeg2_encoding = 0; | |
599 | 599 | } |
600 | 600 | return; |
601 | 601 | } |
@@ -712,7 +712,7 @@ static void gen7_hw_codec_preinit(VADriverContextP ctx, struct hw_codec_info *co | ||
712 | 712 | if (strncasecmp(model_string, model_ptr, model_len) == 0) { |
713 | 713 | found = true; |
714 | 714 | break; |
715 | - } | |
715 | + } | |
716 | 716 | } |
717 | 717 | |
718 | 718 | if (found) { |
@@ -753,37 +753,37 @@ i965_GetConfigAttributes(VADriverContextP ctx, | ||
753 | 753 | } |
754 | 754 | break; |
755 | 755 | |
756 | - case VAConfigAttribEncMaxRefFrames: | |
757 | - if (entrypoint == VAEntrypointEncSlice) { | |
758 | - attrib_list[i].value = (1 << 16) | (1 << 0); | |
759 | - break; | |
760 | - } | |
756 | + case VAConfigAttribEncMaxRefFrames: | |
757 | + if (entrypoint == VAEntrypointEncSlice) { | |
758 | + attrib_list[i].value = (1 << 16) | (1 << 0); | |
759 | + break; | |
760 | + } | |
761 | 761 | break; |
762 | 762 | |
763 | - case VAConfigAttribEncQualityRange: | |
764 | - if (entrypoint == VAEntrypointEncSlice) { | |
765 | - attrib_list[i].value = 1; | |
763 | + case VAConfigAttribEncQualityRange: | |
764 | + if (entrypoint == VAEntrypointEncSlice) { | |
765 | + attrib_list[i].value = 1; | |
766 | 766 | if (profile == VAProfileH264ConstrainedBaseline || |
767 | 767 | profile == VAProfileH264Main || |
768 | 768 | profile == VAProfileH264High ) |
769 | 769 | attrib_list[i].value = ENCODER_QUALITY_RANGE; |
770 | - break; | |
771 | - } | |
770 | + break; | |
771 | + } | |
772 | 772 | break; |
773 | 773 | |
774 | - case VAConfigAttribEncJPEG: | |
775 | - if( entrypoint == VAEntrypointEncPicture) { | |
776 | - VAConfigAttribValEncJPEG *configVal = (VAConfigAttribValEncJPEG*)&(attrib_list[i].value); | |
777 | - (configVal->bits).arithmatic_coding_mode = 0; // Huffman coding is used | |
778 | - (configVal->bits).progressive_dct_mode = 0; // Only Sequential DCT is supported | |
779 | - (configVal->bits).non_interleaved_mode = 1; // Support both interleaved and non-interleaved | |
780 | - (configVal->bits).differential_mode = 0; // Baseline DCT is non-differential | |
781 | - (configVal->bits).max_num_components = 3; // Only 3 components supported | |
782 | - (configVal->bits).max_num_scans = 1; // Only 1 scan per frame | |
783 | - (configVal->bits).max_num_huffman_tables = 3; // Max 3 huffman tables | |
784 | - (configVal->bits).max_num_quantization_tables = 3; // Max 3 quantization tables | |
785 | - } | |
786 | - break; | |
774 | + case VAConfigAttribEncJPEG: | |
775 | + if( entrypoint == VAEntrypointEncPicture) { | |
776 | + VAConfigAttribValEncJPEG *configVal = (VAConfigAttribValEncJPEG*)&(attrib_list[i].value); | |
777 | + (configVal->bits).arithmatic_coding_mode = 0; // Huffman coding is used | |
778 | + (configVal->bits).progressive_dct_mode = 0; // Only Sequential DCT is supported | |
779 | + (configVal->bits).non_interleaved_mode = 1; // Support both interleaved and non-interleaved | |
780 | + (configVal->bits).differential_mode = 0; // Baseline DCT is non-differential | |
781 | + (configVal->bits).max_num_components = 3; // Only 3 components supported | |
782 | + (configVal->bits).max_num_scans = 1; // Only 1 scan per frame | |
783 | + (configVal->bits).max_num_huffman_tables = 3; // Max 3 huffman tables | |
784 | + (configVal->bits).max_num_quantization_tables = 3; // Max 3 quantization tables | |
785 | + } | |
786 | + break; | |
787 | 787 | |
788 | 788 | default: |
789 | 789 | /* Do nothing */ |
@@ -987,7 +987,7 @@ i965_surface_native_memory(VADriverContextP ctx, | ||
987 | 987 | expected_fourcc == VA_FOURCC_YV12 || |
988 | 988 | expected_fourcc == VA_FOURCC_YV16) |
989 | 989 | tiling = 0; |
990 | - | |
990 | + | |
991 | 991 | i965_check_alloc_surface_bo(ctx, obj_surface, tiling, expected_fourcc, get_sampling_from_fourcc(expected_fourcc)); |
992 | 992 | |
993 | 993 | return VA_STATUS_SUCCESS; |
@@ -3236,10 +3236,10 @@ i965_CreateImage(VADriverContextP ctx, | ||
3236 | 3236 | awidth = ALIGN(width, i965->codec_info->min_linear_wpitch); |
3237 | 3237 | |
3238 | 3238 | if ((format->fourcc == VA_FOURCC_YV12) || |
3239 | - (format->fourcc == VA_FOURCC_I420)) { | |
3240 | - if (awidth % 128 != 0) { | |
3241 | - awidth = ALIGN(width, 128); | |
3242 | - } | |
3239 | + (format->fourcc == VA_FOURCC_I420)) { | |
3240 | + if (awidth % 128 != 0) { | |
3241 | + awidth = ALIGN(width, 128); | |
3242 | + } | |
3243 | 3243 | } |
3244 | 3244 | |
3245 | 3245 | aheight = ALIGN(height, i965->codec_info->min_linear_hpitch); |