how to setup camera input resolution?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to setup camera input resolution?

1,321 Views
kangmw086
Contributor III

i use I.MX6Quad.

I set the camera input resolution.(1920x1080)

I'm trying to set a different resolution the same way, but it doesn't work.(752x582)

By the way, 752x584 run.

I would like to know why the 752x582 resolution is not working.

Is it a cpu(I.MX6) problem? Or is it a gstreamer problem?

########### set sens conf

read CSI0_SENS_CONF = 0x00000A50
read CSI0_ACT_FRM_SIZE = 0x024502EF

read CSI0_SENS_FRM_SIZE = 0x024502EF

########## error log ############

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)752, height=(int)582, interlace-mode=(string)progressive, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(gst-launch-1.0:651): GStreamer-CRITICAL **: Registering meta implementation 'GstImxV4l2Meta' without init function
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data stream error.
Additional debug info:
../../../../gstreamer-1.10.4/libs/gst/base/gstbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.072086000
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

0 Kudos
5 Replies

1,048 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi

   Camera's resolution is determined by camera driver, for example, ov5640 with mipi csi-2 interface, open it's driver, drivers/media/platform/mxc/capture/ov5640_mipi.c

The following modes are supported by ov5640:

    ov5640_mode_VGA_640_480 = 0,
    ov5640_mode_QVGA_320_240 = 1,
    ov5640_mode_NTSC_720_480 = 2,
    ov5640_mode_PAL_720_576 = 3,
    ov5640_mode_720P_1280_720 = 4,
    ov5640_mode_1080P_1920_1080 = 5,
    ov5640_mode_QSXGA_2592_1944 = 6,
    ov5640_mode_QCIF_176_144 = 7,
    ov5640_mode_XGA_1024_768 = 8,

so you should ensure 752x582 resolution is supported by your camera.

Have a nice day!

BR,

weidong

0 Kudos

1,048 Views
kangmw086
Contributor III

thank you for the reply.

I use a parallel interface.

The camera uses a custom driver.

I can set the resolution directly in the driver.

for example > 1920x1080, 640x480, 800x600 ......

However, only 752x582 can not be set.

The camera is outputting 752x582.

## However, the 752x584 outputs video.

I can hardly find the issue.

regards.

0 Kudos

1,048 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to the vpu reference manual:

Encoding
• H.264
• 1/4-pel accuracy motion estimation with programmable search range up to [+/-128, +/-64]
• Search range is reconfigurable by SW
• 16x16, 16x8, 8x16 and 8x8 block sizes

vpu encoding based on the block, the mini block size is 8x8, so should align in 8 pixel

0 Kudos

1,048 Views
kangmw086
Contributor III

thank you for the reply.

Can you explain a little more detail?

thank you.

0 Kudos

1,048 Views
joanxie
NXP TechSupport
NXP TechSupport

it means your resolution needs to align in 8 pixel, that's why you can work with 584(73x8), but failed with 582

0 Kudos