Page 1 of 1

Encoder resolution change breaks H264 encoder

Posted: 2025-02-02 14:31
by 14Og
Hi! I've encountered a weird situation with media libraries recently, after syncing with upstream luckfox-pico-sdk.
I'm using vi-venc pipeline that is based on examples you provide. Everything works fine, i send encoded video via network and can watch it using ffplay. The problem is when i change video resolution of vi and venc, encoder stop working correctly and i'm receiving broken h.264 frames that can be barely decoded.
The thing is this behaviour is kinda undefined:
in case when i start pipeline with 640x480 resolution first, and then switch to any other resolutions (like 1280x720 or 1920x1080), encoder starts behaving weirdly with any resolution except 640x480. I have warning messages in my console:

Code: Select all

h264e_pps_update:95: warning: for profile 77 transform_8x8_mode s
hould be 0
but in case where i start pipeline with 1920x1080 resolution and then switch to any another (sd or hd), everything works fine, even though the same code is executing at my side.
Is it a bug or i have to pay some more attention to pipeline configuration? Thank you!

Re: Encoder resolution change breaks H264 encoder

Posted: 2025-02-05 2:30
by Crocodile
Hello, the input resolution of the camera may be affected by RKISP, in general, it is recommended to use the highest resolution supported by the camera on vi, and then output to the venc module after scaling on the vpss module, it is recommended to attach the relevant source code so that we can understand the effect you want to achieve