#define FW_52_8_3 ((52 << 24) | (8 << 16) | (3 << 8))
#define FW_53 (53 << 24)
+/* version specific function for getting parameters */
+static void (*get_pic_param)(struct rvce_encoder *enc,
+ struct pipe_h264_enc_picture_desc *pic) = NULL;
+
/**
* flush commands to the hardware
*/
{
unsigned i;
- LIST_INITHEAD(&enc->cpb_slots);
+ list_inithead(&enc->cpb_slots);
for (i = 0; i < enc->cpb_num; ++i) {
struct rvce_cpb_slot *slot = &enc->cpb_array[i];
slot->index = i;
slot->picture_type = PIPE_H264_ENC_PICTURE_TYPE_SKIP;
slot->frame_num = 0;
slot->pic_order_cnt = 0;
- LIST_ADDTAIL(&slot->list, &enc->cpb_slots);
+ list_addtail(&slot->list, &enc->cpb_slots);
}
}
}
if (l1) {
- LIST_DEL(&l1->list);
- LIST_ADD(&l1->list, &enc->cpb_slots);
+ list_del(&l1->list);
+ list_add(&l1->list, &enc->cpb_slots);
}
if (l0) {
- LIST_DEL(&l0->list);
- LIST_ADD(&l0->list, &enc->cpb_slots);
+ list_del(&l0->list);
+ list_add(&l0->list, &enc->cpb_slots);
}
}
slot->frame_num = enc->pic.frame_num;
slot->pic_order_cnt = enc->pic.pic_order_cnt;
if (!enc->pic.not_referenced) {
- LIST_DEL(&slot->list);
- LIST_ADD(&slot->list, &enc->cpb_slots);
+ list_del(&slot->list);
+ list_add(&slot->list, &enc->cpb_slots);
}
}
if (!enc)
return NULL;
- if (rscreen->info.drm_major == 3)
- enc->use_vm = true;
- if ((rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42) ||
- rscreen->info.drm_major == 3)
+ if (rscreen->info.drm_minor >= 42)
enc->use_vui = true;
enc->base = *templ;
}
templat.buffer_format = PIPE_FORMAT_NV12;
- templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
templat.width = enc->base.width;
templat.height = enc->base.height;
templat.interlaced = false;