YUV is a color space typically used as part of a color image pipeline.
Questions tagged [yuv]
784 questions
10
votes
1 answer
Color conversion from DXGI_FORMAT_B8G8R8A8_UNORM to NV12 in GPU using DirectX11 pixel shaders
I'm working on a code to capture the desktop using Desktop duplication and encode the same to h264 using Intel hardwareMFT. The encoder only accepts NV12 format as input. I have got a DXGI_FORMAT_B8G8R8A8_UNORM to NV12…

iamrameshkumar
- 1,328
- 1
- 14
- 34
10
votes
2 answers
Converting a Bitmap to a WebRTC VideoFrame
I'm working on a WebRTC based app for Android using the native implementation (org.webrtc:google-webrtc:1.0.24064), and I need to send a series of bitmaps along with the camera stream.
From what I understood, I can derive from…

n1xx1
- 1,971
- 20
- 26
10
votes
4 answers
camera2 api convert yuv420 to rgb green out
i trying convert image from YUV_420_888 to rgb and i have some trouble with output image. In ImageReader i get image in format YUV_420_888 (using camera 2 api for get this image preview).
imageReader =…

mr.leo
- 351
- 2
- 4
- 9
10
votes
1 answer
OnPreviewFrame data image to imageView
i'm trying to get the byte[] from the preview of the camera, convert it to bitmap and display it on a imageview with imageView.setImageBitmap()
i've managed to start the preview and display it on a surfaceView, but i don't know how to convert the…

Pitr
- 143
- 1
- 1
- 8
10
votes
1 answer
How to find out resolution and count of frames in YUV 4:2:0 file?
How to find out resolution and count of frames in YUV 4:2:0 file if i know how many pixel(luma samples) in the image?

MarkovDmitriy
- 165
- 1
- 2
- 9
10
votes
3 answers
Resize (downsize) YUV420sp image
I am trying to resize (scale down) an image which comes in YUV420sp format. Is it possible to do such image resizing without converting it into RGB, so directly manipulating the YUV420sp pixel array? Where can I find such algorithm?
Thanks

PerracoLabs
- 16,449
- 15
- 74
- 127
10
votes
2 answers
Using opengl es shader to convert YUV to RGB
I want to convert yuv to rgb in opengl es shader with just one sampler which contains yuv data. My code is below:
1) I send yuv data to texture:
GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_LUMINANCE,
mData.w, mData.h * 3 / 2,…

The Lord Of Ring
- 155
- 1
- 3
- 10
9
votes
1 answer
sws_scale YUV --> RGB distorted image
I want to convert YUV420P image (received from H.264 stream) to RGB, while also resizing it, using sws_scale.
The size of the original image is 480 × 800. Just converting with same dimensions works fine.
But when I try to change the dimensions, I…

Sami susu
- 103
- 1
- 1
- 5
9
votes
1 answer
420YpCbCr8BiPlanarVideoRange To YUV420 ?/How to copy Y and Cbcr plane to Single plane?
i have captured video using AVFoundation .i have set (video setting )and get in outputsamplebuffer kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange format. But i need YUV420 format for further processing .
My doubt is
1.difference among…

Vasu Ashok
- 1,413
- 3
- 17
- 37
9
votes
2 answers
How could I distinguish between NV21 and YV12 codification in imageReader camera API 2?
I am developing custom camera API 2 app, and I notice that the capture format conversion is different on some devices when I use ImageReader callback.
For example in Nexus 4 doesn't work fine and in Nexus5X looks OK, here is the output.
I…

uelordi
- 2,189
- 3
- 21
- 36
9
votes
1 answer
Convert yuv420p to rgb888 in C
I'm trying to convert planar YUV (yuv420p) to RGB24 in C.
I'm not controlling the input, and have the YUV data as 3 separate buffers, one for Y, one for U and one for V.
I want to create a single output RGB buffer from these 3 input buffers.
I…

Sawa-chan
- 101
- 1
- 5
9
votes
1 answer
texture for YUV420 to RGB conversion in OpenGL ES
I have to convert and display YUV420P images to RGB colorspace using the AMD GPU on a Freescale iMX53 processor (OpenGL ES 2.0, EGL). Linux OS, no X11. To achieve this I should be able to create an appropriate image holding the YUV420P data: this…

tselmeci
- 125
- 1
- 1
- 11
9
votes
3 answers
NV12 format and UV plane
i am a little confused about the NV12 format. i am looking the this page to understand the format.
What i currently understand is that if you have an image or video of 640 x 480 diminsion then the Y plane will be having 640 x 480 bytes and U and V…

Madu
- 4,849
- 9
- 44
- 78
8
votes
1 answer
camera2 How to get Exif data from YUV_420_888 image in image reader listener
I am trying to get Exif data from YUV_420_888 image but it is not working. I tried several solutions like saving image to disk as jpeg, converting it to a input stream but nothing seems to work.
I capture YUV_420_888 image using android camera2…

Shivam Pokhriyal
- 479
- 4
- 14
8
votes
4 answers
camera2 captured picture - conversion from YUV_420_888 to NV21
Via the camera2 API we are receiving an Image object of the format YUV_420_888. We are using then the following function for conversion to NV21:
private static byte[] YUV_420_888toNV21(Image image) {
byte[] nv21;
ByteBuffer yBuffer =…

Alexander Belokon
- 1,452
- 2
- 17
- 37