| 78 | } |
| 79 | |
| 80 | ImageBatchVarShape FlipVarShape(ImageBatchVarShape &input, Tensor &flipCode, std::optional<Stream> pstream) |
| 81 | { |
| 82 | ImageBatchVarShape output = ImageBatchVarShape::Create(input.capacity()); |
| 83 | |
| 84 | for (int i = 0; i < input.numImages(); ++i) |
| 85 | { |
| 86 | nvcv::ImageFormat format = input[i].format(); |
| 87 | nvcv::Size2D size = input[i].size(); |
| 88 | auto image = Image::Create(size, format); |
| 89 | output.pushBack(image); |
| 90 | } |
| 91 | |
| 92 | return FlipVarShapeInto(output, input, flipCode, pstream); |
| 93 | } |
| 94 | |
| 95 | } // namespace |
| 96 |