23 #include <X11/extensions/XvMC.h>
69 cbp <<= 12-mb_block_count;
70 for (i = 0; i < mb_block_count; i++) {
100 "Render token doesn't look as expected.\n");
106 "Rendering surface contains %i unprocessed blocks.\n",
117 "Rendering surface doesn't provide enough block structures to work with.\n");
173 XvMCMacroBlock *mv_block;
175 int i, cbp, blocks_per_mb;
210 mv_block->x = s->
mb_x;
211 mv_block->y = s->
mb_y;
214 mv_block->macroblock_type = XVMC_MB_TYPE_INTRA;
216 mv_block->macroblock_type = XVMC_MB_TYPE_PATTERN;
219 mv_block->macroblock_type |= XVMC_MB_TYPE_MOTION_FORWARD;
221 mv_block->PMV[0][0][0] = s->
mv[0][0][0];
222 mv_block->PMV[0][0][1] = s->
mv[0][0][1];
223 mv_block->PMV[1][0][0] = s->
mv[0][1][0];
224 mv_block->PMV[1][0][1] = s->
mv[0][1][1];
227 mv_block->macroblock_type |= XVMC_MB_TYPE_MOTION_BACKWARD;
228 mv_block->PMV[0][1][0] = s->
mv[1][0][0];
229 mv_block->PMV[0][1][1] = s->
mv[1][0][1];
230 mv_block->PMV[1][1][0] = s->
mv[1][1][0];
231 mv_block->PMV[1][1][1] = s->
mv[1][1][1];
236 mv_block->motion_type = XVMC_PREDICTION_FRAME;
239 mv_block->motion_type = XVMC_PREDICTION_16x8;
242 mv_block->motion_type = XVMC_PREDICTION_FIELD;
244 mv_block->PMV[0][0][1] <<= 1;
245 mv_block->PMV[1][0][1] <<= 1;
246 mv_block->PMV[0][1][1] <<= 1;
247 mv_block->PMV[1][1][1] <<= 1;
251 mv_block->motion_type = XVMC_PREDICTION_DUAL_PRIME;
254 mv_block->PMV[0][0][0] = s->
mv[0][0][0];
255 mv_block->PMV[0][0][1] = s->
mv[0][0][1] << 1;
257 mv_block->PMV[0][1][0] = s->
mv[0][0][0];
258 mv_block->PMV[0][1][1] = s->
mv[0][0][1] << 1;
260 mv_block->PMV[1][0][0] = s->
mv[0][2][0];
261 mv_block->PMV[1][0][1] = s->
mv[0][2][1] << 1;
263 mv_block->PMV[1][1][0] = s->
mv[0][3][0];
264 mv_block->PMV[1][1][1] = s->
mv[0][3][1] << 1;
267 mv_block->PMV[0][1][0] = s->
mv[0][2][0];
268 mv_block->PMV[0][1][1] = s->
mv[0][2][1];
275 mv_block->motion_vertical_field_select = 0;
279 mv_block->motion_vertical_field_select |= s->
field_select[0][0];
280 mv_block->motion_vertical_field_select |= s->
field_select[1][0] << 1;
281 mv_block->motion_vertical_field_select |= s->
field_select[0][1] << 2;
282 mv_block->motion_vertical_field_select |= s->
field_select[1][1] << 3;
295 for (i = 0; i < blocks_per_mb; i++) {
303 for (i = 4; i < blocks_per_mb; i++) {
309 cbp &= 0xf << (blocks_per_mb - 4);
313 mv_block->coded_block_pattern = cbp;
315 mv_block->macroblock_type &= ~XVMC_MB_TYPE_PATTERN;
317 for (i = 0; i < blocks_per_mb; i++) {
350 #if CONFIG_MPEG1_XVMC_HWACCEL
352 .
name =
"mpeg1_xvmc",
358 .decode_slice =
NULL,
364 #if CONFIG_MPEG2_XVMC_HWACCEL
366 .
name =
"mpeg2_xvmc",
372 .decode_slice =
NULL,