The official libyuv-android docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current libyuv-android docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
libyuv is an open source project that includes YUV scaling and conversion functionality.
Learn more about libyuv-android on LibYUV for Android.
The tag of each libyuv-android docker image is consist of the version of libyuv-android and the version of basic image. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 0.44.0-oe2403sp4 | libyuv-android 0.44.0 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements.
Pull the openeuler/libyuv-android image from docker
docker pull openeuler/libyuv-android:{Tag}
Create a file named example.cpp with the following content:
#include <libyuv.h>
#include <cstdint>
#include <cstring>
#include <fstream>
#include <iostream>
int main() {
const int width = 640;
const int height = 480;
const int y_size = width * height;
const int uv_size = y_size / 2;
uint8_t* src_y = new uint8_t[y_size];
uint8_t* src_uv = new uint8_t[uv_size];
uint8_t* dst_rgb = new uint8_t[width * height * 3];
memset(src_y, 0x80, y_size);
memset(src_uv, 0x80, uv_size);
libyuv::NV12ToRGB24(
src_y, width,
src_uv, width,
dst_rgb, width * 3,
width, height
);
std::ofstream out("output.ppm", std::ios::binary);
out << "P6\n" << width << " " << height << "\n255\n";
out.write(reinterpret_cast<char*>(dst_rgb), width * height * 3);
out.close();
delete[] src_y;
delete[] src_uv;
delete[] dst_rgb;
std::cout << "YUV to RGB conversion completed!" << std::endl;
return 0;
}
Compile the program inside the container
docker run --rm -v $(pwd):/workspace openeuler/libyuv-android:{Tag} g++ /workspace/example.cpp -o /workspace/example -lyuv
Run the compiled program
docker run --rm -v $(pwd):/workspace openeuler/libyuv-android:{Tag} /workspace/example
Check the container logs
docker run --rm --name libyuv-android-test -v $(pwd):/workspace openeuler/libyuv-android:{Tag} /workspace/example
docker logs libyuv-android-test
Open an interactive shell
docker run -it --rm -v $(pwd):/workspace openeuler/libyuv-android:{Tag} bash
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.
Content type
Image
Digest
sha256:65d9a69b0…
Size
193.5 MB
Last updated
4 days ago
docker pull openeuler/libyuv-android