Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
parent
686ac45321
commit
1857981b8c
@ -0,0 +1,82 @@
|
||||
############################################
|
||||
# #
|
||||
# Improvements and feedbacks are welcome #
|
||||
# #
|
||||
# This file is released under GPL >= 3 #
|
||||
# #
|
||||
############################################
|
||||
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
|
||||
|
||||
#### general package setup
|
||||
|
||||
project( gwenview )
|
||||
|
||||
|
||||
#### include essential cmake modules
|
||||
|
||||
include( FindPkgConfig )
|
||||
include( CheckSymbolExists )
|
||||
include( CheckIncludeFile )
|
||||
include( CheckLibraryExists )
|
||||
include( CheckCSourceCompiles )
|
||||
include( CheckCXXSourceCompiles )
|
||||
enable_testing()
|
||||
|
||||
|
||||
#### include our cmake modules
|
||||
|
||||
include( TDEMacros )
|
||||
|
||||
|
||||
##### set version number ########################
|
||||
|
||||
tde_set_project_version( )
|
||||
|
||||
|
||||
##### setup install paths
|
||||
|
||||
include( TDESetupPaths )
|
||||
tde_setup_paths( )
|
||||
|
||||
|
||||
##### optional stuff
|
||||
|
||||
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
||||
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
|
||||
|
||||
|
||||
##### user requested modules
|
||||
|
||||
option( BUILD_ALL "Build all" ON )
|
||||
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
||||
|
||||
|
||||
##### configure checks
|
||||
|
||||
include( ConfigureChecks.cmake )
|
||||
|
||||
|
||||
###### global compiler settings
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
|
||||
|
||||
##### directories
|
||||
|
||||
add_subdirectory( icons )
|
||||
add_subdirectory( src )
|
||||
|
||||
|
||||
##### other data ################################
|
||||
|
||||
tde_conditional_add_project_docs( BUILD_DOC )
|
||||
|
||||
|
||||
##### write configure files
|
||||
|
||||
configure_file( config.h.cmake config.h @ONLY )
|
@ -0,0 +1,93 @@
|
||||
###########################################
|
||||
# #
|
||||
# Improvements and feedback are welcome #
|
||||
# #
|
||||
# This file is released under GPL >= 3 #
|
||||
# #
|
||||
###########################################
|
||||
|
||||
|
||||
# required stuff
|
||||
find_package( TQt )
|
||||
find_package( TDE )
|
||||
|
||||
tde_setup_architecture_flags( )
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
|
||||
tde_setup_largefiles( )
|
||||
|
||||
|
||||
##### check for gcc visibility support
|
||||
|
||||
if( WITH_GCC_VISIBILITY )
|
||||
tde_setup_gcc_visibility( )
|
||||
endif( WITH_GCC_VISIBILITY )
|
||||
|
||||
|
||||
##### check for libexiv2
|
||||
|
||||
pkg_search_module( EXIV2 exiv2 )
|
||||
if( NOT EXIV2_FOUND )
|
||||
tde_message_fatal( "exiv2 is required, but was not found on your system" )
|
||||
endif( NOT EXIV2_FOUND )
|
||||
|
||||
check_include_file_cxx( "exiv2/exiv2.hpp" HAVE_EXIV2_EXIV2_HPP )
|
||||
|
||||
|
||||
##### check for libjpeg
|
||||
|
||||
find_package( JPEG )
|
||||
if( JPEG_FOUND )
|
||||
set( HAVE_JPEG 1 )
|
||||
else()
|
||||
tde_message_fatal( "jpeg library is required, but was not found on your system" )
|
||||
endif()
|
||||
|
||||
|
||||
##### checks for libkipi
|
||||
|
||||
find_file( HAVE_LIBKIPI_H "libkipi/interface.h" )
|
||||
if( NOT HAVE_LIBKIPI_H )
|
||||
tde_message_fatal( "libkipi was requested but not found on your system." )
|
||||
endif( )
|
||||
set( GV_HAVE_KIPI 1 )
|
||||
set( KIPI_LIBRARY kipi )
|
||||
|
||||
|
||||
##### checks for libmng
|
||||
|
||||
find_file( HAVE_LIBMNG_H "libmng.h" )
|
||||
if( NOT HAVE_LIBMNG_H )
|
||||
tde_message_fatal( "libmng was requested but not found on your system." )
|
||||
endif( )
|
||||
set( MNG_LIBRARY mng )
|
||||
set( HAVE_LIBMNG 1 )
|
||||
|
||||
|
||||
##### check for libpng
|
||||
|
||||
find_package( PNG )
|
||||
if( NOT PNG_FOUND )
|
||||
tde_message_fatal( "png library is required, but was not found on your system" )
|
||||
endif()
|
||||
|
||||
|
||||
##### check for libxcursor
|
||||
pkg_search_module( XCURSOR xcursor )
|
||||
if( XCURSOR_FOUND )
|
||||
set( GV_HAVE_XCURSOR 1 )
|
||||
else( )
|
||||
tde_message_fatal( "xcursor library is required, but was not found on your system" )
|
||||
endif( )
|
||||
|
||||
|
||||
##### check for lround function
|
||||
|
||||
tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "m" )
|
||||
check_symbol_exists ( lround "math.h" HAVE_LROUND )
|
||||
tde_restore( CMAKE_REQUIRED_LIBRARIES )
|
||||
if( NOT HAVE_LROUND )
|
||||
set( HAVE_LROUND 0 )
|
||||
endif( NOT HAVE_LROUND )
|
@ -0,0 +1,23 @@
|
||||
#define VERSION "@VERSION@"
|
||||
|
||||
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
|
||||
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||
|
||||
// Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
// significant byte first (like Motorola and SPARC, unlike Intel).
|
||||
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
||||
|
||||
// Defined if you have exiv2/exiv2.hpp header
|
||||
#cmakedefine HAVE_EXIV2_EXIV2_HPP 1
|
||||
|
||||
// Defined if you have libkipi install
|
||||
#cmakedefine GV_HAVE_KIPI 1
|
||||
|
||||
// Defined if you have libmn install
|
||||
#cmakedefine HAVE_LIBMNG 1
|
||||
|
||||
// Defined if you have libxcurso install
|
||||
#cmakedefine GV_HAVE_XCURSOR 1
|
||||
|
||||
// Defined if you have lround function
|
||||
#cmakedefine HAVE_LROUND 1
|
@ -0,0 +1,4 @@
|
||||
add_subdirectory( action )
|
||||
add_subdirectory( app )
|
||||
add_subdirectory( cursor )
|
||||
add_subdirectory( thumbnail )
|
@ -0,0 +1 @@
|
||||
tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/gwenview/icons )
|
@ -0,0 +1 @@
|
||||
tde_install_icons( )
|
@ -0,0 +1,4 @@
|
||||
INSTALL(
|
||||
FILES zoom.png
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gwenview/cursors
|
||||
)
|
@ -0,0 +1,4 @@
|
||||
INSTALL(
|
||||
FILES wait.png
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gwenview/thumbnail
|
||||
)
|
@ -0,0 +1,24 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### subfolders
|
||||
|
||||
add_subdirectory( app )
|
||||
add_subdirectory( desktopfiles )
|
||||
add_subdirectory( gvcore )
|
||||
add_subdirectory( gvdirpart )
|
||||
add_subdirectory( gvimagepart )
|
||||
add_subdirectory( imageutils )
|
||||
add_subdirectory( tools )
|
||||
add_subdirectory( tsthread )
|
||||
add_subdirectory( updates )
|
@ -0,0 +1,64 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### libgwenshared (static)
|
||||
|
||||
tde_add_library( gwenshared STATIC_PIC AUTOMOC
|
||||
SOURCES vtabwidget.cpp
|
||||
)
|
||||
|
||||
|
||||
##### gwenview (shared)
|
||||
|
||||
set( gwenview_SRCS
|
||||
bookmarkowner.cpp
|
||||
bookmarkviewcontroller.cpp
|
||||
bookmarkdialogbase.ui
|
||||
bookmarkdialog.cpp
|
||||
configfileoperationspage.ui
|
||||
configfullscreenpage.ui
|
||||
configimagelistpage.ui
|
||||
configimageviewpage.ui
|
||||
configmiscpage.ui
|
||||
configslideshowpage.ui
|
||||
kipiinterface.cpp
|
||||
mainwindow.cpp
|
||||
metaedit.cpp
|
||||
treeview.cpp
|
||||
dirviewcontroller.cpp
|
||||
configdialog.cpp
|
||||
history.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
tde_add_tdeinit_executable( gwenview AUTOMOC
|
||||
SOURCES ${gwenview_SRCS}
|
||||
LINK
|
||||
gwenshared-static gwenviewcore-shared
|
||||
tdeutils-shared ${KIPI_LIBRARY}
|
||||
DESTINATION ${LIB_INSTALL_DIR}/trinity
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES gwenviewui.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gwenview
|
||||
)
|
||||
|
||||
install(
|
||||
FILES gwenview.xpm
|
||||
DESTINATION ${SHARE_INSTALL_PREFIX}/pixmaps
|
||||
)
|
@ -0,0 +1,11 @@
|
||||
##### desktop files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE gwenview.desktop
|
||||
DESTINATION ${XDG_APPS_INSTALL_DIR}
|
||||
)
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE konqgwenview.desktop
|
||||
DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
|
||||
)
|
@ -0,0 +1,98 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### gwenviewcore (shared)
|
||||
|
||||
set( gwenviewcore_SRCS
|
||||
pngformattype.cpp
|
||||
printdialog.cpp
|
||||
printdialogpagebase.ui
|
||||
thumbnailloadjob.cpp
|
||||
imageview.cpp
|
||||
imageviewcontroller.cpp
|
||||
document.cpp
|
||||
externaltoolmanager.cpp
|
||||
externaltoolcontext.cpp
|
||||
externaltoolaction.cpp
|
||||
externaltooldialogbase.ui
|
||||
externaltooldialog.cpp
|
||||
fileviewcontroller.cpp
|
||||
filethumbnailview.cpp
|
||||
fileoperation.cpp
|
||||
fileopobject.cpp
|
||||
filethumbnailviewitem.cpp
|
||||
filterbar.ui
|
||||
qxcfi.cpp
|
||||
archive.cpp
|
||||
slideshow.cpp
|
||||
filedetailview.cpp
|
||||
filedetailviewitem.cpp
|
||||
imagesavedialog.cpp
|
||||
jpegformattype.cpp
|
||||
mngformattype.cpp
|
||||
xpm.cpp
|
||||
documentimpl.cpp
|
||||
documentloadingimpl.cpp
|
||||
documentloadedimpl.cpp
|
||||
documentjpegloadedimpl.cpp
|
||||
documentanimatedloadedimpl.cpp
|
||||
documentotherloadedimpl.cpp
|
||||
busylevelmanager.cpp
|
||||
cache.cpp
|
||||
threadgate.cpp
|
||||
imageviewtools.cpp
|
||||
fullscreenbar.cpp
|
||||
imageloader.cpp
|
||||
cursortracker.cpp
|
||||
captionformatter.cpp
|
||||
thumbnaildetailsdialogbase.ui
|
||||
thumbnaildetailsdialog.cpp
|
||||
xcursor.cpp
|
||||
mimetypeutils.cpp
|
||||
bcgdialog.cpp
|
||||
bcgdialogbase.ui
|
||||
timeutils.cpp
|
||||
clicklineedit.cpp
|
||||
inputdialog.cpp
|
||||
deletedialog.cpp
|
||||
deletedialogbase.ui
|
||||
miscconfig.kcfgc
|
||||
slideshowconfig.kcfgc
|
||||
fileoperationconfig.kcfgc
|
||||
fullscreenconfig.kcfgc
|
||||
imageviewconfig.kcfgc
|
||||
fileviewconfig.kcfgc
|
||||
)
|
||||
|
||||
tde_add_library( gwenviewcore SHARED AUTOMOC
|
||||
SOURCES ${gwenviewcore_SRCS}
|
||||
LINK
|
||||
tsthread-static gvimageutils-static
|
||||
tdecore-shared tdeio-shared tdemediaplayer-shared
|
||||
tdeparts-shared tdeprint-shared tdeui-shared
|
||||
${EXIV2_LIBRARIES} ${JPEG_LIBRARIES} ${MNG_LIBRARY}
|
||||
${PNG_LIBRARIES} ${XCURSOR_LIBRARIES}
|
||||
VERSION 1.0.0
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES
|
||||
miscconfig.kcfg slideshowconfig.kcfg fileoperationconfig.kcfg
|
||||
fullscreenconfig.kcfg imageviewconfig.kcfg fileviewconfig.kcfg
|
||||
DESTINATION ${KCFG_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1,39 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### gvdirpart (shared)
|
||||
|
||||
tde_add_kpart( libgvdirpart AUTOMOC
|
||||
SOURCES gvdirpart.cpp gvdirpartconfig.kcfgc
|
||||
LINK tdeparts-shared gwenviewcore-shared
|
||||
DESTINATION ${LIB_INSTALL_DIR}/trinity
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE gvdirpart.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES gvdirpart.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gvdirpart
|
||||
)
|
||||
|
||||
install(
|
||||
FILES gvdirpartconfig.kcfg
|
||||
DESTINATION ${KCFG_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1,34 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### gvimagepart
|
||||
|
||||
tde_add_kpart( libgvimagepart AUTOMOC
|
||||
SOURCES gvimagepart.cpp
|
||||
LINK tdeparts-shared gwenviewcore-shared
|
||||
DESTINATION ${LIB_INSTALL_DIR}/trinity
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE gvimagepart.desktop
|
||||
DESTINATION ${SERVICES_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES gvimagepart.rc gvimagepartpopup.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gvimagepart
|
||||
)
|
@ -0,0 +1,31 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
${EXIV2_INCLUDE_DIRS}
|
||||
${JPEG_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
${EXIV2_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### gvimageutils (static)
|
||||
|
||||
tde_add_library( gvimageutils STATIC_PIC AUTOMOC
|
||||
SOURCES imageutils.cpp jpegcontent.cpp scale.cpp transupp.c croppedqimage.cpp
|
||||
LINK tdecore-shared tdeio-shared ${EXIV2_LIBRARIES} ${JPEG_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
##### testjpegcontent (executable)
|
||||
|
||||
tde_add_check_executable( testjpegcontent AUTOMOC
|
||||
SOURCES testjpegcontent.cpp
|
||||
LINK gvimageutils-static
|
||||
)
|
@ -1,810 +0,0 @@
|
||||
#ifdef HAVE_X86_MMX
|
||||
|
||||
#ifdef __EMX__
|
||||
/* Due to strange behaviour of as.exe we use this macros */
|
||||
/* For all OS/2 coders - please use PGCC to compile this code */
|
||||
#define PR_(foo) ___##foo
|
||||
#define PT_(foo,func) ___##foo,func
|
||||
#define SIZE(sym) \
|
||||
.___end_##sym:; \
|
||||
.size ___##sym,.___end_##sym-___##sym; \
|
||||
.align 8;
|
||||
#else
|
||||
#define PR_(foo) __##foo
|
||||
#define PT_(foo,func) __##foo,func
|
||||
#define SIZE(sym) \
|
||||
.__end_##sym:; \
|
||||
.size __##sym,.__end_##sym-__##sym; \
|
||||
.align 8;
|
||||
#endif
|
||||
|
||||
/*\
|
||||
|*| MMX assembly scaling routine for Imlib2
|
||||
|*| Written by Willem Monsuwe <willem@stack.nl>
|
||||
\*/
|
||||
|
||||
.text
|
||||
.align 8
|
||||
.globl PR_(mimageScale_mmx_AARGBA)
|
||||
/* .type PT_(mimageScale_mmx_AARGBA,@function) */
|
||||
|
||||
|
||||
/*\ Prototype: __mimageScale_mmx_AARGBA(ImlibScaleInfo *isi, DATA32 *dest,
|
||||
|*| int dxx, int dyy, int dx, int dy, int dw, int dh, int dow, int sow)
|
||||
\*/
|
||||
|
||||
#define isi 8(%ebp)
|
||||
#define dest 12(%ebp)
|
||||
#define dxx 16(%ebp)
|
||||
#define dyy 20(%ebp)
|
||||
#define dx 24(%ebp)
|
||||
#define dy 28(%ebp)
|
||||
#define dw 32(%ebp)
|
||||
#define dh 36(%ebp)
|
||||
#define dow 40(%ebp)
|
||||
#define sow 44(%ebp)
|
||||
|
||||
/*\ Local variables that didn't fit in registers \*/
|
||||
#define y -4(%ebp)
|
||||
#define yp -8(%ebp)
|
||||
#define yap -12(%ebp)
|
||||
#define xp -16(%ebp)
|
||||
#define xap -20(%ebp)
|
||||
#define Cx -24(%ebp)
|
||||
#define Mx -28(%ebp)
|
||||
#define Cy -32(%ebp)
|
||||
#define My -36(%ebp)
|
||||
#define sow_4 -40(%ebp)
|
||||
|
||||
/*\ When %edx points to ImlibScaleInfo, these are the members \*/
|
||||
#define xpoints (%edx)
|
||||
#define ypoints 4(%edx)
|
||||
#define xapoints 8(%edx)
|
||||
#define yapoints 12(%edx)
|
||||
#define xup_yup 16(%edx)
|
||||
|
||||
PR_(mimageScale_mmx_AARGBA):
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
subl $40, %esp
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
movl isi, %edx
|
||||
|
||||
/*\ Check (dw > 0) && (dh > 0) \*/
|
||||
cmpl $0, dw
|
||||
jle .scale_leave
|
||||
cmpl $0, dh
|
||||
jle .scale_leave
|
||||
|
||||
/*\ X-based array pointers point to the end; we're looping up to 0 \*/
|
||||
/*\ %edi = dest + dow * dy + dx + dw \*/
|
||||
movl dow, %eax
|
||||
imull dy, %eax
|
||||
addl dx, %eax
|
||||
addl dw, %eax
|
||||
movl dest, %edi
|
||||
leal (%edi, %eax, 4), %edi
|
||||
/*\ xp = xpoints + dxx + dw \*/
|
||||
movl dxx, %ebx
|
||||
addl dw, %ebx
|
||||
movl xpoints, %eax
|
||||
leal (%eax, %ebx, 4), %eax
|
||||
movl %eax, xp
|
||||
/*\ xap = xapoints + dxx + dw \*/
|
||||
movl xapoints, %eax
|
||||
leal (%eax, %ebx, 4), %eax
|
||||
movl %eax, xap
|
||||
/*\ y = dh \*/
|
||||
movl dh, %eax
|
||||
movl %eax, y
|
||||
/*\ yp = ypoints + dyy \*/
|
||||
movl dyy, %ebx
|
||||
movl ypoints, %eax
|
||||
leal (%eax, %ebx, 4), %eax
|
||||
movl %eax, yp
|
||||
/*\ yap = yapoints + dyy \*/
|
||||
movl yapoints, %eax
|
||||
leal (%eax, %ebx, 4), %eax
|
||||
movl %eax, yap
|
||||
|
||||
pxor %mm7, %mm7
|
||||
|
||||
/*\ Test xup bit \*/
|
||||
movl xup_yup, %eax
|
||||
sarl $1, %eax
|
||||
jnc .scale_x_down
|
||||
|
||||
.scale_x_up:
|
||||
/*\ Test yup bit \*/
|
||||
sarl $1, %eax
|
||||
jnc .scale_x_up_y_down
|
||||
|
||||
|
||||
/*\ Scaling up both ways \*/
|
||||
|
||||
.scale_x_up_y_up:
|
||||
movl sow, %ebx
|
||||
|
||||
.up_up_loop_y:
|
||||
|
||||
/*\ x = -dw \*/
|
||||
movl dw, %ecx
|
||||
negl %ecx
|
||||
|
||||
/*\ %eax = *yap << 4 \*/
|
||||
movl yap, %eax
|
||||
movl (%eax), %eax
|
||||
sall $4, %eax
|
||||
jz .up_up_yap_0
|
||||
movd %eax, %mm1
|
||||
punpcklwd %mm1, %mm1
|
||||
punpckldq %mm1, %mm1
|
||||
|
||||
.up_up_loop1_x:
|
||||
/*\ %esi = *yp + xp[x] \*/
|
||||
movl yp, %eax
|
||||
movl (%eax), %esi
|
||||
movl xp, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
leal (%esi, %eax, 4), %esi
|
||||
|
||||
/*\ %eax = xap[x] << 4 \*/
|
||||
movl xap, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
sall $4, %eax
|
||||
jz .up_up_xap_0
|
||||
|
||||
/*\ %mm0 = xap[x] << 4 \*/
|
||||
movd %eax, %mm0
|
||||
punpcklwd %mm0, %mm0
|
||||
punpckldq %mm0, %mm0
|
||||
|
||||
/*\ Load and unpack four pixels in parralel
|
||||
|*| %mm2 = ptr[0], %mm3 = ptr[1]
|
||||
|*| %mm4 = ptr[sow], %mm5 = ptr[sow + 1]
|
||||
\*/
|
||||
movq (%esi), %mm2
|
||||
movq (%esi, %ebx, 4), %mm4
|
||||
movq %mm2, %mm3
|
||||
movq %mm4, %mm5
|
||||
punpcklbw %mm7, %mm2
|
||||
punpcklbw %mm7, %mm4
|
||||
punpckhbw %mm7, %mm3
|
||||
punpckhbw %mm7, %mm5
|
||||
|
||||
/*\ X interpolation: r = l + (r - l) * xap \*/
|
||||
psubw %mm2, %mm3
|
||||
psubw %mm4, %mm5
|
||||
psllw $4, %mm3
|
||||
psllw $4, %mm5
|
||||
pmulhw %mm0, %mm3
|
||||
pmulhw %mm0, %mm5
|
||||
paddw %mm2, %mm3
|
||||
paddw %mm4, %mm5
|
||||
/*\ Now %mm3 = I(ptr[0], ptr[1]), %mm5 = I(ptr[sow], ptr[sow + 1]) \*/
|
||||
jmp .up_up_common
|
||||
.up_up_xap_0:
|
||||
/*\ Load and unpack two pixels
|
||||
|*| %mm3 = ptr[0], %mm5 = ptr[sow]
|
||||
\*/
|
||||
movd (%esi), %mm3
|
||||
movd (%esi, %ebx, 4), %mm5
|
||||
punpcklbw %mm7, %mm3
|
||||
punpcklbw %mm7, %mm5
|
||||
.up_up_common:
|
||||
/*\ Y interpolation: d = u + (d - u) * yap \*/
|
||||
psubw %mm3, %mm5
|
||||
psllw $4, %mm5
|
||||
pmulhw %mm1, %mm5
|
||||
paddw %mm3, %mm5
|
||||
packuswb %mm5, %mm5
|
||||
movd %mm5, (%edi, %ecx, 4)
|
||||
|
||||
/*\ while (++x) \*/
|
||||
incl %ecx
|
||||
jnz .up_up_loop1_x
|
||||
jmp .up_up_yap_end
|
||||
.up_up_yap_0:
|
||||
|
||||
.up_up_loop2_x:
|
||||
/*\ %esi = *yp + xp[x] \*/
|
||||
movl yp, %eax
|
||||
movl (%eax), %esi
|
||||
movl xp, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
leal (%esi, %eax, 4), %esi
|
||||
|
||||
/*\ %eax = xap[x] << 4 \*/
|
||||
movl xap, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
sall $4, %eax
|
||||
jz .up_up_0
|
||||
|
||||
/*\ %mm0 = xap[x] << 4 \*/
|
||||
movd %eax, %mm0
|
||||
punpcklwd %mm0, %mm0
|
||||
punpckldq %mm0, %mm0
|
||||
|
||||
/*\ Load and unpack two pixels in parralel
|
||||
|*| %mm2 = ptr[0], %mm3 = ptr[1]
|
||||
\*/
|
||||
movq (%esi), %mm2
|
||||
movq %mm2, %mm3
|
||||
punpcklbw %mm7, %mm2
|
||||
punpckhbw %mm7, %mm3
|
||||
|
||||
/*\ X interpolation: r = l + (r - l) * xap \*/
|
||||
psubw %mm2, %mm3
|
||||
psllw $4, %mm3
|
||||
pmulhw %mm0, %mm3
|
||||
paddw %mm2, %mm3
|
||||
packuswb %mm3, %mm3
|
||||
movd %mm3, (%edi, %ecx, 4)
|
||||
jmp .up_up_1
|
||||
.up_up_0:
|
||||
/*\ dptr[x] = *sptr \*/
|
||||
movl (%esi), %eax
|
||||
movl %eax, (%edi, %ecx, 4)
|
||||
.up_up_1:
|
||||
incl %ecx
|
||||
jnz .up_up_loop2_x
|
||||
|
||||
.up_up_yap_end:
|
||||
/*\ dptr += dow \*/
|
||||
movl dow, %eax
|
||||
leal (%edi, %eax, 4), %edi
|
||||
/*\ yap++; yp++ \*/
|
||||
addl $4, yap
|
||||
addl $4, yp
|
||||
/*\ while (y--) \*/
|
||||
decl y
|
||||
jnz .up_up_loop_y
|
||||
|
||||
jmp .scale_leave
|
||||
|
||||
|
||||
/*\ Scaling down vertically \*/
|
||||
|
||||
.scale_x_up_y_down:
|
||||
/*\ sow_4 = sow * 4 \*/
|
||||
movl sow, %eax
|
||||
sall $2, %eax
|
||||
movl %eax, sow_4
|
||||
|
||||
.up_down_loop_y:
|
||||
|
||||
/*\ Setup My and Cy \*/
|
||||
movl yap, %eax
|
||||
movzwl (%eax), %ebx
|
||||
movl %ebx, My
|
||||
movzwl 2(%eax), %eax
|
||||
movl %eax, Cy
|
||||
|
||||
/*\ mm4 = Cy \*/
|
||||
movd %eax, %mm4
|
||||
punpcklwd %mm4, %mm4
|
||||
punpckldq %mm4, %mm4
|
||||
/*\ mm5 = My \*/
|
||||
movd %ebx, %mm5
|
||||
punpcklwd %mm5, %mm5
|
||||
punpckldq %mm5, %mm5
|
||||
|
||||
/*\ x = -dw \*/
|
||||
movl dw, %ecx
|
||||
negl %ecx
|
||||
.up_down_loop_x:
|
||||
/*\ %esi = *yp + xp[x] \*/
|
||||
movl yp, %eax
|
||||
movl (%eax), %esi
|
||||
movl xp, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
leal (%esi, %eax, 4), %esi
|
||||
|
||||
movl %esi, %eax
|
||||
/*\ v = (*p * My) >> 10 \*/
|
||||
movd (%eax), %mm0
|
||||
punpcklbw %mm7, %mm0
|
||||
psllw $6, %mm0
|
||||
pmulhw %mm5, %mm0
|
||||
|
||||
/*\ i = 0x4000 - My \*/
|
||||
movl $0x4000, %ebx
|
||||
subl My, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ p += sow; v += (*p * Cy) >> 10 \*/
|
||||
addl sow_4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm0
|
||||
|
||||
/*\ i -= Cy; while (i > Cy) \*/
|
||||
subl Cy, %ebx
|
||||
2:
|
||||
cmpl Cy, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ mm6 = i \*/
|
||||
movd %ebx, %mm6
|
||||
punpcklwd %mm6, %mm6
|
||||
punpckldq %mm6, %mm6
|
||||
|
||||
/*\ p += sow; v += (*p * i) >> 10 \*/
|
||||
addl sow_4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm6, %mm1
|
||||
paddw %mm1, %mm0
|
||||
5:
|
||||
/*\ %eax = xap[x] << 5 \*/
|
||||
movl xap, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
sall $5, %eax
|
||||
jz 6f
|
||||
/*\ mm3 = xap[x] << 5 \*/
|
||||
movd %eax, %mm3
|
||||
punpcklwd %mm3, %mm3
|
||||
punpckldq %mm3, %mm3
|
||||
|
||||
/*\ p + 1 \*/
|
||||
movl %esi, %eax
|
||||
addl $4, %eax
|
||||
/*\ vv = (*p * My) >> 10 \*/
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $6, %mm2
|
||||
pmulhw %mm5, %mm2
|
||||
|
||||
/*\ i = 0x4000 - My \*/
|
||||
movl $0x4000, %ebx
|
||||
subl My, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ p += sow; vv += (*p * Cy) >> 10 \*/
|
||||
addl sow_4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm2
|
||||
|
||||
/*\ i -= Cy; while (i > Cy) \*/
|
||||
subl Cy, %ebx
|
||||
2:
|
||||
cmpl Cy, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ p += sow; v += (*p * i) >> 10 \*/
|
||||
addl sow_4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm6, %mm1
|
||||
paddw %mm1, %mm2
|
||||
5:
|
||||
/*\ v = v + (vv - v) * xap \*/
|
||||
psubw %mm0, %mm2
|
||||
psllw $3, %mm2
|
||||
pmulhw %mm3, %mm2
|
||||
paddw %mm2, %mm0
|
||||
6:
|
||||
/*\ dest[x] = v >> 4 \*/
|
||||
psrlw $4, %mm0
|
||||
packuswb %mm0, %mm0
|
||||
movd %mm0, (%edi, %ecx, 4)
|
||||
|
||||
/*\ while (++x) \*/
|
||||
incl %ecx
|
||||
jnz .up_down_loop_x
|
||||
|
||||
/*\ dptr += dow \*/
|
||||
movl dow, %eax
|
||||
leal (%edi, %eax, 4), %edi
|
||||
/*\ yap++; yp++ \*/
|
||||
addl $4, yap
|
||||
addl $4, yp
|
||||
/*\ while (y--) \*/
|
||||
decl y
|
||||
jnz .up_down_loop_y
|
||||
|
||||
jmp .scale_leave
|
||||
|
||||
.scale_x_down:
|
||||
/*\ Test yup bit \*/
|
||||
sarl $1, %eax
|
||||
jnc .scale_x_down_y_down
|
||||
|
||||
|
||||
/*\ Scaling down horizontally \*/
|
||||
|
||||
.scale_x_down_y_up:
|
||||
/*\ sow_4 = sow * 4 \*/
|
||||
movl sow, %eax
|
||||
sall $2, %eax
|
||||
movl %eax, sow_4
|
||||
|
||||
.down_up_loop_y:
|
||||
|
||||
/*\ %eax = *yap << 5 \*/
|
||||
movl yap, %eax
|
||||
movl (%eax), %eax
|
||||
sall $5, %eax
|
||||
/*\ mm3 = *yap << 5 \*/
|
||||
movd %eax, %mm3
|
||||
punpcklwd %mm3, %mm3
|
||||
punpckldq %mm3, %mm3
|
||||
|
||||
/*\ x = -dw \*/
|
||||
movl dw, %ecx
|
||||
negl %ecx
|
||||
.down_up_loop_x:
|
||||
/*\ %esi = *yp + xp[x] \*/
|
||||
movl yp, %eax
|
||||
movl (%eax), %esi
|
||||
movl xp, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
leal (%esi, %eax, 4), %esi
|
||||
|
||||
/*\ Setup Mx and Cx \*/
|
||||
movl xap, %eax
|
||||
movzwl (%eax, %ecx, 4), %ebx
|
||||
movl %ebx, Mx
|
||||
movzwl 2(%eax, %ecx, 4), %eax
|
||||
movl %eax, Cx
|
||||
|
||||
/*\ mm4 = Cx \*/
|
||||
movd %eax, %mm4
|
||||
punpcklwd %mm4, %mm4
|
||||
punpckldq %mm4, %mm4
|
||||
/*\ mm5 = Mx \*/
|
||||
movd %ebx, %mm5
|
||||
punpcklwd %mm5, %mm5
|
||||
punpckldq %mm5, %mm5
|
||||
|
||||
movl %esi, %eax
|
||||
/*\ v = (*p * Mx) >> 10 \*/
|
||||
movd (%eax), %mm0
|
||||
punpcklbw %mm7, %mm0
|
||||
psllw $6, %mm0
|
||||
pmulhw %mm5, %mm0
|
||||
|
||||
/*\ i = 0x4000 - Mx \*/
|
||||
movl $0x4000, %ebx
|
||||
subl Mx, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ p += sow; v += (*p * Cx) >> 10 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm0
|
||||
|
||||
/*\ i -= Cx; while (i > Cx) \*/
|
||||
subl Cx, %ebx
|
||||
2:
|
||||
cmpl Cx, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ mm6 = i \*/
|
||||
movd %ebx, %mm6
|
||||
punpcklwd %mm6, %mm6
|
||||
punpckldq %mm6, %mm6
|
||||
|
||||
/*\ p += sow; v += (*p * i) >> 10 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm6, %mm1
|
||||
paddw %mm1, %mm0
|
||||
5:
|
||||
movd %mm3, %eax
|
||||
testl %eax, %eax
|
||||
jz 6f
|
||||
/*\ p + sow \*/
|
||||
movl %esi, %eax
|
||||
addl sow_4, %eax
|
||||
/*\ vv = (*p * Mx) >> 10 \*/
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $6, %mm2
|
||||
pmulhw %mm5, %mm2
|
||||
|
||||
/*\ i = 0x4000 - Mx \*/
|
||||
movl $0x4000, %ebx
|
||||
subl Mx, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ p += sow; vv += (*p * Cx) >> 10 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm2
|
||||
|
||||
/*\ i -= Cx; while (i > Cx) \*/
|
||||
subl Cx, %ebx
|
||||
2:
|
||||
cmpl Cx, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ p += sow; v += (*p * i) >> 10 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $6, %mm1
|
||||
pmulhw %mm6, %mm1
|
||||
paddw %mm1, %mm2
|
||||
5:
|
||||
/*\ v = v + (vv - v) * yap \*/
|
||||
psubw %mm0, %mm2
|
||||
psllw $3, %mm2
|
||||
pmulhw %mm3, %mm2
|
||||
paddw %mm2, %mm0
|
||||
6:
|
||||
/*\ dest[x] = v >> 4 \*/
|
||||
psrlw $4, %mm0
|
||||
packuswb %mm0, %mm0
|
||||
movd %mm0, (%edi, %ecx, 4)
|
||||
|
||||
/*\ while (++x) \*/
|
||||
incl %ecx
|
||||
jnz .down_up_loop_x
|
||||
|
||||
/*\ dptr += dow \*/
|
||||
movl dow, %eax
|
||||
leal (%edi, %eax, 4), %edi
|
||||
/*\ yap++; yp++ \*/
|
||||
addl $4, yap
|
||||
addl $4, yp
|
||||
/*\ while (y--) \*/
|
||||
decl y
|
||||
jnz .down_up_loop_y
|
||||
|
||||
jmp .scale_leave
|
||||
|
||||
|
||||
/*\ Scaling down both ways \*/
|
||||
|
||||
.scale_x_down_y_down:
|
||||
/*\ sow_4 = sow * 4 \*/
|
||||
movl sow, %eax
|
||||
sall $2, %eax
|
||||
movl %eax, sow_4
|
||||
|
||||
.down_down_loop_y:
|
||||
|
||||
/*\ Setup My and Cy \*/
|
||||
movl yap, %eax
|
||||
movzwl (%eax), %ebx
|
||||
movl %ebx, My
|
||||
movzwl 2(%eax), %eax
|
||||
movl %eax, Cy
|
||||
|
||||
/*\ x = -dw \*/
|
||||
movl dw, %ecx
|
||||
negl %ecx
|
||||
.down_down_loop_x:
|
||||
/*\ %esi = *yp + xp[x] \*/
|
||||
movl yp, %eax
|
||||
movl (%eax), %esi
|
||||
movl xp, %eax
|
||||
movl (%eax, %ecx, 4), %eax
|
||||
leal (%esi, %eax, 4), %esi
|
||||
|
||||
/*\ Setup Mx and Cx \*/
|
||||
movl xap, %eax
|
||||
movzwl (%eax, %ecx, 4), %ebx
|
||||
movl %ebx, Mx
|
||||
movzwl 2(%eax, %ecx, 4), %eax
|
||||
movl %eax, Cx
|
||||
|
||||
/*\ mm3 = Cx \*/
|
||||
movd %eax, %mm3
|
||||
punpcklwd %mm3, %mm3
|
||||
punpckldq %mm3, %mm3
|
||||
/*\ mm5 = Mx \*/
|
||||
movd %ebx, %mm5
|
||||
punpcklwd %mm5, %mm5
|
||||
punpckldq %mm5, %mm5
|
||||
|
||||
/*\ p = sptr; v = (*p * Mx) >> 9 \*/
|
||||
movl %esi, %eax
|
||||
movd (%eax), %mm0
|
||||
punpcklbw %mm7, %mm0
|
||||
psllw $7, %mm0
|
||||
pmulhw %mm5, %mm0
|
||||
|
||||
/*\ i = 0x4000 - Mx \*/
|
||||
movl $0x4000, %ebx
|
||||
subl Mx, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ v += (*++p * Cx) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $7, %mm1
|
||||
pmulhw %mm3, %mm1
|
||||
paddw %mm1, %mm0
|
||||
|
||||
/*\ i -= Cx; while (i > Cx) \*/
|
||||
subl Cx, %ebx
|
||||
2:
|
||||
cmpl Cx, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ mm6 = i \*/
|
||||
movd %ebx, %mm6
|
||||
punpcklwd %mm6, %mm6
|
||||
punpckldq %mm6, %mm6
|
||||
|
||||
/*\ v += (*++p * i) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $7, %mm1
|
||||
pmulhw %mm6, %mm1
|
||||
paddw %mm1, %mm0
|
||||
5:
|
||||
/*\ v *= My \*/
|
||||
movd My, %mm4
|
||||
punpcklwd %mm4, %mm4
|
||||
punpckldq %mm4, %mm4
|
||||
psllw $2, %mm0
|
||||
pmulhw %mm4, %mm0
|
||||
|
||||
/*\ j = 0x4000 - My \*/
|
||||
movl $0x4000, %edx
|
||||
subl My, %edx
|
||||
jbe 6f
|
||||
jmp 4f
|
||||
3:
|
||||
/*\ sptr += sow; p = sptr \*/
|
||||
addl sow_4, %esi
|
||||
movl %esi, %eax
|
||||
/*\ vx = (*p * Mx) >> 9 \*/
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $7, %mm1
|
||||
pmulhw %mm5, %mm1
|
||||
|
||||
/*\ i = 0x4000 - Mx \*/
|
||||
movl $0x4000, %ebx
|
||||
subl Mx, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ vx += (*++p * Cx) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $7, %mm2
|
||||
pmulhw %mm3, %mm2
|
||||
paddw %mm2, %mm1
|
||||
|
||||
/*\ i -= Cx; while (i > Cx) \*/
|
||||
subl Cx, %ebx
|
||||
2:
|
||||
cmpl Cx, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ vx += (*++p * i) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $7, %mm2
|
||||
pmulhw %mm6, %mm2
|
||||
paddw %mm2, %mm1
|
||||
5:
|
||||
/*\ v += (vx * Cy) >> 14 \*/
|
||||
movd Cy, %mm4
|
||||
punpcklwd %mm4, %mm4
|
||||
punpckldq %mm4, %mm4
|
||||
psllw $2, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm0
|
||||
|
||||
/*\ j -= Cy; while (j > Cy) \*/
|
||||
subl Cy, %edx
|
||||
4:
|
||||
cmpl Cy, %edx
|
||||
jg 3b
|
||||
|
||||
/*\ sptr += sow; p = sptr \*/
|
||||
addl sow_4, %esi
|
||||
movl %esi, %eax
|
||||
/*\ vx = (*p * Mx) >> 9 \*/
|
||||
movd (%eax), %mm1
|
||||
punpcklbw %mm7, %mm1
|
||||
psllw $7, %mm1
|
||||
pmulhw %mm5, %mm1
|
||||
|
||||
/*\ i = 0x4000 - Mx \*/
|
||||
movl $0x4000, %ebx
|
||||
subl Mx, %ebx
|
||||
jbe 5f
|
||||
jmp 2f
|
||||
1:
|
||||
/*\ vx += (*++p * Cx) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $7, %mm2
|
||||
pmulhw %mm3, %mm2
|
||||
paddw %mm2, %mm1
|
||||
|
||||
/*\ i -= Cx; while (i > Cx) \*/
|
||||
subl Cx, %ebx
|
||||
2:
|
||||
cmpl Cx, %ebx
|
||||
jg 1b
|
||||
|
||||
/*\ vx += (*++p * i) >> 9 \*/
|
||||
addl $4, %eax
|
||||
movd (%eax), %mm2
|
||||
punpcklbw %mm7, %mm2
|
||||
psllw $7, %mm2
|
||||
pmulhw %mm6, %mm2
|
||||
paddw %mm2, %mm1
|
||||
5:
|
||||
/*\ v += (vx * j) >> 14 \*/
|
||||
movd %edx, %mm4
|
||||
punpcklwd %mm4, %mm4
|
||||
punpckldq %mm4, %mm4
|
||||
psllw $2, %mm1
|
||||
pmulhw %mm4, %mm1
|
||||
paddw %mm1, %mm0
|
||||
6:
|
||||
/*\ dptr[x] = mm0 >> 5 \*/
|
||||
psrlw $5, %mm0
|
||||
packuswb %mm0, %mm0
|
||||
movd %mm0, (%edi, %ecx, 4)
|
||||
|
||||
/*\ while (++x) \*/
|
||||
incl %ecx
|
||||
jnz .down_down_loop_x
|
||||
|
||||
/*\ dptr += dow \*/
|
||||
movl dow, %eax
|
||||
leal (%edi, %eax, 4), %edi
|
||||
/*\ yap++; yp++ \*/
|
||||
addl $4, yap
|
||||
addl $4, yp
|
||||
/*\ while (y--) \*/
|
||||
decl y
|
||||
jnz .down_down_loop_y
|
||||
|
||||
jmp .scale_leave
|
||||
|
||||
.scale_leave:
|
||||
emms
|
||||
popl %esi
|
||||
popl %edi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
movl %ebp, %esp
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
SIZE(mimageScale_mmx_AARGBA)
|
||||
|
||||
#endif
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
@ -0,0 +1,6 @@
|
||||
##### desktop files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE gimp.desktop kolourpaint.desktop konqueror.desktop tiledwallpaper.desktop wallpaper.desktop
|
||||
DESTINATION ${DATA_INSTALL_DIR}/gwenview/tools
|
||||
)
|
@ -0,0 +1,19 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### tsthread (static)
|
||||
|
||||
tde_add_library( tsthread STATIC_PIC AUTOMOC
|
||||
SOURCES tsthread.cpp tswaitcondition.cpp
|
||||
)
|
@ -0,0 +1,11 @@
|
||||
##### update files
|
||||
|
||||
install(
|
||||
FILES gwenview_thumbnail_size.upd gwenview_1.4_osdformat.upd
|
||||
DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update
|
||||
)
|
||||
|
||||
install(
|
||||
PROGRAMS gwenview_thumbnail_size.sh gwenview_1.4_osdformat.sh
|
||||
DESTINATION ${DATA_INSTALL_DIR}/tdeconf_update
|
||||
)
|
Loading…
Reference in New Issue