author | zecke <zecke> | 2004-03-14 18:05:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 18:05:28 (UTC) |
commit | 9e54b8bd8343af7c301da17d82596d6027e53309 (patch) (unidiff) | |
tree | 693613ff9f1a0f3415e0623e636d47ac4798da2d /core/multimedia/opieplayer/videowidget.cpp | |
parent | 98bbe5561e8e1a862e19a3d0a0d49ed90ef15b54 (diff) | |
download | opie-9e54b8bd8343af7c301da17d82596d6027e53309.zip opie-9e54b8bd8343af7c301da17d82596d6027e53309.tar.gz opie-9e54b8bd8343af7c301da17d82596d6027e53309.tar.bz2 |
OpiePlayer -> ODP
Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index d002c42..164458b 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -544,52 +544,54 @@ bool VideoWidget::playVideo() { | |||
544 | 0, 0, sw, sh, w, h, format, 0) == 0; | 544 | 0, 0, sw, sh, w, h, format, 0) == 0; |
545 | 545 | ||
546 | if ( result && mediaPlayerState->fullscreen() ) | 546 | if ( result && mediaPlayerState->fullscreen() ) |
547 | { | 547 | { |
548 | 548 | ||
549 | int rw = h, rh = w; | 549 | int rw = h, rh = w; |
550 | QImage rotatedFrame( rw, rh, bytes << 3 ); | 550 | QImage rotatedFrame( rw, rh, bytes << 3 ); |
551 | 551 | ||
552 | ushort* in = (ushort*)tempFrame.bits(); | 552 | ushort* in = (ushort*)tempFrame.bits(); |
553 | ushort* out = (ushort*)rotatedFrame.bits(); | 553 | ushort* out = (ushort*)rotatedFrame.bits(); |
554 | int spl = rotatedFrame.bytesPerLine() / bytes; | 554 | int spl = rotatedFrame.bytesPerLine() / bytes; |
555 | 555 | ||
556 | for (int x=0; x<h; x++) | 556 | for (int x=0; x<h; x++) |
557 | { | 557 | { |
558 | if ( bytes == 2 ) | 558 | if ( bytes == 2 ) |
559 | { | 559 | { |
560 | ushort* lout = out++ + (w - 1)*spl; | 560 | ushort* lout = out++ + (w - 1)*spl; |
561 | for (int y=0; y<w; y++) { | 561 | for (int y=0; y<w; y++) { |
562 | *lout=*in++; | 562 | *lout=*in++; |
563 | lout-=spl; | 563 | lout-=spl; |
564 | } | 564 | } |
565 | } | 565 | } |
566 | else | 566 | else |
567 | { | 567 | { |
568 | ulong* lout = ((ulong *)out)++ + (w - 1)*spl; | 568 | ulong* _out = (ulong *)out; |
569 | ulong* lout = _out++ + (w - 1)*spl; | ||
569 | for (int y=0; y<w; y++) | 570 | for (int y=0; y<w; y++) |
570 | { | 571 | { |
571 | *lout=*((ulong*)in)++; | 572 | ulong *_in = (ulong*)in; |
573 | *lout=*_in++; | ||
572 | lout-=spl; | 574 | lout-=spl; |
573 | } | 575 | } |
574 | } | 576 | } |
575 | } | 577 | } |
576 | 578 | ||
577 | p.drawImage( (240 - rw) / 2, (320 - rh) / 2, rotatedFrame, 0, 0, rw, rh ); | 579 | p.drawImage( (240 - rw) / 2, (320 - rh) / 2, rotatedFrame, 0, 0, rw, rh ); |
578 | } | 580 | } |
579 | #ifdef USE_DIRECT_PAINTER | 581 | #ifdef USE_DIRECT_PAINTER |
580 | } | 582 | } |
581 | #endif | 583 | #endif |
582 | } | 584 | } |
583 | else | 585 | else |
584 | { | 586 | { |
585 | 587 | ||
586 | w = 220; | 588 | w = 220; |
587 | h = 160; | 589 | h = 160; |
588 | 590 | ||
589 | // maintain aspect ratio | 591 | // maintain aspect ratio |
590 | if ( w * sh > sw * h ) | 592 | if ( w * sh > sw * h ) |
591 | w = sw * h / sh; | 593 | w = sw * h / sh; |
592 | else | 594 | else |
593 | h = sh * w / sw; | 595 | h = sh * w / sw; |
594 | 596 | ||
595 | result = mediaPlayerState->curDecoder()->videoReadScaledFrame( currentFrame->jumpTable(), 0, 0, sw, sh, w, h, format, 0) == 0; | 597 | result = mediaPlayerState->curDecoder()->videoReadScaledFrame( currentFrame->jumpTable(), 0, 0, sw, sh, w, h, format, 0) == 0; |