X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fradeon%2Fradeon_vce_50.c;h=f4cbc9bb82b53d23623b53a1ad33143c57e3433f;hb=6c4c7b600dc2058c79f680e0caf86dd1d4524bc6;hp=a2877f809b23ed5558747908a319340e59a16606;hpb=8b94976df9996c222e5510f491fc865dae3bc412;p=mesa.git diff --git a/src/gallium/drivers/radeon/radeon_vce_50.c b/src/gallium/drivers/radeon/radeon_vce_50.c index a2877f809b2..f4cbc9bb82b 100644 --- a/src/gallium/drivers/radeon/radeon_vce_50.c +++ b/src/gallium/drivers/radeon/radeon_vce_50.c @@ -25,12 +25,6 @@ * **************************************************************************/ -/* - * Authors: - * Christian König - * - */ - #include #include "pipe/p_video_codec.h" @@ -40,7 +34,7 @@ #include "vl/vl_video_buffer.h" -#include "r600_pipe_common.h" +#include "si_pipe.h" #include "radeon_video.h" #include "radeon_vce.h" @@ -127,12 +121,12 @@ static void encode(struct rvce_encoder *enc) RVCE_CS(0x00000000); // endOfSequence RVCE_CS(0x00000000); // endOfStream RVCE_READ(enc->handle, RADEON_DOMAIN_VRAM, - enc->luma->level[0].offset); // inputPictureLumaAddressHi/Lo + enc->luma->u.legacy.level[0].offset); // inputPictureLumaAddressHi/Lo RVCE_READ(enc->handle, RADEON_DOMAIN_VRAM, - enc->chroma->level[0].offset); // inputPictureChromaAddressHi/Lo - RVCE_CS(align(enc->luma->level[0].nblk_y, 16)); // encInputFrameYPitch - RVCE_CS(enc->luma->level[0].pitch_bytes); // encInputPicLumaPitch - RVCE_CS(enc->chroma->level[0].pitch_bytes); // encInputPicChromaPitch + enc->chroma->u.legacy.level[0].offset); // inputPictureChromaAddressHi/Lo + RVCE_CS(align(enc->luma->u.legacy.level[0].nblk_y, 16)); // encInputFrameYPitch + RVCE_CS(enc->luma->u.legacy.level[0].nblk_x * enc->luma->bpe); // encInputPicLumaPitch + RVCE_CS(enc->chroma->u.legacy.level[0].nblk_x * enc->chroma->bpe); // encInputPicChromaPitch if (enc->dual_pipe) RVCE_CS(0x00000000); // encInputPic(Addr|Array)Mode,encDisable(TwoPipeMode|MBOffloading) else @@ -173,8 +167,8 @@ static void encode(struct rvce_encoder *enc) RVCE_CS(0x00000000); // pictureStructure if(enc->pic.picture_type == PIPE_H264_ENC_PICTURE_TYPE_P || enc->pic.picture_type == PIPE_H264_ENC_PICTURE_TYPE_B) { - struct rvce_cpb_slot *l0 = l0_slot(enc); - rvce_frame_offset(enc, l0, &luma_offset, &chroma_offset); + struct rvce_cpb_slot *l0 = si_l0_slot(enc); + si_vce_frame_offset(enc, l0, &luma_offset, &chroma_offset); RVCE_CS(l0->picture_type); // encPicType RVCE_CS(l0->frame_num); // frameNumber RVCE_CS(l0->pic_order_cnt); // pictureOrderCount @@ -199,8 +193,8 @@ static void encode(struct rvce_encoder *enc) // encReferencePictureL1[0] RVCE_CS(0x00000000); // pictureStructure if(enc->pic.picture_type == PIPE_H264_ENC_PICTURE_TYPE_B) { - struct rvce_cpb_slot *l1 = l1_slot(enc); - rvce_frame_offset(enc, l1, &luma_offset, &chroma_offset); + struct rvce_cpb_slot *l1 = si_l1_slot(enc); + si_vce_frame_offset(enc, l1, &luma_offset, &chroma_offset); RVCE_CS(l1->picture_type); // encPicType RVCE_CS(l1->frame_num); // frameNumber RVCE_CS(l1->pic_order_cnt); // pictureOrderCount @@ -214,7 +208,7 @@ static void encode(struct rvce_encoder *enc) RVCE_CS(0xffffffff); // chromaOffset } - rvce_frame_offset(enc, current_slot(enc), &luma_offset, &chroma_offset); + si_vce_frame_offset(enc, si_current_slot(enc), &luma_offset, &chroma_offset); RVCE_CS(luma_offset); // encReconstructedLumaOffset RVCE_CS(chroma_offset); // encReconstructedChromaOffset RVCE_CS(0x00000000); // encColocBufferOffset @@ -233,13 +227,13 @@ static void encode(struct rvce_encoder *enc) RVCE_END(); } -void radeon_vce_50_get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_desc *pic) +void si_vce_50_get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_desc *pic) { } -void radeon_vce_50_init(struct rvce_encoder *enc) +void si_vce_50_init(struct rvce_encoder *enc) { - radeon_vce_40_2_2_init(enc); + si_vce_40_2_2_init(enc); /* only the two below are different */ enc->rate_control = rate_control;