OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 #define UG 25 /* round(0.391 * 64) */ | 1026 #define UG 25 /* round(0.391 * 64) */ |
1027 #define VG 52 /* round(0.813 * 64) */ | 1027 #define VG 52 /* round(0.813 * 64) */ |
1028 #define VR -102 /* round(-1.596 * 64) */ | 1028 #define VR -102 /* round(-1.596 * 64) */ |
1029 | 1029 |
1030 // Bias values to subtract 16 from Y and 128 from U and V. | 1030 // Bias values to subtract 16 from Y and 128 from U and V. |
1031 #define BB (UB * 128 + YGB) | 1031 #define BB (UB * 128 + YGB) |
1032 #define BG (UG * 128 + VG * 128 + YGB) | 1032 #define BG (UG * 128 + VG * 128 + YGB) |
1033 #define BR (VR * 128 + YGB) | 1033 #define BR (VR * 128 + YGB) |
1034 | 1034 |
1035 #if defined(__aarch64__) | 1035 #if defined(__aarch64__) |
1036 const YuvConstants SIMD_ALIGNED(kYuvIConstants) = { | 1036 const YuvConstants SIMD_ALIGNED(kYuvI601Constants) = { |
1037 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1037 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1038 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1038 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1039 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1039 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1040 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1040 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1041 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1041 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1042 { 0x0101 * YG, 0, 0, 0 } | 1042 { 0x0101 * YG, 0, 0, 0 } |
1043 }; | 1043 }; |
1044 const YuvConstants SIMD_ALIGNED(kYvuIConstants) = { | 1044 const YuvConstants SIMD_ALIGNED(kYvuI601Constants) = { |
1045 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1045 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1046 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1046 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1047 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1047 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1048 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1048 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1049 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1049 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1050 { 0x0101 * YG, 0, 0, 0 } | 1050 { 0x0101 * YG, 0, 0, 0 } |
1051 }; | 1051 }; |
1052 #elif defined(__arm__) | 1052 #elif defined(__arm__) |
1053 const YuvConstants SIMD_ALIGNED(kYuvIConstants) = { | 1053 const YuvConstants SIMD_ALIGNED(kYuvI601Constants) = { |
1054 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1054 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1055 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1055 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1056 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1056 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1057 { 0x0101 * YG, 0, 0, 0 } | 1057 { 0x0101 * YG, 0, 0, 0 } |
1058 }; | 1058 }; |
1059 const YuvConstants SIMD_ALIGNED(kYvuIConstants) = { | 1059 const YuvConstants SIMD_ALIGNED(kYvuI601Constants) = { |
1060 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1060 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1061 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1061 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1062 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1062 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1063 { 0x0101 * YG, 0, 0, 0 } | 1063 { 0x0101 * YG, 0, 0, 0 } |
1064 }; | 1064 }; |
1065 #else | 1065 #else |
1066 const YuvConstants SIMD_ALIGNED(kYuvIConstants) = { | 1066 const YuvConstants SIMD_ALIGNED(kYuvI601Constants) = { |
1067 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, | 1067 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, |
1068 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, | 1068 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, |
1069 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, | 1069 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, |
1070 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, | 1070 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, |
1071 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, | 1071 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, |
1072 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, | 1072 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, |
1073 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1073 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1074 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1074 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1075 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1075 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1076 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1076 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
1077 }; | 1077 }; |
1078 const YuvConstants SIMD_ALIGNED(kYvuIConstants) = { | 1078 const YuvConstants SIMD_ALIGNED(kYvuI601Constants) = { |
1079 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, | 1079 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, |
1080 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, | 1080 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, |
1081 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, | 1081 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, |
1082 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, | 1082 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, |
1083 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, | 1083 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, |
1084 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, | 1084 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, |
1085 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1085 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1086 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1086 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1087 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1087 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1088 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1088 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
(...skipping 24 matching lines...) Expand all Loading... |
1113 #define UG 22 /* round(0.34414 * 64) */ | 1113 #define UG 22 /* round(0.34414 * 64) */ |
1114 #define VG 46 /* round(0.71414 * 64) */ | 1114 #define VG 46 /* round(0.71414 * 64) */ |
1115 #define VR -90 /* round(-1.40200 * 64) */ | 1115 #define VR -90 /* round(-1.40200 * 64) */ |
1116 | 1116 |
1117 // Bias values to round, and subtract 128 from U and V. | 1117 // Bias values to round, and subtract 128 from U and V. |
1118 #define BB (UB * 128 + YGB) | 1118 #define BB (UB * 128 + YGB) |
1119 #define BG (UG * 128 + VG * 128 + YGB) | 1119 #define BG (UG * 128 + VG * 128 + YGB) |
1120 #define BR (VR * 128 + YGB) | 1120 #define BR (VR * 128 + YGB) |
1121 | 1121 |
1122 #if defined(__aarch64__) | 1122 #if defined(__aarch64__) |
1123 const YuvConstants SIMD_ALIGNED(kYuvJConstants) = { | 1123 const YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = { |
1124 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1124 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1125 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1125 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1126 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1126 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1127 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1127 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1128 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1128 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1129 { 0x0101 * YG, 0, 0, 0 } | 1129 { 0x0101 * YG, 0, 0, 0 } |
1130 }; | 1130 }; |
1131 const YuvConstants SIMD_ALIGNED(kYvuJConstants) = { | 1131 const YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = { |
1132 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1132 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1133 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1133 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1134 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1134 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1135 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1135 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1136 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1136 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1137 { 0x0101 * YG, 0, 0, 0 } | 1137 { 0x0101 * YG, 0, 0, 0 } |
1138 }; | 1138 }; |
1139 #elif defined(__arm__) | 1139 #elif defined(__arm__) |
1140 const YuvConstants SIMD_ALIGNED(kYuvJConstants) = { | 1140 const YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = { |
1141 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1141 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1142 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1142 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1143 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1143 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1144 { 0x0101 * YG, 0, 0, 0 } | 1144 { 0x0101 * YG, 0, 0, 0 } |
1145 }; | 1145 }; |
1146 const YuvConstants SIMD_ALIGNED(kYvuJConstants) = { | 1146 const YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = { |
1147 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1147 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1148 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1148 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1149 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1149 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1150 { 0x0101 * YG, 0, 0, 0 } | 1150 { 0x0101 * YG, 0, 0, 0 } |
1151 }; | 1151 }; |
1152 #else | 1152 #else |
1153 const YuvConstants SIMD_ALIGNED(kYuvJConstants) = { | 1153 const YuvConstants SIMD_ALIGNED(kYuvJPEGConstants) = { |
1154 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, | 1154 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, |
1155 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, | 1155 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, |
1156 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, | 1156 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, |
1157 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, | 1157 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, |
1158 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, | 1158 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, |
1159 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, | 1159 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, |
1160 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1160 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1161 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1161 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1162 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1162 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1163 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1163 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
1164 }; | 1164 }; |
1165 const YuvConstants SIMD_ALIGNED(kYvuJConstants) = { | 1165 const YuvConstants SIMD_ALIGNED(kYvuJPEGConstants) = { |
1166 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, | 1166 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, |
1167 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, | 1167 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, |
1168 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, | 1168 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, |
1169 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, | 1169 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, |
1170 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, | 1170 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, |
1171 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, | 1171 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, |
1172 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1172 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1173 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1173 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1174 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1174 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1175 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1175 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
(...skipping 25 matching lines...) Expand all Loading... |
1201 #define UG 14 /* round(0.21482 * 64) */ | 1201 #define UG 14 /* round(0.21482 * 64) */ |
1202 #define VG 24 /* round(0.38059 * 64) */ | 1202 #define VG 24 /* round(0.38059 * 64) */ |
1203 #define VR -82 /* round(-1.28033 * 64) */ | 1203 #define VR -82 /* round(-1.28033 * 64) */ |
1204 | 1204 |
1205 // Bias values to round, and subtract 128 from U and V. | 1205 // Bias values to round, and subtract 128 from U and V. |
1206 #define BB (UB * 128 + YGB) | 1206 #define BB (UB * 128 + YGB) |
1207 #define BG (UG * 128 + VG * 128 + YGB) | 1207 #define BG (UG * 128 + VG * 128 + YGB) |
1208 #define BR (VR * 128 + YGB) | 1208 #define BR (VR * 128 + YGB) |
1209 | 1209 |
1210 #if defined(__aarch64__) | 1210 #if defined(__aarch64__) |
1211 const YuvConstants SIMD_ALIGNED(kYuvHConstants) = { | 1211 const YuvConstants SIMD_ALIGNED(kYuvH709Constants) = { |
1212 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1212 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1213 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, | 1213 { -UB, -VR, -UB, -VR, -UB, -VR, -UB, -VR }, |
1214 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1214 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1215 { UG, VG, UG, VG, UG, VG, UG, VG }, | 1215 { UG, VG, UG, VG, UG, VG, UG, VG }, |
1216 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1216 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1217 { 0x0101 * YG, 0, 0, 0 } | 1217 { 0x0101 * YG, 0, 0, 0 } |
1218 }; | 1218 }; |
1219 const YuvConstants SIMD_ALIGNED(kYvuHConstants) = { | 1219 const YuvConstants SIMD_ALIGNED(kYvuH709Constants) = { |
1220 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1220 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1221 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, | 1221 { -VR, -UB, -VR, -UB, -VR, -UB, -VR, -UB }, |
1222 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1222 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1223 { VG, UG, VG, UG, VG, UG, VG, UG }, | 1223 { VG, UG, VG, UG, VG, UG, VG, UG }, |
1224 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1224 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1225 { 0x0101 * YG, 0, 0, 0 } | 1225 { 0x0101 * YG, 0, 0, 0 } |
1226 }; | 1226 }; |
1227 #elif defined(__arm__) | 1227 #elif defined(__arm__) |
1228 const YuvConstants SIMD_ALIGNED(kYuvHConstants) = { | 1228 const YuvConstants SIMD_ALIGNED(kYuvH709Constants) = { |
1229 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1229 { -UB, -UB, -UB, -UB, -VR, -VR, -VR, -VR, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1230 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1230 { UG, UG, UG, UG, VG, VG, VG, VG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1231 { BB, BG, BR, 0, 0, 0, 0, 0 }, | 1231 { BB, BG, BR, 0, 0, 0, 0, 0 }, |
1232 { 0x0101 * YG, 0, 0, 0 } | 1232 { 0x0101 * YG, 0, 0, 0 } |
1233 }; | 1233 }; |
1234 const YuvConstants SIMD_ALIGNED(kYvuHConstants) = { | 1234 const YuvConstants SIMD_ALIGNED(kYvuH709Constants) = { |
1235 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1235 { -VR, -VR, -VR, -VR, -UB, -UB, -UB, -UB, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1236 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, | 1236 { VG, VG, VG, VG, UG, UG, UG, UG, 0, 0, 0, 0, 0, 0, 0, 0 }, |
1237 { BR, BG, BB, 0, 0, 0, 0, 0 }, | 1237 { BR, BG, BB, 0, 0, 0, 0, 0 }, |
1238 { 0x0101 * YG, 0, 0, 0 } | 1238 { 0x0101 * YG, 0, 0, 0 } |
1239 }; | 1239 }; |
1240 #else | 1240 #else |
1241 const YuvConstants SIMD_ALIGNED(kYuvHConstants) = { | 1241 const YuvConstants SIMD_ALIGNED(kYuvH709Constants) = { |
1242 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, | 1242 { UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, |
1243 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, | 1243 UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0 }, |
1244 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, | 1244 { UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, |
1245 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, | 1245 UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG }, |
1246 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, | 1246 { 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, |
1247 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, | 1247 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR }, |
1248 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1248 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1249 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1249 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1250 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1250 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1251 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1251 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
1252 }; | 1252 }; |
1253 const YuvConstants SIMD_ALIGNED(kYvuHConstants) = { | 1253 const YuvConstants SIMD_ALIGNED(kYvuH709Constants) = { |
1254 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, | 1254 { VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, |
1255 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, | 1255 VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, VR, 0, UB, 0 }, |
1256 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, | 1256 { VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, |
1257 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, | 1257 VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG, VG, UG }, |
1258 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, | 1258 { 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, |
1259 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, | 1259 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, UB, 0, VR }, |
1260 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, | 1260 { BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR, BR }, |
1261 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, | 1261 { BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG, BG }, |
1262 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, | 1262 { BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB, BB }, |
1263 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } | 1263 { YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG, YG } |
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 dst_rgb565 += twidth * 2; | 2611 dst_rgb565 += twidth * 2; |
2612 width -= twidth; | 2612 width -= twidth; |
2613 } | 2613 } |
2614 } | 2614 } |
2615 #endif | 2615 #endif |
2616 | 2616 |
2617 #ifdef __cplusplus | 2617 #ifdef __cplusplus |
2618 } // extern "C" | 2618 } // extern "C" |
2619 } // namespace libyuv | 2619 } // namespace libyuv |
2620 #endif | 2620 #endif |
OLD | NEW |