VPU: offset right side image

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

VPU: offset right side image

1,535 Views
BrilliantovKiri
Senior Contributor I

Hello!

I have liitle problem - image with resolution 1024x720 is good, with resolution 80x600 I see offset right side image.
I check image after IPU - it good on any resolution, I use IPU for convert input YUV422 to YUV420 and resize image.

For transfer buffer beetwen blocks (capture driver --> IPU --> VPU) I use physical addresses.

Software versions:

Linux-2.6.35.3

VPU firmware version: 1.4.41

VPU library version: 5.3.2
How can I solve this problem?
Thank you and excuse my bad english.


H264, 800x600

H264_800_600.png


H264, 1280x720

H264_1280_720.png

Labels (1)
Tags (1)
0 Kudos
16 Replies

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

Hi Kirill,

What processor are you using?

Are you using some Freescale board? If so, what?

How are you testing? Using the unit test?

Rgds

Rogerio

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

Hello, Rogerio!

I use our board with iMX538 CPU, it configured on 160 MHz.

My tests very simpe - save buffer before,  after IPU, and after VPU, also I see result video in RTP-stream, buffer before VPU havn't this problem.

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

Hi BrilliantovKirillVladimirovich,

1. Every image (static or when playing video) shows this issue? Or the problem only happens when you play a video?

2. Is it possible to reproduce the problem on a Freescale board?

3. Are you using a kernel provided by Freescale? If so, where does it come from? (e.g. Freescale BSP release x.x.x, from git.freescale.com branch xxxx)

Rgds

Rogerio

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

Hello, Rogerio!

1. Yes, I see defect on video and static JPEG.

2. I think this will be very hard.

3. Yes, I use Linux 2.6.35.3 from BSP (L2.6.35_11.09.01_ER_source_bundle.tar.gz)

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

What's the display resolution? Is it always 1280x720? I mean, in both cases, is the display resolution 1280x720?

You can check it using fbset

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

Display resolution always FullHD (1920x1080).

How linked defect and display resolution?

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

Could you please send me the procedure (step by step) to reproduce the problem?

For me it's not clear what's causing the problem and I'd like to reproduce the issue.

Rgds

Rogerio

0 Kudos

1,156 Views
BrilliantovKiri
Senior Contributor I

Hello, Rogerio!

1. Capture YUV422, resolution 1280x720.

2. Convert and resize YUV422 to YUV420 in IPU, output resolution 800x600.

2.1. ipu_lib_input_param_t.user_def_paddr[0] = v4l2 buffer address

       ipu_lib_output_param_t.user_def_paddr[0] = codec input buffer phys addres

2.2. output resolution aligned to 16

      static inline unsigned short round_size(unsigned short val,

                                        bool to_big = false)

{

    return (to_big ? (val + 15) : val) / 16 * 16;

}

3. Encode YUV420 buffer in VPU

EncOpenParam:

bitstreamBuffer 0x76a00000

bitstreamBufferSize 1638400

bitstreamFormat 2

picWidth 800

picHeight 592

frameRateInfo 65556000

bitRate 0

initialDelay 0

vbvBufferSize 0

gopSize 20

slicemode.sliceMode 0

slicemode.sliceSizeMode 0

slicemode.sliceSize 0

intraRefresh 0

sliceReport 0

mbReport 0

mbQpReport 0

rcIntraQp -1

dynamicAllocEnable 0

ringBufferEnable 0

EncStdParam.avcParam.avc_constrainedIntraPredFlag 0

EncStdParam.avcParam.avc_disableDeblk 1

EncStdParam.avcParam.avc_deblkFilterOffsetAlpha 6

EncStdParam.avcParam.avc_deblkFilterOffsetBeta 0

EncStdParam.avcParam.avc_chromaQpOffset 10

EncStdParam.avcParam.avc_audEnable 0

EncStdParam.avcParam.avc_fmoEnable 0

EncStdParam.avcParam.avc_fmoType 0

EncStdParam.avcParam.avc_fmoSliceNum 1

EncStdParam.avcParam.avc_fmoSliceSaveBufSize 32

EncParam:

enableAutoSkip 0

encLeftOffset 0

encTopOffset 0

forceIPicture 0

quantParam 10

skipPicture 0

sourceFrame 0x54ba0ea8

picStreamBufferAddr 0

picStreamBufferSize 0

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

Are you able to reproduce the problem using unit_tests? They're located at your rootfs /unit_tests.

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

I can't use it because unit_test not use IPU and work only with YUV420. This is will be not unit_test if I rewrite it for YUV422 and IPU.

>

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

In order to make tests, I suggest you to get the unit test that most approaches your application, modify it to meet your requirements and send me your results in case you still have problems. This way I can help to debug a possible problem on kernel or unit test code.

Rgds

Rogerio

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

Hello, Rogeio!

Why this is change situtation if we are use same VPU labrary?

0 Kudos

1,157 Views
rogerio_silva
NXP Employee
NXP Employee

Hi Kirill,

I'm not being able to help you because I can't see the problem on my board/system.

If you find a way to reproduce the problem on a Freescale board, use an unit test SW as base (because it will be easier for me to debug) and a clear step by step process, I can reproduce the problem and debug it. This is why I asked you to get the unit test that most approaches your application.

Rgds

Rogerio

1,157 Views
YixingKong
Senior Contributor IV

Kirill

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,
Yixing

0 Kudos

1,157 Views
BrilliantovKiri
Senior Contributor I

Hello, Yixing!

Unfortunally problem not soved because I can't found it reason.

0 Kudos

1,157 Views
YixingKong
Senior Contributor IV

Kirill

I will branch your issue into an onternal group and assign an engineer to look into it.

Regards,

Yixing

0 Kudos