Does VFE_PIX support SRGGB10 on Linux of DragonBoard 410c?

i’m porting the imx214 camera on the Linux.

the kernel i use is as follow:

and after a lot of trial and error, i checked the screen at VRE_RDI.(bayer 10Bit)
i couldn’t see the image(dump) directly, so i could convert it to jpg using the code below.

import cv2
import numpy as np

w = 1920  #width
h = 1080  #height
bpp = 10  #bpp

blockSize = (int)(w*h*(bpp/8))  # file size

def convert_image(bayer):
    step =0
    lineCount = 0
    for x in range(0,len(bayer)):
        lineCount = lineCount + 4
        step = step + 5

        if(step >= len(bayer)):
        if(lineCount >= w):
    #conv = np.uint8(np.array(pixframe))
    conv = np.array(pixframe) #convert numpy array
    conv = conv.reshape(h,w)  #reshape
    print(conv.shape[:2]) # print resolution    
    # bayer to RGB
    src = cv2.cvtColor(conv, cv2.COLOR_BayerRG2RGB)
    # show image
    cv2.imshow("bayer10bit", src)
    # wait any key
    k = cv2.waitKey(0) & 0xFF
    # write image
    cv2.imwrite('test.jpg', src)
# load bayer image
img = np.fromfile("test.bay", np.uint8, blockSize, "")

Note that the code above is to discard the lower 2bits.

now i want to see it in VFE_PIX.
my question is whether VFE_PIX supports SRGGB10 input.
if possible, is there any document(or links) that can give a hint?
if not supported by Hardware, how should i approach it?

Thank you.

You can only use the raw interface for bayer format, not pix (hardware supports it but not software):

As per the documentation, camss driver supports only below formats for VFE:

PIX interface of VFE

Supported input formats:
YUYV/UYVY/YVYU/VYUY (packed YUV 4:2:2)

Supported output formats:
NV12/NV21 (two plane YUV 4:2:0);
NV16/NV61 (two plane YUV 4:2:2).

So RAW10 is not supported.

Hi Loic,
You mean “It supports hardware., but it’s hard to implement and use, so just use RDI”? right?
Is it correct to use OpenGLES?
i will check the link you give me.
Thank you.

Hi Mani,
i understand.
Thank you for your information.

Yes, either configure your camera to output YUV or NV12/NV16, if not possible use the RDI interface and do your image processing on the RAW bayer format, or convert it in software via gstreamer, opencv…

1 Like