Revision bf4a90fc

View differences:

libswscale/internal_bfin.S
452 452
        unlink;
453 453
        rts;
454 454
DEFUN_END(yuv2rgb888_line)
455

  
456

  
457

  
458
#define ARG_vdst        20
459
#define ARG_width       24
460
#define ARG_height      28
461
#define ARG_lumStride   32
462
#define ARG_chromStride 36
463
#define ARG_srcStride   40
464

  
465
DEFUN(uyvytoyv12, mL3,  (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
466
                         long width, long height,
467
                         long lumStride, long chromStride, long srcStride)):
468
        link 0;
469
        [--sp] = (r7:4,p5:4);
470

  
471
        p0 = r1;       // Y top even
472

  
473
        i2 = r2; // *u
474
        r2 = [fp + ARG_vdst];
475
        i3 = r2; // *v
476

  
477
        r1 = [fp + ARG_srcStride];
478
        r2 = r0 + r1;
479
        r1 += -16;
480
        m0 = r1;
481

  
482
        i0 = r0;  // uyvy_T even
483
        i1 = r2;  // uyvy_B odd
484

  
485
        r2 = [fp + ARG_chromStride];
486
        m1 = r2;
487

  
488
        p2 = [fp + ARG_lumStride];
489
        p1 = p0 + p2;  // Y bot odd
490
        p2 += -4;
491

  
492
        p5 = [fp + ARG_width];
493
        p4 = [fp + ARG_height];
494
        p4 = p4 >> 1;
495
        p5 = p5 >> 2;
496

  
497
        r6.l = w[i2--];  r6.l = w[i2];
498
        r6.h = w[i3--];  r6.h = w[i3];
499
        /*   I0,I1 - src input line pointers
500
         *   p0,p1 - luma output line pointers
501
         *   I2    - dstU
502
         *   I3    - dstV
503
         */
504

  
505
        lsetup (0f, 1f) lc0 = p4;
506

  
507
0:        lsetup (2f, 3f) lc1 = p5;
508
            r0 = [i0++] || r2 = [i1++];
509
            r1 = [i0++] || r3 = [i1++];
510
2:          r4 = byteop1p(r1:0, r3:2)     ||   w[i2++] = r6.l;
511
            r5 = byteop1p(r1:0, r3:2) (r) ||   w[i3++] = r6.h;
512
            r0 = r0 >> 8(v);
513
            r1 = r1 >> 8(v);
514
            r2 = r2 >> 8(v);
515
            r3 = r3 >> 8(v);
516
            r0 = bytepack(r0, r1);
517
            r2 = bytepack(r2, r3)         ||  [p0++] = r0;
518
            r6 = pack(r5.l, r4.l)         ||  [p1++] = r2;
519
            r7 = pack(r5.h, r4.h)         ||  r0 = [i0++]   || r2 = [i1++];
520
3:          r6 = bytepack(r6, r7)         ||  r1 = [i0++]   || r3 = [i1++];
521

  
522
          i0 += m0;
523
          i1 += m0;
524
          p0 = p0 + p2;
525
1:        p1 = p1 + p2;
526

  
527
        w[i2++] = r6.l;
528
        w[i3++] = r6.h;
529

  
530
        (r7:4,p5:4) = [sp++];
531
        unlink;
532
        rts;
533
DEFUN_END(uyvytoyv12)

Also available in: Unified diff