radeon/vce: implement non-referenced frames
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
@@ -231,11 +231,13 @@ static void rvce_end_frame(struct pipe_video_codec *encoder,
|
|||||||
flush(enc);
|
flush(enc);
|
||||||
|
|
||||||
/* update the CPB backtrack with the just encoded frame */
|
/* update the CPB backtrack with the just encoded frame */
|
||||||
LIST_DEL(&slot->list);
|
|
||||||
slot->picture_type = enc->pic.picture_type;
|
slot->picture_type = enc->pic.picture_type;
|
||||||
slot->frame_num = enc->pic.frame_num;
|
slot->frame_num = enc->pic.frame_num;
|
||||||
slot->pic_order_cnt = enc->pic.pic_order_cnt;
|
slot->pic_order_cnt = enc->pic.pic_order_cnt;
|
||||||
LIST_ADD(&slot->list, &enc->cpb_slots);
|
if (!enc->pic.not_referenced) {
|
||||||
|
LIST_DEL(&slot->list);
|
||||||
|
LIST_ADD(&slot->list, &enc->cpb_slots);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rvce_get_feedback(struct pipe_video_codec *encoder,
|
static void rvce_get_feedback(struct pipe_video_codec *encoder,
|
||||||
|
@@ -283,7 +283,7 @@ static void encode(struct rvce_encoder *enc)
|
|||||||
RVCE_CS(enc->pic.picture_type == PIPE_H264_ENC_PICTURE_TYPE_IDR); // encIdrFlag
|
RVCE_CS(enc->pic.picture_type == PIPE_H264_ENC_PICTURE_TYPE_IDR); // encIdrFlag
|
||||||
RVCE_CS(0x00000000); // encIdrPicId
|
RVCE_CS(0x00000000); // encIdrPicId
|
||||||
RVCE_CS(0x00000000); // encMGSKeyPic
|
RVCE_CS(0x00000000); // encMGSKeyPic
|
||||||
RVCE_CS(0x00000001); // encReferenceFlag
|
RVCE_CS(!enc->pic.not_referenced); // encReferenceFlag
|
||||||
RVCE_CS(0x00000000); // encTemporalLayerIndex
|
RVCE_CS(0x00000000); // encTemporalLayerIndex
|
||||||
RVCE_CS(0x00000000); // num_ref_idx_active_override_flag
|
RVCE_CS(0x00000000); // num_ref_idx_active_override_flag
|
||||||
RVCE_CS(0x00000000); // num_ref_idx_l0_active_minus1
|
RVCE_CS(0x00000000); // num_ref_idx_l0_active_minus1
|
||||||
|
Reference in New Issue
Block a user