mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 17:46:50 +08:00
[legacy]: vframe add vui info
Change-Id: I595e90cd46412a37440b9555f93fb8fa46d9d6dd Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com> Signed-off-by: Hery Xu <hery.xu@rock-chips.com>
This commit is contained in:
@@ -140,7 +140,22 @@ typedef struct tVPU_FRAME {
|
|||||||
RK_U32 employ_cnt;
|
RK_U32 employ_cnt;
|
||||||
VPUMemLinear_t vpumem;
|
VPUMemLinear_t vpumem;
|
||||||
struct tVPU_FRAME *next_frame;
|
struct tVPU_FRAME *next_frame;
|
||||||
RK_U32 Res[4];
|
union {
|
||||||
|
struct {
|
||||||
|
RK_U32 Res0[2];
|
||||||
|
struct {
|
||||||
|
RK_U32 ColorPrimaries : 8;
|
||||||
|
RK_U32 ColorTransfer : 8;
|
||||||
|
RK_U32 ColorCoeffs : 8;
|
||||||
|
RK_U32 ColorRange : 1;
|
||||||
|
RK_U32 Res1 : 7;
|
||||||
|
};
|
||||||
|
|
||||||
|
RK_U32 Res2;
|
||||||
|
};
|
||||||
|
|
||||||
|
RK_U32 Res[4];
|
||||||
|
};
|
||||||
} VPU_FRAME;
|
} VPU_FRAME;
|
||||||
|
|
||||||
typedef struct VideoPacket {
|
typedef struct VideoPacket {
|
||||||
|
@@ -1167,6 +1167,10 @@ static RK_S32 decode_vui(HEVCContext *s, HEVCSPS *sps)
|
|||||||
|
|
||||||
h265d_dbg(H265D_DBG_FUNCTION, "Decoding VUI\n");
|
h265d_dbg(H265D_DBG_FUNCTION, "Decoding VUI\n");
|
||||||
|
|
||||||
|
vui->colour_primaries = MPP_FRAME_PRI_UNSPECIFIED;
|
||||||
|
vui->transfer_characteristic = MPP_FRAME_TRC_UNSPECIFIED;
|
||||||
|
vui->matrix_coeffs = MPP_FRAME_SPC_UNSPECIFIED;
|
||||||
|
|
||||||
READ_ONEBIT(gb, &sar_present);
|
READ_ONEBIT(gb, &sar_present);
|
||||||
if (sar_present) {
|
if (sar_present) {
|
||||||
RK_U8 sar_idx = 0;
|
RK_U8 sar_idx = 0;
|
||||||
|
@@ -463,8 +463,11 @@ static void setup_VPU_FRAME_from_mpp_frame(VPU_FRAME *vframe, MppFrame mframe)
|
|||||||
MppBuffer buf = mpp_frame_get_buffer(mframe);
|
MppBuffer buf = mpp_frame_get_buffer(mframe);
|
||||||
RK_U64 pts = mpp_frame_get_pts(mframe);
|
RK_U64 pts = mpp_frame_get_pts(mframe);
|
||||||
RK_U32 mode = mpp_frame_get_mode(mframe);
|
RK_U32 mode = mpp_frame_get_mode(mframe);
|
||||||
|
|
||||||
|
MppFrameColorRange colorRan = mpp_frame_get_color_range(mframe);
|
||||||
MppFrameColorTransferCharacteristic colorTrc = mpp_frame_get_color_trc(mframe);
|
MppFrameColorTransferCharacteristic colorTrc = mpp_frame_get_color_trc(mframe);
|
||||||
MppFrameColorPrimaries colorPri = mpp_frame_get_color_primaries(mframe);
|
MppFrameColorPrimaries colorPri = mpp_frame_get_color_primaries(mframe);
|
||||||
|
MppFrameColorSpace colorSpa = mpp_frame_get_colorspace(mframe);
|
||||||
|
|
||||||
if (buf)
|
if (buf)
|
||||||
mpp_buffer_inc_ref(buf);
|
mpp_buffer_inc_ref(buf);
|
||||||
@@ -473,6 +476,12 @@ static void setup_VPU_FRAME_from_mpp_frame(VPU_FRAME *vframe, MppFrame mframe)
|
|||||||
vframe->DisplayHeight = mpp_frame_get_height(mframe);
|
vframe->DisplayHeight = mpp_frame_get_height(mframe);
|
||||||
vframe->FrameWidth = mpp_frame_get_hor_stride(mframe);
|
vframe->FrameWidth = mpp_frame_get_hor_stride(mframe);
|
||||||
vframe->FrameHeight = mpp_frame_get_ver_stride(mframe);
|
vframe->FrameHeight = mpp_frame_get_ver_stride(mframe);
|
||||||
|
|
||||||
|
vframe->ColorRange = (colorRan == MPP_FRAME_RANGE_JPEG);
|
||||||
|
vframe->ColorPrimaries = colorPri;
|
||||||
|
vframe->ColorTransfer = colorTrc;
|
||||||
|
vframe->ColorCoeffs = colorSpa;
|
||||||
|
|
||||||
if (mode == MPP_FRAME_FLAG_FRAME)
|
if (mode == MPP_FRAME_FLAG_FRAME)
|
||||||
vframe->FrameType = 0;
|
vframe->FrameType = 0;
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user