JeffyCN / rockchip_mirrors

Mirrors of a few Rockchip BSP repositories, some others in https://github.com/JeffyCN/mirrors.
Other
19 stars 4 forks source link

How to get mpp wstride and hstride value? #55

Open IYJRV opened 11 hours ago

IYJRV commented 11 hours ago

I encountered this issue while developing: the data output by the mppvideodec decoder was aligned. However, during the color conversion, this alignment would affect the display effects (such as appearing with a green border or screen tearing), especially when dealing with H265-encoded videos(It seems that the alignment of H265-encoded video data is more complicated). Therefore, a trimming operation is needed, but trimming requires knowledge of the wstride and hstride. In MPP, the interface for obtaining the horizontal stride is: RK_U32 h_stride = mpp_frame_get_hor_stride(mppFrame); RK_U32 v_stride = mpp_frame_get_ver_stride(mppFrame); However, when using the mppvideodec plugin of gstreamer, it seems that we cannot obtain these two values. I would like to ask if there is any related interface to obtain these two values? Or are there other ways to use RGA to trim the images without these two values?

JeffyCN commented 9 hours ago

the strides and offsets are stores in the gst video info: https://github.com/JeffyCN/rockchip_mirrors/blob/gstreamer-rockchip/gst/rockchipmpp/gstmpp.h#L49