192 const uint32_t* planeChannelFlags) {
196 struct PlaneAndIndex {
int plane, chanIdx;};
197 const PlaneAndIndex* planesAndIndices =
nullptr;
203 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 0}, {2, 0}, {-1, -1}};
204 planesAndIndices = kPlanesAndIndices;
208 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {2, 0}, {1, 0}, {-1, -1}};
209 planesAndIndices = kPlanesAndIndices;
213 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 0}, {1, 1}, {-1, -1}};
214 planesAndIndices = kPlanesAndIndices;
218 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 1}, {1, 0}, {-1, -1}};
219 planesAndIndices = kPlanesAndIndices;
223 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {0, 1}, {0, 2}, {-1, -1}};
224 planesAndIndices = kPlanesAndIndices;
228 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 1}, {0, 0}, {0, 2}, {-1, -1}};
229 planesAndIndices = kPlanesAndIndices;
233 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 0}, {2, 0}, {3, 0}};
234 planesAndIndices = kPlanesAndIndices;
238 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {2, 0}, {1, 0}, {3, 0}};
239 planesAndIndices = kPlanesAndIndices;
243 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 0}, {1, 1}, {2, 0}};
244 planesAndIndices = kPlanesAndIndices;
248 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {1, 1}, {1, 0}, {2, 0}};
249 planesAndIndices = kPlanesAndIndices;
253 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 0}, {0, 1}, {0, 2}, {0, 3}};
254 planesAndIndices = kPlanesAndIndices;
258 static constexpr PlaneAndIndex kPlanesAndIndices[] = {{0, 1}, {0, 0}, {0, 2}, {0, 3}};
259 planesAndIndices = kPlanesAndIndices;
266 auto [plane, chanIdx] = planesAndIndices[i];
272 yuvaLocations[i] = {plane, channel};
278 return yuvaLocations;