}
+static int fill_vc1_picture_desc(const struct pipe_picture_desc *desc,
+ union virgl_picture_desc *vdsc)
+{
+ unsigned i;
+ struct virgl_video_buffer *vbuf;
+ struct virgl_vc1_picture_desc *vvc1 = &vdsc->vc1;
+ struct pipe_vc1_picture_desc *vc1 = (struct pipe_vc1_picture_desc *)desc;
+
+ fill_base_picture_desc(desc, &vvc1->base);
+
+ for (i = 0; i < 2; i++) {
+ vbuf = virgl_video_buffer(vc1->ref[i]);
+ vvc1->ref[i] = vbuf ? vbuf->handle : 0;
+ }
+ ITEM_SET(vvc1, vc1, picture_type);
+ ITEM_SET(vvc1, vc1, pulldown);
+ ITEM_SET(vvc1, vc1, interlace);
+ ITEM_SET(vvc1, vc1, tfcntrflag);
+ ITEM_SET(vvc1, vc1, finterpflag);
+ ITEM_SET(vvc1, vc1, psf);
+ ITEM_SET(vvc1, vc1, dquant);
+ ITEM_SET(vvc1, vc1, panscan_flag);
+ ITEM_SET(vvc1, vc1, refdist_flag);
+ ITEM_SET(vvc1, vc1, quantizer);
+ ITEM_SET(vvc1, vc1, extended_mv);
+ ITEM_SET(vvc1, vc1, extended_dmv);
+ ITEM_SET(vvc1, vc1, overlap);
+ ITEM_SET(vvc1, vc1, vstransform);
+ ITEM_SET(vvc1, vc1, loopfilter);
+ ITEM_SET(vvc1, vc1, fastuvmc);
+ ITEM_SET(vvc1, vc1, range_mapy_flag);
+ ITEM_SET(vvc1, vc1, range_mapy);
+ ITEM_SET(vvc1, vc1, range_mapuv_flag);
+ ITEM_SET(vvc1, vc1, range_mapuv);
+ ITEM_SET(vvc1, vc1, multires);
+ ITEM_SET(vvc1, vc1, syncmarker);
+ ITEM_SET(vvc1, vc1, rangered);
+ ITEM_SET(vvc1, vc1, maxbframes);
+ ITEM_SET(vvc1, vc1, deblockEnable);
+ ITEM_SET(vvc1, vc1, pquant);
+ ITEM_SET(vvc1, vc1, slice_count);
+
+ return 0;
+}
+
#undef ITEM_SET
#undef ITEM_CPY
return fill_h265_picture_desc(desc, vdsc);
case PIPE_VIDEO_FORMAT_MPEG12:
return fill_mpeg12_picture_desc(desc, vdsc);
+ case PIPE_VIDEO_FORMAT_VC1:
+ return fill_vc1_picture_desc(desc, vdsc);
default:
return -1;
}
height = align(height, VL_MACROBLOCK_HEIGHT);
break;
case PIPE_VIDEO_FORMAT_HEVC:
- case PIPE_VIDEO_FORMAT_MPEG12: /* fall through */
+ case PIPE_VIDEO_FORMAT_MPEG12:
+ case PIPE_VIDEO_FORMAT_VC1: /* fall through */
default:
break;
}
uint32_t ref[2];
};
+struct virgl_vc1_picture_desc
+{
+ struct virgl_base_picture_desc base;
+
+ uint32_t slice_count;
+ uint8_t picture_type;
+ uint8_t frame_coding_mode;
+ uint8_t postprocflag;
+ uint8_t pulldown;
+ uint8_t interlace;
+ uint8_t tfcntrflag;
+ uint8_t finterpflag;
+ uint8_t psf;
+ uint8_t dquant;
+ uint8_t panscan_flag;
+ uint8_t refdist_flag;
+ uint8_t quantizer;
+ uint8_t extended_mv;
+ uint8_t extended_dmv;
+ uint8_t overlap;
+ uint8_t vstransform;
+ uint8_t loopfilter;
+ uint8_t fastuvmc;
+ uint8_t range_mapy_flag;
+ uint8_t range_mapy;
+ uint8_t range_mapuv_flag;
+ uint8_t range_mapuv;
+ uint8_t multires;
+ uint8_t syncmarker;
+ uint8_t rangered;
+ uint8_t maxbframes;
+ uint8_t deblockEnable;
+ uint8_t pquant;
+
+ uint32_t ref[2];
+};
+
union virgl_picture_desc {
struct virgl_base_picture_desc base;
struct virgl_h264_picture_desc h264;
struct virgl_h265_picture_desc h265;
struct virgl_mpeg4_picture_desc mpeg4;
struct virgl_mpeg12_picture_desc mpeg12;
+ struct virgl_vc1_picture_desc vc1;
struct virgl_h264_enc_picture_desc h264_enc;
struct virgl_h265_enc_picture_desc h265_enc;
};