Lines Matching refs:len
290 int len, r;
300 len = 0;
302 len += sizeof(vce_session) / 4;
303 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
304 len += sizeof(vce_taskinfo) / 4;
305 memcpy((ib_cpu + len), vce_create, sizeof(vce_create));
306 ib_cpu[len + 8] = ALIGN(enc.width, align);
307 ib_cpu[len + 9] = ALIGN(enc.width, align);
310 ib_cpu[len + 11] = 0x01000001;
312 ib_cpu[len + 11] = 0x01000201;
314 len += sizeof(vce_create) / 4;
315 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback));
316 ib_cpu[len + 2] = enc.fb[0].addr >> 32;
317 ib_cpu[len + 3] = enc.fb[0].addr;
318 len += sizeof(vce_feedback) / 4;
320 r = submit(len, AMDGPU_HW_IP_VCE);
328 int len = 0, r;
330 memcpy((ib_cpu + len), vce_session, sizeof(vce_session));
331 len += sizeof(vce_session) / 4;
332 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
333 ib_cpu[len + 3] = 2;
334 ib_cpu[len + 6] = 0xffffffff;
335 len += sizeof(vce_taskinfo) / 4;
336 memcpy((ib_cpu + len), vce_rate_ctrl, sizeof(vce_rate_ctrl));
337 len += sizeof(vce_rate_ctrl) / 4;
338 memcpy((ib_cpu + len), vce_config_ext, sizeof(vce_config_ext));
339 len += sizeof(vce_config_ext) / 4;
340 memcpy((ib_cpu + len), vce_motion_est, sizeof(vce_motion_est));
341 len += sizeof(vce_motion_est) / 4;
342 memcpy((ib_cpu + len), vce_rdo, sizeof(vce_rdo));
343 len += sizeof(vce_rdo) / 4;
344 memcpy((ib_cpu + len), vce_pic_ctrl, sizeof(vce_pic_ctrl));
346 ib_cpu[len + 27] = 0x00000001; /* encSliceMode */
347 len += sizeof(vce_pic_ctrl) / 4;
349 r = submit(len, AMDGPU_HW_IP_VCE);
359 int len = 0, i, r;
364 memcpy((ib_cpu + len), vce_session, sizeof(vce_session));
365 len += sizeof(vce_session) / 4;
366 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
367 len += sizeof(vce_taskinfo) / 4;
368 memcpy((ib_cpu + len), vce_bs_buffer, sizeof(vce_bs_buffer));
369 ib_cpu[len + 2] = enc->bs[0].addr >> 32;
370 ib_cpu[len + 3] = enc->bs[0].addr;
371 len += sizeof(vce_bs_buffer) / 4;
372 memcpy((ib_cpu + len), vce_context_buffer, sizeof(vce_context_buffer));
373 ib_cpu[len + 2] = enc->cpb.addr >> 32;
374 ib_cpu[len + 3] = enc->cpb.addr;
375 len += sizeof(vce_context_buffer) / 4;
376 memcpy((ib_cpu + len), vce_aux_buffer, sizeof(vce_aux_buffer));
378 ib_cpu[len + 2 + i] = luma_size * 1.5 * (i + 2);
380 ib_cpu[len + 10 + i] = luma_size * 1.5;
381 len += sizeof(vce_aux_buffer) / 4;
382 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback));
383 ib_cpu[len + 2] = enc->fb[0].addr >> 32;
384 ib_cpu[len + 3] = enc->fb[0].addr;
385 len += sizeof(vce_feedback) / 4;
386 memcpy((ib_cpu + len), vce_encode, sizeof(vce_encode));
387 ib_cpu[len + 9] = luma_offset >> 32;
388 ib_cpu[len + 10] = luma_offset;
389 ib_cpu[len + 11] = chroma_offset >> 32;
390 ib_cpu[len + 12] = chroma_offset;
391 ib_cpu[len + 14] = ALIGN(enc->width, align);
392 ib_cpu[len + 15] = ALIGN(enc->width, align);
393 ib_cpu[len + 73] = luma_size * 1.5;
394 ib_cpu[len + 74] = luma_size * 2.5;
395 len += sizeof(vce_encode) / 4;
396 enc->ib_len = len;
398 r = submit(len, AMDGPU_HW_IP_VCE);
406 int len, i, r;
410 len = (enc->two_instance) ? enc->ib_len : 0;
415 memcpy((ib_cpu + len), vce_session, sizeof(vce_session));
416 len += sizeof(vce_session) / 4;
418 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
419 len += sizeof(vce_taskinfo) / 4;
420 memcpy((ib_cpu + len), vce_bs_buffer, sizeof(vce_bs_buffer));
421 ib_cpu[len + 2] = enc->bs[1].addr >> 32;
422 ib_cpu[len + 3] = enc->bs[1].addr;
423 len += sizeof(vce_bs_buffer) / 4;
424 memcpy((ib_cpu + len), vce_context_buffer, sizeof(vce_context_buffer));
425 ib_cpu[len + 2] = enc->cpb.addr >> 32;
426 ib_cpu[len + 3] = enc->cpb.addr;
427 len += sizeof(vce_context_buffer) / 4;
428 memcpy((ib_cpu + len), vce_aux_buffer, sizeof(vce_aux_buffer));
430 ib_cpu[len + 2 + i] = luma_size * 1.5 * (i + 2);
432 ib_cpu[len + 10 + i] = luma_size * 1.5;
433 len += sizeof(vce_aux_buffer) / 4;
434 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback));
435 ib_cpu[len + 2] = enc->fb[1].addr >> 32;
436 ib_cpu[len + 3] = enc->fb[1].addr;
437 len += sizeof(vce_feedback) / 4;
438 memcpy((ib_cpu + len), vce_encode, sizeof(vce_encode));
439 ib_cpu[len + 2] = 0;
440 ib_cpu[len + 9] = luma_offset >> 32;
441 ib_cpu[len + 10] = luma_offset;
442 ib_cpu[len + 11] = chroma_offset >> 32;
443 ib_cpu[len + 12] = chroma_offset;
444 ib_cpu[len + 14] = ALIGN(enc->width, align);
445 ib_cpu[len + 15] = ALIGN(enc->width, align);
446 ib_cpu[len + 18] = 0;
447 ib_cpu[len + 19] = 0;
448 ib_cpu[len + 56] = 3;
449 ib_cpu[len + 57] = 0;
450 ib_cpu[len + 58] = 0;
451 ib_cpu[len + 59] = luma_size * 1.5;
452 ib_cpu[len + 60] = luma_size * 2.5;
453 ib_cpu[len + 73] = 0;
454 ib_cpu[len + 74] = luma_size;
455 ib_cpu[len + 81] = 1;
456 ib_cpu[len + 82] = 1;
457 len += sizeof(vce_encode) / 4;
459 r = submit(len, AMDGPU_HW_IP_VCE);
573 int len = 0, i, r;
579 memcpy((ib_cpu + len), vce_session, sizeof(vce_session));
580 len += sizeof(vce_session) / 4;
581 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
582 len += sizeof(vce_taskinfo) / 4;
583 memcpy((ib_cpu + len), vce_bs_buffer, sizeof(vce_bs_buffer));
584 ib_cpu[len + 2] = enc->bs[0].addr >> 32;
585 ib_cpu[len + 3] = enc->bs[0].addr;
586 len += sizeof(vce_bs_buffer) / 4;
587 memcpy((ib_cpu + len), vce_context_buffer, sizeof(vce_context_buffer));
588 ib_cpu[len + 2] = enc->cpb.addr >> 32;
589 ib_cpu[len + 3] = enc->cpb.addr;
590 len += sizeof(vce_context_buffer) / 4;
591 memcpy((ib_cpu + len), vce_aux_buffer, sizeof(vce_aux_buffer));
593 ib_cpu[len + 2 + i] = luma_size * 1.5 * (i + 2);
595 ib_cpu[len + 10 + i] = luma_size * 1.5;
596 len += sizeof(vce_aux_buffer) / 4;
597 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback));
598 ib_cpu[len + 2] = enc->fb[0].addr >> 32;
599 ib_cpu[len + 3] = enc->fb[0].addr;
600 len += sizeof(vce_feedback) / 4;
601 memcpy((ib_cpu + len), vce_mv_buffer, sizeof(vce_mv_buffer));
602 ib_cpu[len + 2] = mv_ref_luma_offset >> 32;
603 ib_cpu[len + 3] = mv_ref_luma_offset;
604 ib_cpu[len + 4] = ALIGN(enc->width, align);
605 ib_cpu[len + 5] = ALIGN(enc->width, align);
606 ib_cpu[len + 6] = luma_size;
607 ib_cpu[len + 7] = enc->mvb.addr >> 32;
608 ib_cpu[len + 8] = enc->mvb.addr;
609 len += sizeof(vce_mv_buffer) / 4;
610 memcpy((ib_cpu + len), vce_encode, sizeof(vce_encode));
611 ib_cpu[len + 2] = 0;
612 ib_cpu[len + 3] = 0;
613 ib_cpu[len + 4] = 0x154000;
614 ib_cpu[len + 9] = luma_offset >> 32;
615 ib_cpu[len + 10] = luma_offset;
616 ib_cpu[len + 11] = chroma_offset >> 32;
617 ib_cpu[len + 12] = chroma_offset;
618 ib_cpu[len + 13] = ALIGN(enc->height, 16);;
619 ib_cpu[len + 14] = ALIGN(enc->width, align);
620 ib_cpu[len + 15] = ALIGN(enc->width, align);
622 ib_cpu[len + 16] = 0x01010000;
623 ib_cpu[len + 18] = 0; /* encPicType */
624 ib_cpu[len + 19] = 0; /* encIdrFlag */
625 ib_cpu[len + 20] = 0; /* encIdrPicId */
626 ib_cpu[len + 21] = 0; /* encMGSKeyPic */
627 ib_cpu[len + 22] = 0; /* encReferenceFlag */
628 ib_cpu[len + 23] = 0; /* encTemporalLayerIndex */
629 ib_cpu[len + 55] = 0; /* pictureStructure */
630 ib_cpu[len + 56] = 0; /* encPicType -ref[0] */
631 ib_cpu[len + 61] = 0; /* pictureStructure */
632 ib_cpu[len + 62] = 0; /* encPicType -ref[1] */
633 ib_cpu[len + 67] = 0; /* pictureStructure */
634 ib_cpu[len + 68] = 0; /* encPicType -ref1 */
635 ib_cpu[len + 81] = 1; /* frameNumber */
636 ib_cpu[len + 82] = 2; /* pictureOrderCount */
637 ib_cpu[len + 83] = 0xffffffff; /* numIPicRemainInRCGOP */
638 ib_cpu[len + 84] = 0xffffffff; /* numPPicRemainInRCGOP */
639 ib_cpu[len + 85] = 0xffffffff; /* numBPicRemainInRCGOP */
640 ib_cpu[len + 86] = 0xffffffff; /* numIRPicRemainInRCGOP */
641 ib_cpu[len + 87] = 0; /* remainedIntraRefreshPictures */
642 len += sizeof(vce_encode) / 4;
644 enc->ib_len = len;
645 r = submit(len, AMDGPU_HW_IP_VCE);
741 int len, r;
748 len = 0;
750 len += sizeof(vce_session) / 4;
751 memcpy((ib_cpu + len), vce_taskinfo, sizeof(vce_taskinfo));
752 ib_cpu[len + 3] = 1;
753 len += sizeof(vce_taskinfo) / 4;
754 memcpy((ib_cpu + len), vce_feedback, sizeof(vce_feedback));
755 ib_cpu[len + 2] = enc.fb[0].addr >> 32;
756 ib_cpu[len + 3] = enc.fb[0].addr;
757 len += sizeof(vce_feedback) / 4;
758 memcpy((ib_cpu + len), vce_destroy, sizeof(vce_destroy));
759 len += sizeof(vce_destroy) / 4;
761 r = submit(len, AMDGPU_HW_IP_VCE);