summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinevideowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinevideowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index 15c611f..1ac9277 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -30,48 +30,49 @@
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#include <qimage.h> 34#include <qimage.h>
35#include <qdirectpainter_qws.h> 35#include <qdirectpainter_qws.h>
36#include <qgfx_qws.h> 36#include <qgfx_qws.h>
37#include <qsize.h> 37#include <qsize.h>
38#include <qapplication.h> 38#include <qapplication.h>
39 39
40#include <qpe/resource.h> 40#include <qpe/resource.h>
41 41
42#include "xinevideowidget.h" 42#include "xinevideowidget.h"
43 43
44 44
45// 0 deg rot: copy a line from src to dst (use libc memcpy) 45// 0 deg rot: copy a line from src to dst (use libc memcpy)
46 46
47// 180 deg rot: copy a line from src to dst reversed 47// 180 deg rot: copy a line from src to dst reversed
48 48
49/* 49/*
50 * This code relies the len be a multiply of 16bit 50 * This code relies the len be a multiply of 16bit
51 */ 51 */
52static inline void memcpy_rev ( void *_dst, void *_src, size_t len ) 52static inline void memcpy_rev ( void *_dst, void *_src, size_t len )
53{ 53{
54
54 /* 55 /*
55 * move the source to the end 56 * move the source to the end
56 */ 57 */
57 char *src_c = static_cast<char*>(_src) + len; 58 char *src_c = static_cast<char*>(_src) + len;
58 59
59 /* 60 /*
60 * as we copy by 16bit and not 8bit 61 * as we copy by 16bit and not 8bit
61 * devide the length by two 62 * devide the length by two
62 */ 63 */
63 len >>= 1; 64 len >>= 1;
64 65
65 short int* dst = static_cast<short int*>( _dst ); 66 short int* dst = static_cast<short int*>( _dst );
66 short int* src = reinterpret_cast<short int*>( src_c ); 67 short int* src = reinterpret_cast<short int*>( src_c );
67 68
68 /* 69 /*
69 * Increment dst after assigning 70 * Increment dst after assigning
70 * Decrement src before assigning becase we move backwards 71 * Decrement src before assigning becase we move backwards
71 */ 72 */
72 while ( len-- ) 73 while ( len-- )
73 *dst++ = *--src; 74 *dst++ = *--src;
74 75
75} 76}
76 77
77// 90 deg rot: copy a column from src to dst 78// 90 deg rot: copy a column from src to dst