diff -Nru k9copy-2.1.0/cmake/FindDvdRead.cmake k9copy-2.2.0/cmake/FindDvdRead.cmake --- k9copy-2.1.0/cmake/FindDvdRead.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/cmake/FindDvdRead.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -MACRO (FINDDVDREAD _include _lib) - -FIND_PATH(DVDREAD_INCLUDE_DIR ${_include} PATHS) -FIND_LIBRARY(DVDREAD_LIBRARY NAMES ${_lib} PATHS ) - -IF (DVDREAD_INCLUDE_DIR AND DVDREAD_LIBRARY) - SET(INC_FOUND TRUE) -ELSE (DVDREAD_INCLUDE_DIR AND DVDREAD_LIBRARY) - SET(INC_FOUND FALSE) -ENDIF (DVDREAD_INCLUDE_DIR AND DVDREAD_LIBRARY) - - -IF (INC_FOUND) - MESSAGE(STATUS "Found library ${_lib}: ${DVDREAD_LIBRARY}") - MESSAGE(STATUS "Found include ${_include} : ${DVDREAD_INCLUDE_DIR}") -ELSE (INC_FOUND) - MESSAGE(FATAL_ERROR "Could not find ${_lib}") -ENDIF (INC_FOUND) -ENDMACRO (FINDDVDREAD _include _lib ) \ No newline at end of file diff -Nru k9copy-2.1.0/cmake/FindLibMpeg2.cmake k9copy-2.2.0/cmake/FindLibMpeg2.cmake --- k9copy-2.1.0/cmake/FindLibMpeg2.cmake 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/cmake/FindLibMpeg2.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,19 @@ +MACRO (FINDLIBMPEG2 _include _lib) + +FIND_PATH(LIBMPEG2_INCLUDE_DIR ${_include} PATHS) +FIND_LIBRARY(LIBMPEG2_LIBRARY NAMES ${_lib} PATHS ) + +IF (LIBMPEG2_INCLUDE_DIR AND LIBMPEG2_LIBRARY) + SET(INC_FOUND TRUE) +ELSE (LIBMPEG2_INCLUDE_DIR AND LIBMPEG2_LIBRARY) + SET(INC_FOUND FALSE) +ENDIF (LIBMPEG2_INCLUDE_DIR AND LIBMPEG2_LIBRARY) + + +IF (INC_FOUND) + MESSAGE(STATUS "Found library ${_lib}: ${LIBMPEG2_LIBRARY}") + MESSAGE(STATUS "Found include ${_include} : ${LIBMPEG2_INCLUDE_DIR}") +ELSE (INC_FOUND) + MESSAGE(FATAL_ERROR "Could not find ${_lib}") +ENDIF (INC_FOUND) +ENDMACRO (FINDLIBMPEG2 _include _lib ) \ No newline at end of file diff -Nru k9copy-2.1.0/cmake_install.cmake k9copy-2.2.0/cmake_install.cmake --- k9copy-2.1.0/cmake_install.cmake 2008-10-27 18:33:06.000000000 +0100 +++ k9copy-2.2.0/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) @@ -32,79 +32,100 @@ SET(CMAKE_INSTALL_SO_NO_EXE "0") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") - FILE(INSTALL DESTINATION "/usr/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9copy") - IF(EXISTS "$ENV{DESTDIR}/usr/bin/k9copy") - IF(CMAKE_INSTALL_DO_STRIP) - EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/bin/k9copy") - ENDIF(CMAKE_INSTALL_DO_STRIP) - ENDIF(EXISTS "$ENV{DESTDIR}/usr/bin/k9copy") - ENDIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") - FILE(INSTALL DESTINATION "/usr/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9play") - IF(EXISTS "$ENV{DESTDIR}/usr/bin/k9play") - IF(CMAKE_INSTALL_DO_STRIP) - EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/bin/k9play") - ENDIF(CMAKE_INSTALL_DO_STRIP) - ENDIF(EXISTS "$ENV{DESTDIR}/usr/bin/k9play") - ENDIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") - FILE(INSTALL DESTINATION "/usr/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9xineplayer") - IF(EXISTS "$ENV{DESTDIR}/usr/bin/k9xineplayer") - IF(CMAKE_INSTALL_DO_STRIP) - EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/bin/k9xineplayer") - ENDIF(CMAKE_INSTALL_DO_STRIP) - ENDIF(EXISTS "$ENV{DESTDIR}/usr/bin/k9xineplayer") - ENDIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg][Ff][Uu][Ll][Ll])$") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9copy") + FILE(RPATH_CHECK + FILE "$ENV{DESTDIR}/usr/local/bin/k9copy" + RPATH "/usr/local/lib") + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9copy") + FILE(INSTALL DESTINATION "/usr/local/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9copy") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9copy") + FILE(RPATH_CHANGE + FILE "$ENV{DESTDIR}/usr/local/bin/k9copy" + OLD_RPATH "::::::::::::::" + NEW_RPATH "/usr/local/lib") + IF(CMAKE_INSTALL_DO_STRIP) + EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/local/bin/k9copy") + ENDIF(CMAKE_INSTALL_DO_STRIP) + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9copy") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9play") + FILE(RPATH_CHECK + FILE "$ENV{DESTDIR}/usr/local/bin/k9play" + RPATH "/usr/local/lib") + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9play") + FILE(INSTALL DESTINATION "/usr/local/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9play") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9play") + FILE(RPATH_CHANGE + FILE "$ENV{DESTDIR}/usr/local/bin/k9play" + OLD_RPATH "::::::::::::::" + NEW_RPATH "/usr/local/lib") + IF(CMAKE_INSTALL_DO_STRIP) + EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/local/bin/k9play") + ENDIF(CMAKE_INSTALL_DO_STRIP) + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9play") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9xineplayer") + FILE(RPATH_CHECK + FILE "$ENV{DESTDIR}/usr/local/bin/k9xineplayer" + RPATH "/usr/local/lib") + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9xineplayer") + FILE(INSTALL DESTINATION "/usr/local/bin" TYPE EXECUTABLE FILES "/home/jmp/svn/k9copy/kde4/k9xineplayer") + IF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9xineplayer") + FILE(RPATH_CHANGE + FILE "$ENV{DESTDIR}/usr/local/bin/k9xineplayer" + OLD_RPATH "::::::::::::::" + NEW_RPATH "/usr/local/lib") + IF(CMAKE_INSTALL_DO_STRIP) + EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/local/bin/k9xineplayer") + ENDIF(CMAKE_INSTALL_DO_STRIP) + ENDIF(EXISTS "$ENV{DESTDIR}/usr/local/bin/k9xineplayer") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/applications/kde4" TYPE FILE FILES +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/applications/kde4" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copy.desktop" "/home/jmp/svn/k9copy/kde4/k9copy_assistant.desktop" ) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copyui.rc") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copyui.rc") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/solid/actions" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copy_open.desktop") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/solid/actions" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copy_open.desktop") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/solid/actions" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copy_assistant_open.desktop") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/solid/actions" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/k9copy_assistant_open.desktop") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/icons/hicolor/48x48/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi48-app-k9copy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/icons/hicolor/48x48/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi48-app-k9copy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/icons/hicolor/32x32/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi32-app-k9copy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/icons/hicolor/32x32/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi32-app-k9copy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/icons/hicolor/16x16/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi16-app-k9copy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/icons/hicolor/16x16/apps/." TYPE FILE RENAME "k9copy.png" FILES "/home/jmp/svn/k9copy/kde4/hi16-app-k9copy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") set(DESTDIR_VALUE "$ENV{DESTDIR}") if (NOT DESTDIR_VALUE) - file(WRITE "/usr/share/icons/hicolor/temp.txt" "update") - file(REMOVE "/usr/share/icons/hicolor/temp.txt") + file(WRITE "/usr/local/share/icons/hicolor/temp.txt" "update") + file(REMOVE "/usr/local/share/icons/hicolor/temp.txt") endif (NOT DESTDIR_VALUE) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. diff -Nru k9copy-2.1.0/CMakeLists.txt k9copy-2.2.0/CMakeLists.txt --- k9copy-2.1.0/CMakeLists.txt 2008-10-30 21:29:03.000000000 +0100 +++ k9copy-2.2.0/CMakeLists.txt 2009-02-19 22:30:17.000000000 +0100 @@ -10,13 +10,13 @@ INCLUDE(CheckTypeSize) INCLUDE(CMakeDetermineSystem) INCLUDE(CheckIncludeFiles) -INCLUDE(FindDvdRead) +INCLUDE(FindLibMpeg2) INCLUDE(FindXine) INCLUDE(FindAvcodec) INCLUDE(FindAvformat) INCLUDE(FindFFmpegScale) -set (VERSION 2.1.0) +set (VERSION 2.2.0) ######################################## @@ -107,7 +107,7 @@ ######################################## MESSAGE(STATUS "Checking dependencies" ) FINDXINE("xine.h" "xine") -#FINDDVDREAD("dvdread/ifo_types.h" "dvdread") +FINDLIBMPEG2("mpeg2dec/mpeg2.h" "mpeg2") FINDAVCODEC("avcodec") FINDAVFORMAT("avformat") @@ -137,12 +137,14 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/mplayer ${CMAKE_CURRENT_SOURCE_DIR}/src/assistant ${CMAKE_CURRENT_SOURCE_DIR}/src/import + ${CMAKE_CURRENT_SOURCE_DIR}/src/player + ${CMAKE_CURRENT_SOURCE_DIR}/src/subtitles ${KDE4_INCLUDES} ${QT_INCLUDES} ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${FFMPEGSCALE_INCLUDE_DIR} - ${FFMPEG_INCLUDE_DIR} - ) + ${FFMPEG_INCLUDE_DIR} +) set (devices_SRCS @@ -158,6 +160,10 @@ src/dvdread/nav_read.c ) +set (subtitles_SRCS + src/subtitles/k9subtitle2pgm.cpp +) + set (libdvdnav_SRCS src/dvdnav/decoder.c src/dvdnav/dvdnav.c @@ -217,35 +223,37 @@ src/backup/k9mp4enc.cpp src/backup/k9mp4dlg.cpp src/backup/k9execcopy.cpp + src/backup/k9convertaudio.cpp ) + kde4_add_ui_files(backup_SRCS src/backup/backupdlg.ui src/backup/mp4dlg.ui ) set (mpeg2_SRCS - src/mpeg2/alloc.cpp - src/mpeg2/cpu_accel.cpp - src/mpeg2/cpu_state.cpp - src/mpeg2/decode.cpp - src/mpeg2/header.cpp - src/mpeg2/idct_alpha.cpp - src/mpeg2/idct_altivec.cpp - src/mpeg2/idct.cpp - src/mpeg2/idct_mmx.cpp +# src/mpeg2/alloc.cpp + # src/mpeg2/cpu_accel.cpp +# src/mpeg2/cpu_state.cpp +# src/mpeg2/decode.cpp +# src/mpeg2/header.cpp +# src/mpeg2/idct_alpha.cpp +# src/mpeg2/idct_altivec.cpp +# src/mpeg2/idct.cpp +# src/mpeg2/idct_mmx.cpp src/mpeg2/k9decodethread.cpp src/mpeg2/k9plaympeg2.cpp src/mpeg2/kdecmpeg2.cpp - src/mpeg2/motion_comp_alpha.cpp - src/mpeg2/motion_comp_altivec.cpp - src/mpeg2/motion_comp.cpp - src/mpeg2/motion_comp_mmx.cpp - src/mpeg2/motion_comp_vis.cpp - src/mpeg2/rgb.cpp - src/mpeg2/rgb_mmx.cpp - src/mpeg2/rgb_vis.cpp - src/mpeg2/slice.cpp - src/mpeg2/uyvy.cpp +# src/mpeg2/motion_comp_alpha.cpp +# src/mpeg2/motion_comp_altivec.cpp +# src/mpeg2/motion_comp.cpp +# src/mpeg2/motion_comp_mmx.cpp +# src/mpeg2/motion_comp_vis.cpp +# src/mpeg2/rgb.cpp +# src/mpeg2/rgb_mmx.cpp +# src/mpeg2/rgb_vis.cpp +# src/mpeg2/slice.cpp +# src/mpeg2/uyvy.cpp ) set (mplayer_SRCS @@ -321,9 +329,11 @@ src/main/k9prefdvd.cpp src/main/k9prefmencoder.cpp src/main/k9mencodercmdgen.cpp + src/main/k9ffmpegcmdgen.cpp src/main/k9prefmpeg4.cpp src/main/k9prefpreview.cpp src/main/k9prefauthor.cpp + src/player/k9play.cpp ) set (player_SRCS @@ -344,6 +354,7 @@ src/main/viewmpeg2.ui src/main/titlefactor.ui src/main/mencoderCmdGen.ui + src/main/ffmpegCmdGen.ui ) @@ -353,6 +364,7 @@ ${core_SRCS} ${vamps_SRCS} ${mpeg2_SRCS} + ${subtitles_SRCS} ) set(k9copy_SRCS @@ -378,7 +390,7 @@ kde4_add_library(k9copylib STATIC ${k9copylib_SRCS}) -target_link_libraries(k9copylib ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} -lkdesu) +target_link_libraries(k9copylib ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} -lkdesu -lmpeg2 -lmpeg2convert ) kde4_add_ui_files(k9copy_SRCS ) #kde4_add_kcfg_files(k9copy_SRCS settings.kcfgc ) @@ -386,7 +398,7 @@ kde4_add_executable(k9play ${k9play_SRCS}) kde4_add_executable(k9xineplayer ${k9xineplayer_SRCS}) -target_link_libraries(k9copy k9copylib ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} -lkfile -lphonon ) +target_link_libraries(k9copy k9copylib ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} -lphonon ) target_link_libraries(k9play k9copylib ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} ) target_link_libraries(k9xineplayer ${KDE4_KDEUI_LIBS} ${KDE4_KDE3SUPPORT_LIBS} -lxine ) @@ -409,7 +421,7 @@ ############package############### SET(CPACK_PACKAGE_VERSION_MAJOR "2") -SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_MINOR "2") SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_PACKAGE_NAME "k9copy") SET(CPACK_SOURCE_IGNORE_FILES @@ -418,6 +430,7 @@ "\\\\.moc" "\\\\.gmo" "k9copy$" +"k9play$" "k9xineplayer$" "ui_" "\\\\.gz" @@ -427,6 +440,7 @@ "\\\\kdevelop" "\\\\automoc" "Makefile$" +"TODO" "CMakeCache.txt" "/CVS/" "/CMakeTmp/" diff -Nru k9copy-2.1.0/config.h k9copy-2.2.0/config.h --- k9copy-2.1.0/config.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/config.h 2009-02-19 22:30:17.000000000 +0100 @@ -1,7 +1,7 @@ #ifndef CONFIG_H #define CONFIG_H -#define VERSION "2.1.0" +#define VERSION "2.2.0" /* Big endian CPU - SPARC or PowerPC */ /* #undef ADM_BIG_ENDIAN */ diff -Nru k9copy-2.1.0/CPackConfig.cmake k9copy-2.2.0/CPackConfig.cmake --- k9copy-2.1.0/CPackConfig.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/CPackConfig.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -37,6 +37,7 @@ SET(CPACK_BINARY_STGZ "ON") SET(CPACK_BINARY_TBZ2 "ON") SET(CPACK_BINARY_TGZ "ON") +SET(CPACK_BINARY_TXZ "OFF") SET(CPACK_BINARY_TZ "ON") SET(CPACK_BINARY_ZIP "") SET(CPACK_CMAKE_GENERATOR "Unix Makefiles") @@ -44,35 +45,36 @@ SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") SET(CPACK_GENERATOR "STGZ;TGZ;TBZ2;TZ") SET(CPACK_INSTALL_CMAKE_PROJECTS "/home/jmp/svn/k9copy/kde4;k9copy;ALL;/") -SET(CPACK_INSTALL_PREFIX "/usr") +SET(CPACK_INSTALL_PREFIX "/usr/local") SET(CPACK_MODULE_PATH "/home/jmp/svn/k9copy/kde4/cmake;/usr/share/apps/cmake/modules") -SET(CPACK_NSIS_DISPLAY_NAME "k9copy 2.1.0") +SET(CPACK_NSIS_DISPLAY_NAME "k9copy 2.2.0") SET(CPACK_NSIS_INSTALLER_ICON_CODE "") SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") SET(CPACK_OUTPUT_CONFIG_FILE "/home/jmp/svn/k9copy/kde4/CPackConfig.cmake") SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-2.6/Templates/CPack.GenericDescription.txt") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "k9copy built using CMake") -SET(CPACK_PACKAGE_FILE_NAME "k9copy-2.1.0-Linux") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "k9copy 2.1.0") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "k9copy 2.1.0") +SET(CPACK_PACKAGE_FILE_NAME "k9copy-2.2.0-Linux") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "k9copy 2.2.0") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "k9copy 2.2.0") SET(CPACK_PACKAGE_NAME "k9copy") SET(CPACK_PACKAGE_RELOCATABLE "true") SET(CPACK_PACKAGE_VENDOR "Humanity") -SET(CPACK_PACKAGE_VERSION "2.1.0") +SET(CPACK_PACKAGE_VERSION "2.2.0") SET(CPACK_PACKAGE_VERSION_MAJOR "2") -SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_MINOR "2") SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-2.6/Templates/CPack.GenericLicense.txt") SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-2.6/Templates/CPack.GenericDescription.txt") SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-2.6/Templates/CPack.GenericWelcome.txt") SET(CPACK_SET_DESTDIR "OFF") SET(CPACK_SOURCE_CYGWIN "") -SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;TZ") -SET(CPACK_SOURCE_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") +SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;TXZ;TZ") +SET(CPACK_SOURCE_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9play$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;TODO;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/home/jmp/svn/k9copy/kde4/CPackSourceConfig.cmake") SET(CPACK_SOURCE_TBZ2 "ON") SET(CPACK_SOURCE_TGZ "ON") +SET(CPACK_SOURCE_TXZ "ON") SET(CPACK_SOURCE_TZ "ON") SET(CPACK_SOURCE_ZIP "OFF") SET(CPACK_SYSTEM_NAME "Linux") diff -Nru k9copy-2.1.0/CPackSourceConfig.cmake k9copy-2.2.0/CPackSourceConfig.cmake --- k9copy-2.1.0/CPackSourceConfig.cmake 2008-10-27 18:33:06.000000000 +0100 +++ k9copy-2.2.0/CPackSourceConfig.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -37,47 +37,49 @@ SET(CPACK_BINARY_STGZ "ON") SET(CPACK_BINARY_TBZ2 "ON") SET(CPACK_BINARY_TGZ "ON") +SET(CPACK_BINARY_TXZ "OFF") SET(CPACK_BINARY_TZ "ON") SET(CPACK_BINARY_ZIP "") SET(CPACK_CMAKE_GENERATOR "Unix Makefiles") SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") -SET(CPACK_GENERATOR "TGZ;TBZ2;TZ") -SET(CPACK_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") +SET(CPACK_GENERATOR "TGZ;TBZ2;TXZ;TZ") +SET(CPACK_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9play$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;TODO;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") SET(CPACK_INSTALLED_DIRECTORIES "/home/jmp/svn/k9copy/kde4;/") SET(CPACK_INSTALL_CMAKE_PROJECTS "") -SET(CPACK_INSTALL_PREFIX "/usr") +SET(CPACK_INSTALL_PREFIX "/usr/local") SET(CPACK_MODULE_PATH "/home/jmp/svn/k9copy/kde4/cmake;/usr/share/apps/cmake/modules") -SET(CPACK_NSIS_DISPLAY_NAME "k9copy 2.1.0") +SET(CPACK_NSIS_DISPLAY_NAME "k9copy 2.2.0") SET(CPACK_NSIS_INSTALLER_ICON_CODE "") SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") SET(CPACK_OUTPUT_CONFIG_FILE "/home/jmp/svn/k9copy/kde4/CPackConfig.cmake") SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") SET(CPACK_PACKAGE_DESCRIPTION_FILE "/usr/share/cmake-2.6/Templates/CPack.GenericDescription.txt") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "k9copy built using CMake") -SET(CPACK_PACKAGE_FILE_NAME "k9copy-2.1.0-Source") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "k9copy 2.1.0") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "k9copy 2.1.0") +SET(CPACK_PACKAGE_FILE_NAME "k9copy-2.2.0-Source") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "k9copy 2.2.0") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "k9copy 2.2.0") SET(CPACK_PACKAGE_NAME "k9copy") SET(CPACK_PACKAGE_RELOCATABLE "true") SET(CPACK_PACKAGE_VENDOR "Humanity") -SET(CPACK_PACKAGE_VERSION "2.1.0") +SET(CPACK_PACKAGE_VERSION "2.2.0") SET(CPACK_PACKAGE_VERSION_MAJOR "2") -SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_MINOR "2") SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_RESOURCE_FILE_LICENSE "/usr/share/cmake-2.6/Templates/CPack.GenericLicense.txt") SET(CPACK_RESOURCE_FILE_README "/usr/share/cmake-2.6/Templates/CPack.GenericDescription.txt") SET(CPACK_RESOURCE_FILE_WELCOME "/usr/share/cmake-2.6/Templates/CPack.GenericWelcome.txt") SET(CPACK_SET_DESTDIR "OFF") SET(CPACK_SOURCE_CYGWIN "") -SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;TZ") -SET(CPACK_SOURCE_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") +SET(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;TXZ;TZ") +SET(CPACK_SOURCE_IGNORE_FILES "moc_;\\.a;\\.moc;\\.gmo;k9copy$;k9play$;k9xineplayer$;ui_;\\.gz;\\.tar.Z;\\.tar.bz2;\\~$;\\kdevelop;\\automoc;Makefile$;TODO;CMakeCache.txt;/CVS/;/CMakeTmp/;/CMakeFiles/;/_CPack_Packages/;/templates/;/\\.svn/;\\.swp$;\\.#;/#") SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "/home/jmp/svn/k9copy/kde4;/") SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/home/jmp/svn/k9copy/kde4/CPackSourceConfig.cmake") -SET(CPACK_SOURCE_PACKAGE_FILE_NAME "k9copy-2.1.0-Source") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "k9copy-2.2.0-Source") SET(CPACK_SOURCE_TBZ2 "ON") SET(CPACK_SOURCE_TGZ "ON") SET(CPACK_SOURCE_TOPLEVEL_TAG "Linux-Source") +SET(CPACK_SOURCE_TXZ "ON") SET(CPACK_SOURCE_TZ "ON") SET(CPACK_SOURCE_ZIP "OFF") SET(CPACK_STRIP_FILES "") diff -Nru k9copy-2.1.0/data/cmake_install.cmake k9copy-2.2.0/data/cmake_install.cmake --- k9copy-2.1.0/data/cmake_install.cmake 2008-10-27 18:33:06.000000000 +0100 +++ k9copy-2.2.0/data/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) @@ -32,10 +32,10 @@ SET(CMAKE_INSTALL_SO_NO_EXE "0") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy" TYPE FILE FILES +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy" TYPE FILE FILES "/home/jmp/svn/k9copy/kde4/data/anim.mng" "/home/jmp/svn/k9copy/kde4/data/mencoder.xml" ) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") diff -Nru k9copy-2.1.0/debian/changelog k9copy-2.2.0/debian/changelog --- k9copy-2.1.0/debian/changelog 2009-03-09 20:59:59.000000000 +0100 +++ k9copy-2.2.0/debian/changelog 2009-03-09 20:59:59.000000000 +0100 @@ -1,3 +1,14 @@ +k9copy (2.2.0-0ubuntu1) jaunty; urgency=low + + * New upstream release (LP: #339688) + * Bump kdelibs5-dev to 4.2.1 + * Drop cmake, quilt, libphonon-dev, libqt4-opengl-dev are no longer need + * Add libmpeg2-4-dev to build-deps + * Add mkvtoolnix to depends, to support of matroska files, add twolame and + mjpegtools to fix missing depends for dvdauthor + + -- Alessandro Ghersi Sun, 08 Mar 2009 21:38:13 +0100 + k9copy (2.1.0-0ubuntu2) jaunty; urgency=low * No change rebuild to build with latest libdvdread. (LP: #330684). diff -Nru k9copy-2.1.0/debian/control k9copy-2.2.0/debian/control --- k9copy-2.1.0/debian/control 2009-03-09 20:59:59.000000000 +0100 +++ k9copy-2.2.0/debian/control 2009-03-09 20:59:59.000000000 +0100 @@ -3,16 +3,16 @@ Priority: optional Maintainer: Ubuntu MOTU Developers XSBC-Original-Maintainer: Anthony Mercatante -Build-Depends: debhelper (>= 6), cmake, quilt, kdelibs5-dev (>= 4:4.1.85), - libxss-dev, cdbs, libphonon-dev, libdvdread-dev, libdbus-1-dev, libhal-dev, - libhal-storage-dev, libavformat-dev, libxine-dev, libqt4-opengl-dev +Build-Depends: debhelper (>= 6), kdelibs5-dev (>= 4:4.2.1), libxss-dev, cdbs, + libdvdread-dev, libdbus-1-dev, libhal-dev, libhal-storage-dev, + libavformat-dev, libxine-dev, libmpeg2-4-dev Standards-Version: 3.8.0 Homepage: http://k9copy.sourceforge.net/ Package: k9copy Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, vamps, dvd+rw-tools, dvdauthor, - mencoder, libdvdnav4 + mencoder, libdvdnav4, mkvtoolnix, mjpegtools, twolame Description: DVD backup tool for KDE k9copy is a tabbed tool that allows to copy of one or more titles from a DVD9 to a DVD5, in the same way than DVDShrink for Microsoft Windows (R). diff -Nru k9copy-2.1.0/.directory k9copy-2.2.0/.directory --- k9copy-2.1.0/.directory 2008-10-30 23:03:15.000000000 +0100 +++ k9copy-2.2.0/.directory 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -[Dolphin] -Timestamp=2008,10,30,23,3,15 diff -Nru k9copy-2.1.0/icons/cmake_install.cmake k9copy-2.2.0/icons/cmake_install.cmake --- k9copy-2.1.0/icons/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/icons/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) @@ -32,97 +32,97 @@ SET(CMAKE_INSTALL_SO_NO_EXE "0") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mencoder.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mencoder.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mpeg.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-mpeg.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "video.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-video.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "title.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-title.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-mpeg.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-author.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mp4.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-mpeg.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-mp4.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-dvdcopy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-dvdcopy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "sound.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-sound.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "cycle.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-cycle.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-author.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "subtitle.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-subtitle.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-dvdcopy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-dvdcopy.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-author.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-mp4.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-mp4.png") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mencoder.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mencoder.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mpeg.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-mpeg.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "video.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-video.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "title.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-title.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-mpeg.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-author.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-mp4.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "mpeg.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-mpeg.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-mp4.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-dvdcopy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-dvdcopy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "sound.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-sound.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "cycle.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-cycle.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-author.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/22x22/actions/." TYPE FILE RENAME "subtitle.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi22-action-subtitle.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-dvdcopy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/48x48/actions/." TYPE FILE RENAME "dvdcopy.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi48-action-dvdcopy.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "author.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-author.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/32x32/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi32-action-mp4.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/apps/k9copy/icons/hicolor/16x16/actions/." TYPE FILE RENAME "mp4.png" FILES "/home/jmp/svn/k9copy/kde4/icons/hi16-action-mp4.png") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") set(DESTDIR_VALUE "$ENV{DESTDIR}") if (NOT DESTDIR_VALUE) - file(WRITE "/usr/share/icons/hicolor/temp.txt" "update") - file(REMOVE "/usr/share/icons/hicolor/temp.txt") + file(WRITE "/usr/local/share/icons/hicolor/temp.txt" "update") + file(REMOVE "/usr/local/share/icons/hicolor/temp.txt") endif (NOT DESTDIR_VALUE) -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") diff -Nru k9copy-2.1.0/install_manifest.txt k9copy-2.2.0/install_manifest.txt --- k9copy-2.1.0/install_manifest.txt 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/install_manifest.txt 2009-02-19 22:30:17.000000000 +0100 @@ -37,13 +37,13 @@ /usr/share/locale/fr/LC_MESSAGES/k9copy.mo /usr/share/locale/nl/LC_MESSAGES/k9copy.mo /usr/share/locale/pl/LC_MESSAGES/k9copy.mo -/usr/share/locale/sr@latin/LC_MESSAGES/k9copy.mo /usr/share/locale/sr/LC_MESSAGES/k9copy.mo /usr/share/locale/es/LC_MESSAGES/k9copy.mo /usr/share/locale/de/LC_MESSAGES/k9copy.mo /usr/share/locale/it/LC_MESSAGES/k9copy.mo /usr/share/locale/zh_TW/LC_MESSAGES/k9copy.mo /usr/share/locale/ca/LC_MESSAGES/k9copy.mo +/usr/share/locale/sr@Latn/LC_MESSAGES/k9copy.mo /usr/share/locale/es_AR/LC_MESSAGES/k9copy.mo /usr/share/locale/ru/LC_MESSAGES/k9copy.mo /usr/share/locale/el/LC_MESSAGES/k9copy.mo diff -Nru k9copy-2.1.0/k9copy.kdevses k9copy-2.2.0/k9copy.kdevses --- k9copy-2.1.0/k9copy.kdevses 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/k9copy.kdevses 2009-02-19 22:30:17.000000000 +0100 @@ -1,65 +1,44 @@ - - - + + + - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - - - - - - @@ -73,10 +52,10 @@ - + - + Binary files /tmp/aJ4k8EysZ3/k9copy-2.1.0/k9play and /tmp/hIaLgwwAcc/k9copy-2.2.0/k9play differ diff -Nru k9copy-2.1.0/k9xineplayer.shell k9copy-2.2.0/k9xineplayer.shell --- k9copy-2.1.0/k9xineplayer.shell 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/k9xineplayer.shell 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -#!/bin/sh -# created by cmake, don't edit, changes will be lost - -LD_LIBRARY_PATH=/home/jmp/svn/k9copy/kde4/lib/./:/usr/lib:/usr/lib:/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "/home/jmp/svn/k9copy/kde4/k9xineplayer" "$@" diff -Nru k9copy-2.1.0/.kdev4/kde4.kdev4 k9copy-2.2.0/.kdev4/kde4.kdev4 --- k9copy-2.1.0/.kdev4/kde4.kdev4 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/.kdev4/kde4.kdev4 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,13 @@ +[Buildset] +Number of Builditems=0 + +[CMake] +BuildDirs=/home/jmp/svn/k9copy/kde4/build +CMakeDir=/usr/share/cmake-2.6/Modules +Current CMake binary=file:///usr/bin/cmake +CurrentBuildDir=file:///home/jmp/svn/k9copy/kde4/build +CurrentInstallDir=file:///usr +ProjectRootRelative=./ + +[Project] +VersionControlSupport=kdevsubversion diff -Nru k9copy-2.1.0/main.cpp k9copy-2.2.0/main.cpp --- k9copy-2.1.0/main.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/main.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -34,6 +34,8 @@ #include #include #include + + static const char description[] = I18N_NOOP("A DVD Backup software for KDE"); diff -Nru k9copy-2.1.0/po/cmake_install.cmake k9copy-2.2.0/po/cmake_install.cmake --- k9copy-2.1.0/po/cmake_install.cmake 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/po/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) @@ -32,67 +32,67 @@ SET(CMAKE_INSTALL_SO_NO_EXE "0") ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/tr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/tr.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/cs/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/cs.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/fr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/fr.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/nl/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/nl.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/pl/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/pl.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/sr@latin/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/sr@latin.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/sr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/sr.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/es/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/es.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/de/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/de.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/it/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/it.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/zh_TW/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/zh_TW.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/ca/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/ca.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/es_AR/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/es_AR.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/ru/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/ru.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/el/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/el.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - -IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") - FILE(INSTALL DESTINATION "/usr/share/locale/pt_BR/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/pt_BR.gmo") -ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$") +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/tr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/tr.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/cs/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/cs.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/fr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/fr.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/nl/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/nl.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/pl/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/pl.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/sr/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/sr.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/es/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/es.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/de/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/de.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/it/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/it.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/zh_TW/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/zh_TW.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/ca/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/ca.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/sr@Latn/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/sr@Latn.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/es_AR/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/es_AR.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/ru/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/ru.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/el/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/el.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + +IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") + FILE(INSTALL DESTINATION "/usr/local/share/locale/pt_BR/LC_MESSAGES" TYPE FILE RENAME "k9copy.mo" FILES "/home/jmp/svn/k9copy/kde4/po/pt_BR.gmo") +ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified") diff -Nru k9copy-2.1.0/po/fr.po k9copy-2.2.0/po/fr.po --- k9copy-2.1.0/po/fr.po 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/po/fr.po 2009-02-19 22:30:17.000000000 +0100 @@ -5,7 +5,7 @@ "Project-Id-Version: fr\n" "Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?" "group_id=50231&atid=459007\n" -"POT-Creation-Date: 2008-10-12 09:38+0200\n" +"POT-Creation-Date: 2009-02-17 13:06+0100\n" "PO-Revision-Date: 2007-07-24 09:24+0200\n" "Last-Translator: Jean-Michel Petit \n" "Language-Team: \n" @@ -14,14 +14,13 @@ "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" -#: lib/player/k9play.cpp:75 src/player/k9play.cpp:74 +#: lib/player/k9play.cpp:75 src/player/k9play.cpp:79 msgid "MPEG-4 Encoding cancelled" msgstr "L'encodage MPEG-4 a été annulé" -#: lib/player/k9play.cpp:75 src/backup/k9execcopy.cpp:106 -#: src/backup/k9execcopy.cpp:172 src/main/k9main.cpp:1086 -#: src/main/k9main.cpp:1155 src/main/k9settings.cpp:45 -#: src/player/k9play.cpp:74 +#: lib/player/k9play.cpp:75 src/backup/k9execcopy.cpp:120 +#: src/backup/k9execcopy.cpp:309 src/main/k9settings.cpp:45 +#: src/player/k9play.cpp:79 msgid "MPEG-4 Encoding" msgstr "Encodage MPEG-4" @@ -29,7 +28,7 @@ msgid "A KDE 4 Application" msgstr "" -#: lib/player/main.cpp:41 main.cpp:43 src/player/main.cpp:41 +#: lib/player/main.cpp:41 main.cpp:45 src/player/main.cpp:41 #: src/xine/main.cpp:40 msgid "k9copy" msgstr "k9copy" @@ -42,28 +41,25 @@ msgid "Jean-Michel" msgstr "" -#: lib/player/main.cpp:44 main.cpp:46 src/player/main.cpp:44 +#: lib/player/main.cpp:44 main.cpp:48 src/player/main.cpp:44 #: src/xine/main.cpp:43 msgid "_: NAME OF TRANSLATORS\\nYour names" msgstr "Jean-Michel Petit" -#: lib/player/main.cpp:45 main.cpp:47 src/player/main.cpp:45 +#: lib/player/main.cpp:45 main.cpp:49 src/player/main.cpp:45 #: src/xine/main.cpp:44 msgid "_: EMAIL OF TRANSLATORS\\nYour emails" msgstr "jm_petit@laposte.net" -#. i18n: file: src/main/k9mainw.ui:49 -#. i18n: ectx: property (text), widget (QLabel, lblInput) -#: lib/player/main.cpp:49 main.cpp:51 po/rc.cpp:321 src/player/main.cpp:49 -#: ui_k9mainw.h:183 rc.cpp:321 +#: lib/player/main.cpp:49 main.cpp:53 src/player/main.cpp:49 ui_k9mainw.h:183 msgid "input device" msgstr "Lecteur source" -#: lib/player/main.cpp:50 main.cpp:52 src/player/main.cpp:50 +#: lib/player/main.cpp:50 main.cpp:54 src/player/main.cpp:50 msgid "output device" msgstr "Graveur" -#: lib/player/main.cpp:51 main.cpp:53 src/player/main.cpp:51 +#: lib/player/main.cpp:51 main.cpp:55 src/player/main.cpp:51 msgid "title to play" msgstr "titre à jouer" @@ -143,2886 +139,2516 @@ msgid "save cell in a temporary file before encoding" msgstr "sauvegarde de la cellule dans un fichier temporaire avant l'encodage" -#: main.cpp:38 +#: main.cpp:40 msgid "A DVD Backup software for KDE" msgstr "Un logiciel de backup de DVD pour KDE" -#: main.cpp:44 +#: main.cpp:46 msgid "(C) 2007 Jean-Michel PETIT" msgstr "" -#: main.cpp:45 +#: main.cpp:47 msgid "Jean-Michel PETIT" msgstr "" -#: main.cpp:54 +#: main.cpp:56 msgid "use GTK file dialogs" msgstr "utiliser les boite de dialogues GTK" -#: main.cpp:55 +#: main.cpp:57 msgid "the k9copy backup assistant" msgstr "L'assistant au backup de k9copy" -#. i18n: file: k9copyui.rc:4 -#. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 -msgid "&File" -msgstr "&Fichier" - -#. i18n: file: k9copyui.rc:10 -#. i18n: ectx: Menu (Actions) -#: po/rc.cpp:6 rc.cpp:6 -msgid "A&ctions" -msgstr "A&ctions" - -#. i18n: file: k9copyui.rc:27 -#. i18n: ectx: ToolBar (mainToolBar) -#: po/rc.cpp:9 rc.cpp:9 -msgid "Actions ToolBar" -msgstr "Barre d'outils Actions" - -#. i18n: file: src/assistant/astdestination.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDestination) -#. i18n: file: src/assistant/astdvdoption.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDVDOption) -#. i18n: file: src/assistant/astmp4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMp4) -#. i18n: file: src/assistant/astmpeg.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMpeg) -#. i18n: file: src/assistant/astsource.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astSource) -#. i18n: file: src/assistant/aststreams.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astStreams) -#. i18n: file: src/assistant/asttitles.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astTitles) -#. i18n: file: src/mplayer/phonon.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, phonon) -#. i18n: file: src/assistant/astdestination.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDestination) -#. i18n: file: src/assistant/astdvdoption.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDVDOption) -#. i18n: file: src/assistant/astmp4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMp4) -#. i18n: file: src/assistant/astmpeg.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMpeg) -#. i18n: file: src/assistant/astsource.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astSource) -#. i18n: file: src/assistant/aststreams.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astStreams) -#. i18n: file: src/assistant/asttitles.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astTitles) -#. i18n: file: src/mplayer/phonon.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, phonon) -#: po/rc.cpp:12 po/rc.cpp:33 po/rc.cpp:45 po/rc.cpp:51 po/rc.cpp:57 -#: po/rc.cpp:69 po/rc.cpp:78 po/rc.cpp:758 ui_astdestination.h:168 -#: ui_astdvdoption.h:88 ui_astmp4.h:72 ui_astmpeg.h:72 ui_astsource.h:113 -#: ui_aststreams.h:53 ui_asttitles.h:69 ui_phonon.h:74 rc.cpp:12 rc.cpp:33 -#: rc.cpp:45 rc.cpp:51 rc.cpp:57 rc.cpp:69 rc.cpp:78 rc.cpp:758 -msgid "Form" +#: po/rc.cpp:1 rc.cpp:1 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:25 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVD) -#: po/rc.cpp:15 src/import/k9importfiles.cpp:162 src/main/k9settings.cpp:35 -#: ui_astdestination.h:170 rc.cpp:15 -msgid "DVD Backup" -msgstr "Sauvegarde de DVD" - -#. i18n: file: src/assistant/astdestination.ui:56 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDDisc) -#: po/rc.cpp:18 ui_astdestination.h:172 rc.cpp:18 -msgid "to Disc" -msgstr "sur disque" +#: po/rc.cpp:2 rc.cpp:2 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" -#. i18n: file: src/assistant/astdestination.ui:78 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDFolder) -#: po/rc.cpp:21 ui_astdestination.h:173 rc.cpp:21 -msgid "to Folder" -msgstr "vers un dossier" +#: src/assistant/k9assistant.cpp:43 +msgid "DVD backup assistant" +msgstr "Assistant de backup de DVD" -#. i18n: file: src/assistant/astdestination.ui:94 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDIso) -#: po/rc.cpp:24 ui_astdestination.h:174 rc.cpp:24 -msgid "to Iso image" -msgstr "vers une image Iso" +#: src/assistant/k9assistant.cpp:47 +msgid "source" +msgstr "source" -#. i18n: file: src/assistant/astdestination.ui:113 -#. i18n: ectx: property (text), widget (QRadioButton, rbAvi) -#: po/rc.cpp:27 ui_astdestination.h:175 rc.cpp:27 -msgid "Rip and encode DVD" -msgstr "Extraire et encoder le DVD" +#: src/assistant/k9assistant.cpp:48 +msgid "Select the source of the backup" +msgstr "Sélectionnez la source du backup" -#. i18n: file: src/assistant/astdestination.ui:132 -#. i18n: ectx: property (text), widget (QRadioButton, rbMpeg) -#: po/rc.cpp:30 ui_astdestination.h:176 rc.cpp:30 -msgid "Rip DVD without encoding" -msgstr "Extraire le DVD sans encoder" +#: src/assistant/k9assistant.cpp:54 +msgid "destination" +msgstr "destination" -#. i18n: file: src/assistant/astdvdoption.ui:25 -#. i18n: ectx: property (text), widget (QRadioButton, rbMenu) -#: po/rc.cpp:36 ui_astdvdoption.h:90 rc.cpp:36 -msgid "Copy original menus" -msgstr "Copier les menus originaux" +#: src/assistant/k9assistant.cpp:55 +msgid "Select the destination of the backup" +msgstr "Sélectionnez la destination du backup" -#. i18n: file: src/assistant/astdvdoption.ui:32 -#. i18n: ectx: property (text), widget (QRadioButton, radioButton_2) -#: po/rc.cpp:39 ui_astdvdoption.h:91 rc.cpp:39 -msgid "Don't copy menus." -msgstr "Ne pas copier les menus" +#: src/assistant/k9assistant.cpp:60 ui_asttitles.h:72 +msgid "titles" +msgstr "titres" -#. i18n: file: src/assistant/astdvdoption.ui:39 -#. i18n: ectx: property (title), widget (QGroupBox, gbTitles) -#: po/rc.cpp:42 ui_astdvdoption.h:92 rc.cpp:42 -msgid "Drag items to set title playing sequence" -msgstr "Déplacer les éléments de la liste pour définir l'ordre de lecture" +#: src/assistant/k9assistant.cpp:61 +msgid "Select the titles you want to copy" +msgstr "Sélectionnez les titres que vous voulez copier" -#. i18n: file: src/assistant/astmp4.ui:25 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:48 ui_astmp4.h:73 rc.cpp:48 -msgid "Encoding options for title " -msgstr "Options d'encodage pour le titre" +#: src/assistant/k9assistant.cpp:68 +msgid "streams" +msgstr "flux" -#. i18n: file: src/assistant/astmpeg.ui:25 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:54 ui_astmpeg.h:73 rc.cpp:54 -msgid "Select options for title" -msgstr "Sélectionnez les options du titre" +#: src/assistant/k9assistant.cpp:69 +msgid "Select the streams you want to keep" +msgstr "Sélectionnez les flux que vous voulez conserver" -#. i18n: file: src/assistant/astsource.ui:31 -#. i18n: ectx: property (text), widget (QRadioButton, rbDrive) -#: po/rc.cpp:60 ui_astsource.h:115 rc.cpp:60 -msgid "DVD Drive" -msgstr "Lecteur DVD" +#: src/assistant/k9assistant.cpp:75 +msgid "mp4" +msgstr "" -#. i18n: file: src/assistant/astsource.ui:50 -#. i18n: ectx: property (text), widget (QRadioButton, rbFolder) -#: po/rc.cpp:63 src/import/k9import.cpp:88 src/main/k9main.cpp:1259 -#: ui_astsource.h:116 rc.cpp:63 -msgid "Folder" -msgstr "Dossier" +#: src/assistant/k9assistant.cpp:76 +msgid "Set mp4 options for each title" +msgstr "Définir les options mp4 pour chaque titre" -#. i18n: file: src/assistant/astsource.ui:66 -#. i18n: ectx: property (text), widget (QRadioButton, rbIso) -#: po/rc.cpp:66 src/import/k9import.cpp:87 src/main/k9main.cpp:458 -#: src/main/k9main.cpp:1258 ui_astsource.h:117 rc.cpp:66 -msgid "ISO Image" -msgstr "Image ISO" +#: src/assistant/k9assistant.cpp:82 +msgid "DVDOption" +msgstr "" -#. i18n: file: src/assistant/aststreams.ui:20 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#: po/rc.cpp:72 ui_aststreams.h:54 rc.cpp:72 -msgid "Selected titles" -msgstr "Titres sélectionnés" +#: src/assistant/k9assistant.cpp:83 +msgid "Set DVD playback options" +msgstr "Définir les options de lecture du DVD" -#. i18n: file: src/assistant/aststreams.ui:25 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#. i18n: file: src/main/k9mainw.ui:173 -#. i18n: ectx: property (text), item, widget (KComboBox, cbBurnSpeed) -#. i18n: file: src/main/prefDVD.ui:184 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#. i18n: file: src/assistant/aststreams.ui:25 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#. i18n: file: src/main/k9mainw.ui:173 -#. i18n: ectx: property (text), item, widget (KComboBox, cbBurnSpeed) -#. i18n: file: src/main/prefDVD.ui:184 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:75 po/rc.cpp:342 po/rc.cpp:492 src/backup/k9execcopy.cpp:86 -#: src/core/k9burndvd.cpp:176 src/core/k9burndvd.cpp:284 -#: src/import/k9import.cpp:341 src/main/k9main.cpp:1342 -#: src/main/k9playbackoptions.cpp:147 ui_aststreams.h:55 ui_k9mainw.h:200 -#: ui_prefDVD.h:225 rc.cpp:75 rc.cpp:342 rc.cpp:492 -msgid "default" -msgstr "défaut" +#: src/assistant/k9assistant.cpp:89 +msgid "mpeg" +msgstr "mpeg" -#. i18n: file: src/assistant/asttitles.ui:37 -#. i18n: ectx: property (text), widget (QTreeWidget, twSource) -#: po/rc.cpp:81 src/assistant/k9assistant.cpp:60 ui_asttitles.h:70 rc.cpp:81 -msgid "titles" -msgstr "titres" +#: src/assistant/k9assistant.cpp:90 +msgid "Set mpeg options for each title" +msgstr "Définir les options mpeg pour chaque titre" -#. i18n: file: src/assistant/asttitles.ui:42 -#. i18n: ectx: property (text), widget (QTreeWidget, twSource) -#: po/rc.cpp:84 ui_asttitles.h:71 rc.cpp:84 -msgid "size" -msgstr "Taille" +#: src/assistant/k9assistant.cpp:109 src/assistant/k9assistant.cpp:207 +#: src/import/k9importfiles.cpp:200 src/main/k9copy.cpp:343 +#: src/main/k9settings.cpp:23 +msgid "Settings" +msgstr "Paramètres" -#. i18n: file: src/backup/backupdlg.ui:41 -#. i18n: ectx: property (windowTitle), widget (QWidget, backupDlg) -#: po/rc.cpp:87 src/backup/k9backupdlg.cpp:41 src/backup/k9dvdauthor.cpp:430 -#: ui_backupdlg.h:241 rc.cpp:87 -msgid "Backup progression" -msgstr "progression du backup" +#: src/assistant/k9assistant.cpp:110 +msgid "k9copy settings" +msgstr "Paramètres de k9copy" -#. i18n: file: src/backup/backupdlg.ui:80 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:90 ui_backupdlg.h:242 rc.cpp:90 -msgid "

DVD Backup

" -msgstr "" +#: src/assistant/k9assistant.cpp:147 +msgid "The destination of the copy isn't valid" +msgstr "La destination de la copie est invalide" -#. i18n: file: src/backup/backupdlg.ui:106 -#. i18n: ectx: property (text), widget (QLabel, lblStep) -#: po/rc.cpp:93 ui_backupdlg.h:243 rc.cpp:93 -msgid "Current step" -msgstr "Etape en cours" +#: src/assistant/k9assistant.cpp:164 +msgid "You must select at least on title !" +msgstr "Vous devez sélectionner au moins un titre !" -#. i18n: file: src/backup/backupdlg.ui:147 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#. i18n: file: src/backup/mp4dlg.ui:146 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/core/progress.ui:221 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/backup/backupdlg.ui:147 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#. i18n: file: src/backup/mp4dlg.ui:146 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/core/progress.ui:221 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:96 po/rc.cpp:111 po/rc.cpp:144 ui_backupdlg.h:244 ui_mp4dlg.h:222 -#: ui_progress.h:173 rc.cpp:96 rc.cpp:111 rc.cpp:144 -msgid "Elapsed Time" -msgstr "Temps écoulé" +#: src/assistant/k9assistant.cpp:202 +msgid "cannot continue" +msgstr "ne peut continuer" -#. i18n: file: src/backup/backupdlg.ui:166 -#. i18n: ectx: property (text), widget (QLabel, lblTime) -#. i18n: file: src/import/chapterEdit.ui:118 -#. i18n: ectx: property (text), widget (QLabel, lPosition) -#. i18n: file: src/import/import.ui:101 -#. i18n: ectx: property (text), widget (QLabel, lTotal) -#. i18n: file: src/import/newTitle.ui:47 -#. i18n: ectx: property (text), widget (QLabel, lTotalTime) -#. i18n: file: src/backup/backupdlg.ui:166 -#. i18n: ectx: property (text), widget (QLabel, lblTime) -#. i18n: file: src/import/chapterEdit.ui:118 -#. i18n: ectx: property (text), widget (QLabel, lPosition) -#. i18n: file: src/import/import.ui:101 -#. i18n: ectx: property (text), widget (QLabel, lTotal) -#. i18n: file: src/import/newTitle.ui:47 -#. i18n: ectx: property (text), widget (QLabel, lTotalTime) -#: po/rc.cpp:99 po/rc.cpp:150 po/rc.cpp:207 po/rc.cpp:258 ui_backupdlg.h:245 -#: ui_chapterEdit.h:220 ui_import.h:139 ui_newTitle.h:194 rc.cpp:99 rc.cpp:150 -#: rc.cpp:207 rc.cpp:258 -msgid "--:--:--" +#: src/assistant/k9aststreams.cpp:53 +#, fuzzy +msgid "%4 - %1 %2 %3 ch" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MP4Dlg) -#. i18n: file: src/backup/mp4dlg.ui:37 -#. i18n: ectx: property (text), widget (QLabel, lblTitle) -#. i18n: file: src/backup/mp4dlg.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MP4Dlg) -#. i18n: file: src/backup/mp4dlg.ui:37 -#. i18n: ectx: property (text), widget (QLabel, lblTitle) -#: po/rc.cpp:102 po/rc.cpp:105 src/backup/k9execcopy.cpp:163 -#: src/backup/k9execcopy.cpp:219 src/main/k9main.cpp:1144 -#: src/main/k9main.cpp:1202 ui_mp4dlg.h:215 ui_mp4dlg.h:216 rc.cpp:102 -#: rc.cpp:105 -msgid "Encoding" -msgstr "Encodage" - -#. i18n: file: src/backup/mp4dlg.ui:133 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:108 src/import/k9newdvd.cpp:443 ui_mp4dlg.h:221 rc.cpp:108 -msgid "fps" +#: src/assistant/k9aststreams.cpp:64 +msgid "%3 - %1 %2" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:159 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/prefAuthor.ui:68 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#. i18n: file: src/main/prefMPEG4.ui:341 -#. i18n: ectx: property (text), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefMPEG4.ui:448 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_5) -#. i18n: file: src/backup/mp4dlg.ui:159 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/prefAuthor.ui:68 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#. i18n: file: src/main/prefMPEG4.ui:341 -#. i18n: ectx: property (text), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefMPEG4.ui:448 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_5) -#: po/rc.cpp:114 po/rc.cpp:414 po/rc.cpp:603 po/rc.cpp:630 ui_mp4dlg.h:223 -#: ui_prefAuthor.h:205 ui_prefMPEG4.h:381 ui_prefMPEG4.h:393 rc.cpp:114 -#: rc.cpp:414 rc.cpp:603 rc.cpp:630 -msgid "Bitrate" -msgstr "Bitrate" +#: src/assistant/k9asttitles.cpp:254 src/backup/k9mp4enc.cpp:262 +#: src/backup/k9mp4enc.cpp:265 src/backup/k9mp4enc.cpp:323 +#: src/backup/k9mp4enc.cpp:735 src/main/k9main.cpp:584 src/main/k9main.cpp:700 +#: src/main/k9main.cpp:717 src/main/k9mp4title.cpp:63 +#: src/main/k9prefdvd.cpp:38 src/main/k9prefmpeg4.cpp:37 +msgid "MB" +msgstr "Mo" -#. i18n: file: src/backup/mp4dlg.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/k9mainw.ui:218 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#. i18n: file: src/backup/mp4dlg.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/k9mainw.ui:218 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:117 po/rc.cpp:351 ui_k9mainw.h:204 ui_mp4dlg.h:224 rc.cpp:117 -#: rc.cpp:351 -msgid "Size" -msgstr "Taille" +#: src/assistant/k9asttitles.cpp:276 src/assistant/k9asttitles.cpp:286 +#: src/import/k9import.cpp:179 src/import/k9import.cpp:194 +#: src/import/k9newtitle.cpp:151 src/import/k9newtitle.cpp:173 +#: src/main/k9main.cpp:650 src/main/k9main.cpp:665 +msgid "chapter %1" +msgstr "chapitre %1" -#. i18n: file: src/core/dvdprogress.ui:35 -#. i18n: ectx: property (windowTitle), widget (QDialog, DVDProgress) -#: po/rc.cpp:120 src/core/k9dvdprogress.cpp:29 ui_dvdprogress.h:116 rc.cpp:120 -msgid "DVD Analyze" -msgstr "Analyse du DVD" +#: src/assistant/k9asttitles.cpp:280 src/assistant/k9asttitles.cpp:290 +#: src/main/k9main.cpp:654 src/main/k9main.cpp:671 src/main/k9main.cpp:735 +#: src/main/k9main.cpp:755 +msgid "%1 MB" +msgstr "%1 Mo" -#. i18n: file: src/core/processList.ui:16 -#. i18n: ectx: property (caption), widget (QWidget) -#. i18n: file: src/import/processList.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, processList) -#. i18n: file: src/core/processList.ui:16 -#. i18n: ectx: property (caption), widget (QWidget) -#. i18n: file: src/import/processList.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, processList) -#: po/rc.cpp:123 po/rc.cpp:276 ui_processList.h:77 rc.cpp:123 rc.cpp:276 -msgid "Process List" -msgstr "Liste des processus" +#: src/backup/k9backupdlg.cpp:41 src/backup/k9dvdauthor.cpp:430 +#: ui_backupdlg.h:241 +msgid "Backup progression" +msgstr "progression du backup" -#. i18n: file: src/core/processList.ui:25 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:31 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/core/processList.ui:25 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:31 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:126 po/rc.cpp:282 ui_processList.h:79 rc.cpp:126 rc.cpp:282 -msgid "Processes" -msgstr "Processus" +#: src/backup/k9dvdauthor.cpp:147 src/backup/k9dvdauthor.cpp:392 +msgid "'%1' not selected" +msgstr "'%1' non sélectionné" -#. i18n: file: src/core/processList.ui:36 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:36 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/core/processList.ui:36 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:36 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:129 po/rc.cpp:285 ui_processList.h:80 rc.cpp:129 rc.cpp:285 -msgid "Elapsed" -msgstr "Ecoulé" +#: src/backup/k9dvdauthor.cpp:148 src/backup/k9dvdauthor.cpp:393 +#: src/backup/k9dvdauthor.cpp:416 src/backup/k9dvdauthor.cpp:470 +#: src/backup/k9dvdauthor.cpp:479 src/backup/k9dvdauthor.cpp:482 +#: src/core/k9burndvd.cpp:249 src/core/k9burndvd.cpp:333 +#: src/import/k9newdvd.cpp:129 +msgid "authoring" +msgstr "authoring" -#. i18n: file: src/core/processList.ui:47 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/import.ui:62 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#. i18n: file: src/import/processList.ui:41 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/main/k9mainw.ui:80 -#. i18n: ectx: property (text), widget (QToolButton, binputOpenDir) -#. i18n: file: src/main/k9mainw.ui:90 -#. i18n: ectx: property (text), widget (QToolButton, binputOpen) -#. i18n: file: src/mplayer/phonon.ui:43 -#. i18n: ectx: property (text), widget (QToolButton, bStop) -#. i18n: file: src/mplayer/phonon.ui:56 -#. i18n: ectx: property (text), widget (QToolButton, bPlay) -#. i18n: file: src/core/processList.ui:47 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/import.ui:62 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#. i18n: file: src/import/processList.ui:41 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/main/k9mainw.ui:80 -#. i18n: ectx: property (text), widget (QToolButton, binputOpenDir) -#. i18n: file: src/main/k9mainw.ui:90 -#. i18n: ectx: property (text), widget (QToolButton, binputOpen) -#. i18n: file: src/mplayer/phonon.ui:43 -#. i18n: ectx: property (text), widget (QToolButton, bStop) -#. i18n: file: src/mplayer/phonon.ui:56 -#. i18n: ectx: property (text), widget (QToolButton, bPlay) -#: po/rc.cpp:132 po/rc.cpp:198 po/rc.cpp:288 po/rc.cpp:327 po/rc.cpp:333 -#: po/rc.cpp:761 po/rc.cpp:764 ui_import.h:133 ui_k9mainw.h:189 -#: ui_k9mainw.h:195 ui_phonon.h:75 ui_phonon.h:76 ui_processList.h:81 -#: rc.cpp:132 rc.cpp:198 rc.cpp:288 rc.cpp:327 rc.cpp:333 rc.cpp:761 -#: rc.cpp:764 -msgid "..." -msgstr "" +#: src/backup/k9dvdauthor.cpp:416 src/backup/k9execcopy.cpp:173 +#: src/backup/k9mp4enc.cpp:136 src/backup/k9mp4enc.cpp:146 +#: src/core/k9burndvd.cpp:234 src/core/k9burndvd.cpp:321 +#: src/mplayer/k9mplayer.cpp:157 src/mplayer/k9xine.cpp:143 +msgid "Unable to run %1" +msgstr "Impossible d'exécuter %1" -#. i18n: file: src/core/processList.ui:73 -#. i18n: ectx: property (text), widget (KPushButton) -#. i18n: file: src/import/processList.ui:55 -#. i18n: ectx: property (text), widget (KPushButton, bCancel) -#. i18n: file: src/core/processList.ui:73 -#. i18n: ectx: property (text), widget (KPushButton) -#. i18n: file: src/import/processList.ui:55 -#. i18n: ectx: property (text), widget (KPushButton, bCancel) -#: po/rc.cpp:135 po/rc.cpp:291 ui_processList.h:82 rc.cpp:135 rc.cpp:291 -msgid "&Cancel" -msgstr "&Annuler" +#: src/backup/k9dvdauthor.cpp:429 src/backup/k9dvdauthor.cpp:510 +#: src/backup/k9dvdauthor.cpp:548 src/import/k9newdvd.cpp:150 +#: src/main/k9settings.cpp:56 src/main/k9settings.cpp:57 +msgid "Authoring" +msgstr "Authoring" -#. i18n: file: src/core/processList.ui:76 -#. i18n: ectx: property (accel), widget (KPushButton) -#. i18n: file: src/import/processList.ui:58 -#. i18n: ectx: property (shortcut), widget (KPushButton, bCancel) -#. i18n: file: src/core/processList.ui:76 -#. i18n: ectx: property (accel), widget (KPushButton) -#. i18n: file: src/import/processList.ui:58 -#. i18n: ectx: property (shortcut), widget (KPushButton, bCancel) -#: po/rc.cpp:138 po/rc.cpp:294 ui_processList.h:83 rc.cpp:138 rc.cpp:294 -msgid "Alt+C" -msgstr "" +#: src/backup/k9dvdauthor.cpp:470 +msgid "Dvdauthor error :\n" +msgstr "Erreur dans DVDAuthor :\n" -#. i18n: file: src/core/progress.ui:31 -#. i18n: ectx: property (windowTitle), widget (QWidget, Progress) -#: po/rc.cpp:141 ui_progress.h:171 rc.cpp:141 -msgid "k9Copy" -msgstr "k9copy" +#: src/backup/k9dvdauthor.cpp:479 +msgid "Authoring cancelled" +msgstr "L'authoring a été annulé" -#. i18n: file: src/import/chapterEdit.ui:20 -#. i18n: ectx: property (windowTitle), widget (QWidget, chapterEdit) -#: po/rc.cpp:147 src/import/k9importfiles.cpp:96 ui_chapterEdit.h:219 -#: rc.cpp:147 -msgid "Chapter properties" -msgstr "Propriétés du chapitre" +#: src/backup/k9dvdauthor.cpp:482 src/import/k9newdvd.cpp:143 +msgid "An error occured while running DVDAuthor:\n" +msgstr "Un erreur est survenue lors de l'exécution de DVDAuthor\n" -#. i18n: file: src/import/chapterEdit.ui:130 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:153 ui_chapterEdit.h:221 rc.cpp:153 -msgid "video" -msgstr "vidéo" +#: src/backup/k9dvdauthor.cpp:549 +msgid "Fixing VOBUS" +msgstr "Correction des VOBUS" -#. i18n: file: src/import/chapterEdit.ui:155 -#. i18n: ectx: property (filter), widget (KUrlRequester, urFile) -#: po/rc.cpp:156 ui_chapterEdit.h:222 rc.cpp:156 -msgid "" -"*.avi\n" -"*.mpeg\n" -"*.mpg\n" -"*.*" -msgstr "" +#: src/backup/k9dvdbackup.cpp:150 src/backup/k9dvdbackup.cpp:164 +#: src/backup/k9dvdbackup.cpp:526 src/backup/k9dvdbackup.cpp:612 +msgid "DVD backup cancelled" +msgstr "Le Backup du DVD a été annulé" -#. i18n: file: src/import/chapterEdit.ui:162 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:162 ui_chapterEdit.h:226 rc.cpp:162 -msgid "start" -msgstr "Au démarrage" +#: src/backup/k9dvdbackup.cpp:177 +msgid "unable to open VIDEO_TS.IFO" +msgstr "impossible d'ouvrir VIDEO_TS.IFO" -#. i18n: file: src/import/chapterEdit.ui:178 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twstart) -#. i18n: file: src/import/chapterEdit.ui:253 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twend) -#. i18n: file: src/import/newTitle.ui:113 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twLength) -#. i18n: file: src/import/chapterEdit.ui:178 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twstart) -#. i18n: file: src/import/chapterEdit.ui:253 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twend) -#. i18n: file: src/import/newTitle.ui:113 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twLength) -#: po/rc.cpp:165 po/rc.cpp:177 po/rc.cpp:267 ui_chapterEdit.h:227 -#: ui_chapterEdit.h:231 ui_newTitle.h:198 rc.cpp:165 rc.cpp:177 rc.cpp:267 -msgid "HH:mm:ss" -msgstr "" +#: src/backup/k9dvdbackup.cpp:199 src/backup/k9dvdbackup.cpp:380 +#: src/backup/k9dvdbackup.cpp:450 +msgid "Unable to open file " +msgstr "Impossible d'ouvrir le fichier " -#. i18n: file: src/import/chapterEdit.ui:191 -#. i18n: ectx: property (text), widget (KPushButton, bStart) -#. i18n: file: src/import/chapterEdit.ui:266 -#. i18n: ectx: property (text), widget (KPushButton, bEnd) -#. i18n: file: src/import/chapterEdit.ui:191 -#. i18n: ectx: property (text), widget (KPushButton, bStart) -#. i18n: file: src/import/chapterEdit.ui:266 -#. i18n: ectx: property (text), widget (KPushButton, bEnd) -#: po/rc.cpp:168 po/rc.cpp:180 ui_chapterEdit.h:228 ui_chapterEdit.h:232 -#: rc.cpp:168 rc.cpp:180 -msgid "set Current Frame" -msgstr "Image courante" +#: src/backup/k9dvdbackup.cpp:278 +msgid "Unable to open titleset %1" +msgstr "Impossible d'ouvrir le titleset %1" -#. i18n: file: src/import/chapterEdit.ui:214 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakStart) -#. i18n: file: src/import/chapterEdit.ui:273 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakEnd) -#. i18n: file: src/import/chapterEdit.ui:214 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakStart) -#. i18n: file: src/import/chapterEdit.ui:273 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakEnd) -#: po/rc.cpp:171 po/rc.cpp:183 ui_chapterEdit.h:229 ui_chapterEdit.h:233 -#: rc.cpp:171 rc.cpp:183 -msgid "break continuity" -msgstr "rupture de continuité" +#: src/backup/k9dvdbackup.cpp:284 src/backup/k9dvdbackup.cpp:584 +msgid "Extracting titleset %1" +msgstr "lecture du titleset %1" -#. i18n: file: src/import/chapterEdit.ui:237 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:174 ui_chapterEdit.h:230 rc.cpp:174 -msgid "end" -msgstr "fin" +#: src/backup/k9dvdbackup.cpp:457 +msgid "Unable to open menu for titleset %1" +msgstr "Impossible d'ouvrir le menu pour le titleset %1" -#. i18n: file: src/import/chapterEdit.ui:302 -#. i18n: ectx: property (text), widget (QPushButton, bTitleButton) -#: po/rc.cpp:186 ui_chapterEdit.h:234 rc.cpp:186 -msgid "set Title button" -msgstr "définir le bouton du titre" +#: src/backup/k9dvdbackup.cpp:483 +msgid "Extracting menu for titleset %1" +msgstr "Extraction du menu pour le titleset %1" -#. i18n: file: src/import/import.ui:14 -#. i18n: ectx: property (windowTitle), widget (QWidget, import) -#: po/rc.cpp:189 src/import/k9import.cpp:36 ui_import.h:130 rc.cpp:189 -msgid "import" -msgstr "importer" +#: src/backup/k9dvdbackup.cpp:576 +msgid "Unable to open ifo file for titleset %1" +msgstr "Impossible d'ouvrir le fichier ifo pour le titre %1" -#. i18n: file: src/import/import.ui:26 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/configDlg.ui:113 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefDVD.ui:19 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -#. i18n: file: src/import/import.ui:26 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/configDlg.ui:113 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefDVD.ui:19 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -#: po/rc.cpp:192 po/rc.cpp:309 po/rc.cpp:438 ui_configDlg.h:127 -#: ui_import.h:131 ui_prefDVD.h:205 rc.cpp:192 rc.cpp:309 rc.cpp:438 -msgid "Output" -msgstr "Sortie" +#: src/backup/k9dvdbackup.cpp:588 src/backup/k9dvdbackup.cpp:1720 +msgid "Unable to open DVD" +msgstr "Impossible d'ouvrir le DVD" -#. i18n: file: src/import/import.ui:57 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#: po/rc.cpp:195 ui_import.h:132 rc.cpp:195 -msgid "Video files" -msgstr "Fichiers vidéo" +#: src/backup/k9dvdbackup.cpp:598 +msgid "Unable to open vobs for titleset %1" +msgstr "Erreur d'ouverture des vobs pour le titre %1" -#. i18n: file: src/import/import.ui:82 -#. i18n: ectx: property (text), item, widget (QComboBox, cbFormat) -#: po/rc.cpp:201 ui_import.h:136 rc.cpp:201 -msgid "PAL" -msgstr "" +#: src/backup/k9dvdbackup.cpp:1407 +msgid "Updating vob %1" +msgstr "Mise à jour du vob %1" -#. i18n: file: src/import/import.ui:87 -#. i18n: ectx: property (text), item, widget (QComboBox, cbFormat) -#: po/rc.cpp:204 ui_import.h:137 rc.cpp:204 -msgid "NTSC" -msgstr "" +#: src/backup/k9dvdbackup.cpp:1424 +msgid "DVD backup canceled" +msgstr "Le backup du DVD a été annulé" -#. i18n: file: src/import/menuEdit.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, menuEdit) -#: po/rc.cpp:210 ui_menuEdit.h:206 rc.cpp:210 -msgid "Edit Menu" -msgstr "Editer le menu" +#: src/backup/k9execcopy.cpp:32 src/core/k9burndvd.cpp:177 +#: src/core/k9burndvd.cpp:290 src/import/k9import.cpp:321 +#: src/main/k9main.cpp:1388 src/main/k9playbackoptions.cpp:147 +#: ui_aststreams.h:55 ui_k9mainw.h:200 ui_prefDVD.h:232 +msgid "default" +msgstr "défaut" -#. i18n: file: src/import/menuEdit.ui:37 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:213 ui_menuEdit.h:207 rc.cpp:213 -msgid "Text" -msgstr "Texte" +#: src/backup/k9execcopy.cpp:40 src/backup/k9execcopy.cpp:120 +#: src/backup/k9execcopy.cpp:309 src/backup/k9execcopy.cpp:365 +msgid "DVD is not opened" +msgstr "Le DVD n'est pas ouvert" -#. i18n: file: src/import/menuEdit.ui:53 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:216 ui_menuEdit.h:208 rc.cpp:216 -msgid "Background picture" -msgstr "Image de fond" +#: src/backup/k9execcopy.cpp:40 src/backup/k9execcopy.cpp:64 +#: src/backup/k9execcopy.cpp:110 +msgid "DVD Copy" +msgstr "Copie de DVD" -#. i18n: file: src/import/menuEdit.ui:85 -#. i18n: ectx: property (text), widget (KPushButton, bFont) -#. i18n: file: src/main/prefAuthor.ui:175 -#. i18n: ectx: property (text), widget (KPushButton, bButtonFont) -#. i18n: file: src/import/menuEdit.ui:85 -#. i18n: ectx: property (text), widget (KPushButton, bFont) -#. i18n: file: src/main/prefAuthor.ui:175 -#. i18n: ectx: property (text), widget (KPushButton, bButtonFont) -#: po/rc.cpp:219 po/rc.cpp:426 ui_menuEdit.h:210 ui_prefAuthor.h:209 -#: rc.cpp:219 rc.cpp:426 -msgid "Font" -msgstr "Police" +#: src/backup/k9execcopy.cpp:64 +msgid "" +"Insufficient disk space on %1\n" +"%2 mb expected." +msgstr "" +"Espace disque insuffisant sur %1\n" +"%2 mo attendus." -#. i18n: file: src/import/menuEdit.ui:99 -#. i18n: ectx: property (text), item, widget (QComboBox, cbPosTitle) -#: po/rc.cpp:222 ui_menuEdit.h:213 rc.cpp:222 -msgid "Bottom" -msgstr "Bas" +#: src/backup/k9execcopy.cpp:110 src/backup/k9execcopy.cpp:356 +#: src/backup/k9execcopy.cpp:416 +msgid "Selected titles have been successfully extracted" +msgstr "Les titres sélectionnés ont été extraits avec succès" -#. i18n: file: src/import/menuEdit.ui:104 -#. i18n: ectx: property (text), item, widget (QComboBox, cbPosTitle) -#: po/rc.cpp:225 ui_menuEdit.h:214 rc.cpp:225 -msgid "Right" -msgstr "Droite" - -#. i18n: file: src/import/menuEdit.ui:171 -#. i18n: ectx: property (text), widget (QLabel, lTitle) -#: po/rc.cpp:228 src/import/k9import.cpp:69 src/import/k9menuedit.cpp:284 -#: ui_menuEdit.h:218 rc.cpp:228 -msgid "Root Menu" -msgstr "Menu Racine" - -#. i18n: file: src/import/menuEdit.ui:181 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:231 ui_menuEdit.h:219 rc.cpp:231 -msgid "At start" -msgstr "Au démarrage" +#: src/backup/k9execcopy.cpp:138 src/backup/k9execcopy.cpp:327 +#: src/backup/k9execcopy.cpp:383 src/backup/k9mp4enc.cpp:252 +msgid "Save file to disk" +msgstr "Enregister le fichier sur le disque" -#. i18n: file: src/import/menuEdit.ui:192 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#: po/rc.cpp:234 ui_menuEdit.h:222 rc.cpp:234 -msgid "Play menu" -msgstr "Jouer le menu" +#: src/backup/k9execcopy.cpp:173 src/backup/k9mp4enc.cpp:122 +#: src/backup/k9mp4enc.cpp:130 src/backup/k9mp4enc.cpp:136 +#: src/backup/k9mp4enc.cpp:146 src/backup/k9mp4enc.cpp:415 +msgid "Encoding error" +msgstr "Erreur d'encodage" -#. i18n: file: src/import/menuEdit.ui:197 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#. i18n: file: src/import/menuEdit.ui:226 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#. i18n: file: src/import/menuEdit.ui:197 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#. i18n: file: src/import/menuEdit.ui:226 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:237 po/rc.cpp:249 ui_menuEdit.h:223 ui_menuEdit.h:230 rc.cpp:237 -#: rc.cpp:249 -msgid "Play title 1" -msgstr "Lecture du titre 1" +#: src/backup/k9execcopy.cpp:194 +msgid "Selected titles have been successfully encoded" +msgstr "Les titres sélectionnés ont été encodés avec succès" -#. i18n: file: src/import/menuEdit.ui:205 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_2) -#: po/rc.cpp:240 ui_menuEdit.h:225 rc.cpp:240 -msgid "At End" -msgstr "En fin" +#: src/backup/k9execcopy.cpp:194 src/backup/k9execcopy.cpp:356 +#: src/backup/k9execcopy.cpp:416 ui_mp4dlg.h:240 ui_mp4dlg.h:241 +msgid "Encoding" +msgstr "Encodage" -#. i18n: file: src/import/menuEdit.ui:216 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:243 ui_menuEdit.h:228 rc.cpp:243 -msgid "Play root menu" -msgstr "Jouer le menu racine" +#: src/backup/k9execcopy.cpp:288 +msgid "Muxing Matroska file" +msgstr "Multiplexage du fichier Matroska" + +#: src/backup/k9execcopy.cpp:301 +msgid "An error occured while running mkvmerge" +msgstr "Un erreur est survenue lors de l'exécution de mkvmerge" + +#: src/backup/k9execcopy.cpp:301 +msgid "Muxing Matroska" +msgstr "Multiplexage Matroska" + +#: src/backup/k9execcopy.cpp:365 +msgid "Audio Extraction" +msgstr "Extraction audio" -#. i18n: file: src/import/menuEdit.ui:221 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:246 ui_menuEdit.h:229 rc.cpp:246 -msgid "Play title menu" -msgstr "Lecture du &titre" +#: src/backup/k9mp4dlg.cpp:27 +msgid "transcoding" +msgstr "transcodage" -#. i18n: file: src/import/newTitle.ui:14 -#. i18n: ectx: property (windowTitle), widget (QWidget, newTitle) -#: po/rc.cpp:252 src/import/k9newtitle.cpp:89 ui_newTitle.h:192 rc.cpp:252 -msgid "Add title" -msgstr "Ajouter un titre" +#: src/backup/k9mp4enc.cpp:122 +msgid "Audio extraction can only be done with ffmpeg" +msgstr "L'extraction audio ne peut être faite qu'avec ffmpeg" + +#: src/backup/k9mp4enc.cpp:130 +msgid "Matroska encoding can only be done with ffmpeg" +msgstr "L'encodage au format matroska ne peut être fait qu'avec ffmpeg" + +#: src/backup/k9mp4enc.cpp:466 src/backup/k9mp4enc.cpp:529 +#: src/backup/k9mp4enc.cpp:531 src/backup/k9mp4enc.cpp:638 +#: src/backup/k9mp4enc.cpp:640 src/import/k9newdvd.cpp:274 +msgid "Encoding %1" +msgstr "Encodage %1" -#. i18n: file: src/import/newTitle.ui:28 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:255 ui_newTitle.h:193 rc.cpp:255 -msgid "Video file" -msgstr "Fichier vidéo" +#: src/backup/k9mp4enc.cpp:529 src/backup/k9mp4enc.cpp:638 +msgid "pass %1" +msgstr "passe %1" -#. i18n: file: src/import/newTitle.ui:71 -#. i18n: ectx: property (text), widget (QRadioButton, rbNumber) -#: po/rc.cpp:261 ui_newTitle.h:196 rc.cpp:261 -msgid "number of chapters" -msgstr "nombre de chapitres" +#: src/backup/k9mp4enc.cpp:824 +msgid "audio" +msgstr "audio" + +#: src/backup/k9mp4enc.cpp:824 src/backup/k9mp4enc.cpp:842 +msgid "An error occured while encoding the %1 stream" +msgstr "Une erreur est survenue pendant l'encodage du flux %1" -#. i18n: file: src/import/newTitle.ui:97 -#. i18n: ectx: property (text), widget (QRadioButton, rbLength) -#: po/rc.cpp:264 ui_newTitle.h:197 rc.cpp:264 -msgid "chapter length" -msgstr "longueur du chapitre" +#: src/backup/k9mp4enc.cpp:842 ui_chapterEdit.h:221 +msgid "video" +msgstr "vidéo" -#. i18n: file: src/import/newTitle.ui:136 -#. i18n: ectx: property (text), widget (QCheckBox, ckReencode) -#: po/rc.cpp:270 ui_newTitle.h:199 rc.cpp:270 -msgid "Do not reencode" -msgstr "Ne pas réencoder" +#: src/core/k9burndvd.cpp:188 src/core/k9burndvd.cpp:189 +#: src/core/k9burndvd.cpp:267 src/core/k9burndvd.cpp:268 +#: src/core/k9burndvd.cpp:363 +msgid "Burning DVD" +msgstr "Gravure du DVD" -#. i18n: file: src/import/newTitle.ui:187 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/main/configDlg.ui:129 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/import/newTitle.ui:187 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/main/configDlg.ui:129 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#: po/rc.cpp:273 po/rc.cpp:312 ui_configDlg.h:128 ui_newTitle.h:200 rc.cpp:273 -#: rc.cpp:312 -msgid "Add" -msgstr "Ajouter" +#: src/core/k9burndvd.cpp:200 src/core/k9burndvd.cpp:296 +#: src/import/k9import.cpp:295 src/main/k9main.cpp:371 +msgid "Save image to disk" +msgstr "Enregister l'image sur le disque" -#. i18n: file: src/import/processList.ui:26 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:279 ui_processList.h:78 rc.cpp:279 -msgid "Progression" -msgstr "Progression" +#: src/core/k9burndvd.cpp:225 src/core/k9burndvd.cpp:314 +msgid "Insert a recordable DVD" +msgstr "Insérer un DVD enregistrable" -#. i18n: file: src/main/configDlg.ui:20 -#. i18n: ectx: property (windowTitle), widget (QWidget, configDlg) -#: po/rc.cpp:297 src/main/k9settings.cpp:29 src/main/kconfigdlg.cpp:35 -#: ui_configDlg.h:123 rc.cpp:297 -msgid "Devices" -msgstr "Lecteurs" +#: src/core/k9burndvd.cpp:225 src/core/k9burndvd.cpp:234 +#: src/core/k9burndvd.cpp:240 src/core/k9burndvd.cpp:315 +#: src/core/k9burndvd.cpp:321 src/core/k9burndvd.cpp:327 +msgid "DVD burning" +msgstr "Gravure du DVD" -#. i18n: file: src/main/configDlg.ui:98 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#: po/rc.cpp:300 ui_configDlg.h:124 rc.cpp:300 -msgid "device" -msgstr "périphérique" +#: src/core/k9burndvd.cpp:234 src/core/k9burndvd.cpp:321 +msgid "Error burning DVD :\n" +msgstr "Erreur lors de lors de la gravure du DVD :\n" -#. i18n: file: src/main/configDlg.ui:103 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefMencoder.ui:108 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#. i18n: file: src/main/prefMencoder.ui:360 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/configDlg.ui:103 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefMencoder.ui:108 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#. i18n: file: src/main/prefMencoder.ui:360 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:303 po/rc.cpp:525 po/rc.cpp:543 ui_configDlg.h:125 -#: ui_prefMencoder.h:421 ui_prefMencoder.h:431 rc.cpp:303 rc.cpp:525 -#: rc.cpp:543 -msgid "label" -msgstr "libellé" +#: src/core/k9burndvd.cpp:240 src/core/k9burndvd.cpp:327 +msgid "DVD Burning finished" +msgstr "Gravure du DVD terminée" -#. i18n: file: src/main/configDlg.ui:108 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#: po/rc.cpp:306 ui_configDlg.h:126 rc.cpp:306 -msgid "Input" -msgstr "Entrée" +#: src/core/k9burndvd.cpp:248 src/core/k9burndvd.cpp:332 +msgid "An error occured while Burning DVD" +msgstr "Un erreur est survenue pendant la gravure du DVD" -#. i18n: file: src/main/configDlg.ui:148 -#. i18n: ectx: property (text), widget (KPushButton, bRemove) -#: po/rc.cpp:315 ui_configDlg.h:130 rc.cpp:315 -msgid "Remove" -msgstr "Supprimer" +#: src/core/k9burndvd.cpp:248 src/core/k9burndvd.cpp:332 +msgid "Insert an other DVD" +msgstr "Insérer un autre DVD" -#. i18n: file: src/main/k9mainw.ui:25 -#. i18n: ectx: property (windowTitle), widget (QWidget, MainDlg) -#: po/rc.cpp:318 ui_k9mainw.h:182 rc.cpp:318 -msgid "MainDlg" -msgstr "" +#: src/core/k9burndvd.cpp:364 +msgid "Current write speed :%1 x" +msgstr "Vitesse d'écriture :%1 x" -#. i18n: file: src/main/k9mainw.ui:77 -#. i18n: ectx: property (toolTip), widget (QToolButton, binputOpenDir) -#: po/rc.cpp:324 ui_k9mainw.h:186 rc.cpp:324 -msgid "Open a folder" -msgstr "Ouvrir un dossier" +#: src/core/k9dialogs.cpp:125 +msgid "select a directory" +msgstr "sélectionnez un répertoire" -#. i18n: file: src/main/k9mainw.ui:87 -#. i18n: ectx: property (toolTip), widget (QToolButton, binputOpen) -#: po/rc.cpp:330 ui_k9mainw.h:192 rc.cpp:330 -msgid "Open an iso image" -msgstr "Ouvrir une image ISO" +#: src/core/k9dvd.cpp:133 +msgid "for visually impaired" +msgstr "pour déficients visuels" -#. i18n: file: src/main/k9mainw.ui:121 -#. i18n: ectx: property (text), widget (QLabel, lblInput_2) -#: po/rc.cpp:336 ui_k9mainw.h:196 rc.cpp:336 -msgid "Output device " -msgstr "Graveur" +#: src/core/k9dvd.cpp:134 +msgid "director's comments" +msgstr "commentaires du réalisateur" -#. i18n: file: src/main/k9mainw.ui:153 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#: po/rc.cpp:339 ui_k9mainw.h:197 rc.cpp:339 -msgid "@" -msgstr "" +#: src/core/k9dvd.cpp:135 +msgid "alternate director's comments" +msgstr "commentaires du réalisateurs alternatifs" -#. i18n: file: src/main/k9mainw.ui:187 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/main/prefMPEG4.ui:266 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/k9mainw.ui:187 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/main/prefMPEG4.ui:266 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:345 po/rc.cpp:591 ui_k9mainw.h:202 ui_prefMPEG4.h:376 rc.cpp:345 -#: rc.cpp:591 -msgid "X" -msgstr "" +#: src/core/k9dvd.cpp:139 +msgid "Large" +msgstr "Large" -#. i18n: file: src/main/k9mainw.ui:213 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:348 ui_k9mainw.h:203 rc.cpp:348 -msgid "Title" -msgstr "Titre" +#: src/core/k9dvd.cpp:140 +msgid "Children" +msgstr "Enfants" -#. i18n: file: src/main/k9mainw.ui:223 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:354 ui_k9mainw.h:205 rc.cpp:354 -msgid "Content" -msgstr "Contenu" +#: src/core/k9dvd.cpp:141 src/core/k9dvd.cpp:147 src/core/k9dvd.cpp:148 +#: src/core/k9dvd.cpp:149 +msgid "reserved" +msgstr "réservé" -#. i18n: file: src/main/langselectw.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, langSelect) -#: po/rc.cpp:357 src/main/k9copy.cpp:158 ui_langselectw.h:61 rc.cpp:357 -msgid "Selection" -msgstr "Sélection" +#: src/core/k9dvd.cpp:142 +msgid "Normal captions" +msgstr "Sous-titres normaux" -#. i18n: file: src/main/langselectw.ui:47 -#. i18n: ectx: property (text), widget (QTreeWidget, lvLanguages) -#: po/rc.cpp:360 ui_langselectw.h:62 rc.cpp:360 -msgid "Languages" -msgstr "Langues" +#: src/core/k9dvd.cpp:143 +msgid "Large captions" +msgstr "Sous-titres larges" -#. i18n: file: src/main/mencoderCmdGen.ui:13 -#. i18n: ectx: property (windowTitle), widget (QDialog, mencoderCmdGen) -#: po/rc.cpp:363 src/main/k9mencodercmdgen.cpp:63 ui_mencoderCmdGen.h:108 -#: rc.cpp:363 -msgid "MEncoder options" -msgstr "Options de MEncoder" +#: src/core/k9dvd.cpp:144 +msgid "Children captions" +msgstr "Sous-titres pour enfants" -#. i18n: file: src/main/mencoderCmdGen.ui:23 -#. i18n: ectx: property (text), widget (QTreeWidget, listView) -#: po/rc.cpp:366 ui_mencoderCmdGen.h:109 rc.cpp:366 -msgid "1" -msgstr "" +#: src/core/k9dvd.cpp:146 +msgid "Forced" +msgstr "Forcé" -#. i18n: file: src/main/playbackoptionsw.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, PlaybackOptionsw) -#: po/rc.cpp:369 src/main/k9copy.cpp:149 ui_playbackoptionsw.h:226 rc.cpp:369 -msgid "DVD playback options" -msgstr "Options de lecture du DVD" +#: src/core/k9dvd.cpp:150 +msgid "Director's comments" +msgstr "Commentaires du réalisateur" -#. i18n: file: src/main/playbackoptionsw.ui:34 -#. i18n: ectx: property (text), widget (QCheckBox, ckMenu) -#: po/rc.cpp:372 ui_playbackoptionsw.h:227 rc.cpp:372 -msgid "&Keep original menus" -msgstr "Conserver les menus originaux" +#: src/core/k9dvd.cpp:151 +msgid "Large director's comments" +msgstr "Commentaires du réalisateur larges" -#. i18n: file: src/main/playbackoptionsw.ui:37 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMenu) -#. i18n: file: src/main/prefMPEG4.ui:171 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMp4AspectRatio) -#. i18n: file: src/main/playbackoptionsw.ui:37 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMenu) -#. i18n: file: src/main/prefMPEG4.ui:171 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMp4AspectRatio) -#: po/rc.cpp:375 po/rc.cpp:588 ui_playbackoptionsw.h:228 ui_prefMPEG4.h:374 -#: rc.cpp:375 rc.cpp:588 -msgid "Alt+K" -msgstr "" +#: src/core/k9dvd.cpp:152 +msgid "Director's comments for children" +msgstr "Commentaires du réalisateur pour les enfants" -#. i18n: file: src/main/playbackoptionsw.ui:184 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#: po/rc.cpp:378 ui_playbackoptionsw.h:231 rc.cpp:378 -msgid "Selected Titles" -msgstr "Titres sélectionnés" +#: src/core/k9dvd.cpp:202 +msgid "Couldn't open %1 for title\n" +msgstr "Ne peut ouvrir %1 pour lecture du titre\n" -#. i18n: file: src/main/playbackoptionsw.ui:245 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:381 ui_playbackoptionsw.h:232 rc.cpp:381 -msgid "Default language" -msgstr "Langue par défaut" +#: src/core/k9dvd.cpp:204 src/core/k9dvd.cpp:212 src/core/k9dvd.cpp:220 +#: src/core/k9dvd.cpp:382 src/main/k9main.cpp:561 +msgid "unknown" +msgstr "inconnu" -#. i18n: file: src/main/playbackoptionsw.ui:271 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:384 ui_playbackoptionsw.h:233 rc.cpp:384 -msgid "Subtitle" -msgstr "Sous-titre" +#: src/core/k9dvd.cpp:210 +msgid "Couldn't seek in %1 for title\n" +msgstr "Ne peut accéder à %1 pour lecture du titre\n" -#. i18n: file: src/main/playbackoptionsw.ui:297 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#. i18n: file: src/main/prefAuthor.ui:19 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox1) -#. i18n: file: src/main/prefMPEG4.ui:397 -#. i18n: ectx: attribute (title), widget (QWidget, tabAudio) -#. i18n: file: src/mplayer/mplayer.ui:25 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/playbackoptionsw.ui:297 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#. i18n: file: src/main/prefAuthor.ui:19 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox1) -#. i18n: file: src/main/prefMPEG4.ui:397 -#. i18n: ectx: attribute (title), widget (QWidget, tabAudio) -#. i18n: file: src/mplayer/mplayer.ui:25 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:387 po/rc.cpp:393 po/rc.cpp:609 po/rc.cpp:746 -#: src/main/k9langselect.cpp:89 ui_mplayer.h:240 ui_playbackoptionsw.h:234 -#: ui_prefAuthor.h:192 ui_prefMPEG4.h:396 rc.cpp:387 rc.cpp:393 rc.cpp:609 -#: rc.cpp:746 -msgid "Audio" -msgstr "Audio" +#: src/core/k9dvd.cpp:237 +msgid "Not Specified" +msgstr "Non spécifié" -#. i18n: file: src/main/prefAuthor.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefAuthor) -#: po/rc.cpp:390 ui_prefAuthor.h:191 rc.cpp:390 -msgid "Authoring options" -msgstr "Options d'authoring" +#: src/core/k9dvd.cpp:237 +msgid "Afar" +msgstr "" -#. i18n: file: src/main/prefAuthor.ui:26 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioFormat) -#: po/rc.cpp:396 ui_prefAuthor.h:195 rc.cpp:396 -msgid "AC3" +#: src/core/k9dvd.cpp:237 +msgid "Abkhazian" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:31 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioFormat) -#: po/rc.cpp:399 ui_prefAuthor.h:196 rc.cpp:399 -msgid "MP2" +#: src/core/k9dvd.cpp:237 +msgid "Afrikaans" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:40 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:402 ui_prefAuthor.h:200 rc.cpp:402 -msgid "128" +#: src/core/k9dvd.cpp:237 +msgid "Amharic" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:45 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:405 ui_prefAuthor.h:201 rc.cpp:405 -msgid "192" +#: src/core/k9dvd.cpp:238 +msgid "Arabic" +msgstr "Arabe" + +#: src/core/k9dvd.cpp:238 +msgid "Assamese" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:50 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:408 ui_prefAuthor.h:202 rc.cpp:408 -msgid "320" +#: src/core/k9dvd.cpp:238 +msgid "Aymara" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:58 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:411 ui_prefAuthor.h:204 rc.cpp:411 -msgid "Format" +#: src/core/k9dvd.cpp:238 +msgid "Azerbaijani" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:113 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox2) -#: po/rc.cpp:417 ui_prefAuthor.h:206 rc.cpp:417 -msgid "Buttons" -msgstr "Boutons" +#: src/core/k9dvd.cpp:238 +msgid "Bashkir" +msgstr "" -#. i18n: file: src/main/prefAuthor.ui:119 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefMPEG4.ui:111 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#. i18n: file: src/main/prefAuthor.ui:119 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefMPEG4.ui:111 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#: po/rc.cpp:420 po/rc.cpp:576 ui_prefAuthor.h:207 ui_prefMPEG4.h:369 -#: rc.cpp:420 rc.cpp:576 -msgid "Width" -msgstr "Largeur" +#: src/core/k9dvd.cpp:239 +msgid "Byelorussian" +msgstr "Biélorusse" -#. i18n: file: src/main/prefAuthor.ui:145 -#. i18n: ectx: property (text), widget (QLabel, textLabel5) -#. i18n: file: src/main/prefMPEG4.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2_2) -#. i18n: file: src/main/prefAuthor.ui:145 -#. i18n: ectx: property (text), widget (QLabel, textLabel5) -#. i18n: file: src/main/prefMPEG4.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2_2) -#: po/rc.cpp:423 po/rc.cpp:579 ui_prefAuthor.h:208 ui_prefMPEG4.h:370 -#: rc.cpp:423 rc.cpp:579 -msgid "Height" -msgstr "Hauteur" +#: src/core/k9dvd.cpp:239 +msgid "Bulgarian" +msgstr "Bulgare" -#. i18n: file: src/main/prefAuthor.ui:182 -#. i18n: ectx: property (text), widget (QLabel, textLabel6) -#: po/rc.cpp:429 ui_prefAuthor.h:210 rc.cpp:429 -msgid "Hilite color" -msgstr "Surbrillance" +#: src/core/k9dvd.cpp:239 +msgid "Bihari" +msgstr "" -#. i18n: file: src/main/prefAuthor.ui:199 -#. i18n: ectx: property (text), widget (QLabel, textLabel6_2) -#: po/rc.cpp:432 ui_prefAuthor.h:212 rc.cpp:432 -msgid "Text color" -msgstr "Couleur du texte" +#: src/core/k9dvd.cpp:239 +msgid "Bislama" +msgstr "" -#. i18n: file: src/main/prefDVD.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefDVD) -#: po/rc.cpp:435 ui_prefDVD.h:204 rc.cpp:435 -msgid "prefDVD" +#: src/core/k9dvd.cpp:239 +msgid "Bengali; Bangla" msgstr "" -#. i18n: file: src/main/prefDVD.ui:31 -#. i18n: ectx: property (text), widget (QLabel, lblworkDir) -#: po/rc.cpp:441 ui_prefDVD.h:206 rc.cpp:441 -msgid "Output directory" -msgstr "Répertoire de sortie" +#: src/core/k9dvd.cpp:240 +msgid "Tibetan" +msgstr "Tibétain" -#. i18n: file: src/main/prefDVD.ui:51 -#. i18n: ectx: property (text), widget (QCheckBox, ckDelTmpFiles) -#: po/rc.cpp:444 ui_prefDVD.h:207 rc.cpp:444 -msgid "Clear output directory on exit" -msgstr "Vider le répertoire de sortie en quittant" +#: src/core/k9dvd.cpp:240 +msgid "Breton" +msgstr "Breton" -#. i18n: file: src/main/prefDVD.ui:54 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDelTmpFiles) -#: po/rc.cpp:447 ui_prefDVD.h:208 rc.cpp:447 -msgid "Alt+Y" +#: src/core/k9dvd.cpp:240 +msgid "Catalan" msgstr "" -#. i18n: file: src/main/prefDVD.ui:61 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:450 ui_prefDVD.h:209 rc.cpp:450 -msgid "DVD size" -msgstr "Taille du DVD" +#: src/core/k9dvd.cpp:240 +msgid "Corsican" +msgstr "Corse" -#. i18n: file: src/main/prefDVD.ui:96 -#. i18n: ectx: property (text), widget (QCheckBox, ckMpegChapter) -#: po/rc.cpp:453 ui_prefDVD.h:210 rc.cpp:453 -msgid "one file/chapter (MPEG extraction)" -msgstr "un fichier par chapitre (extraction MPEG)" +#: src/core/k9dvd.cpp:240 +msgid "Czech" +msgstr "Tchèque" -#. i18n: file: src/main/prefDVD.ui:99 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMpegChapter) -#. i18n: file: src/main/prefDVD.ui:109 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDvdAuthor) -#. i18n: file: src/main/prefDVD.ui:99 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMpegChapter) -#. i18n: file: src/main/prefDVD.ui:109 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDvdAuthor) -#: po/rc.cpp:456 po/rc.cpp:462 ui_prefDVD.h:211 ui_prefDVD.h:213 rc.cpp:456 -#: rc.cpp:462 -msgid "Alt+D" -msgstr "" +#: src/core/k9dvd.cpp:241 +msgid "Welsh" +msgstr "Gallois" -#. i18n: file: src/main/prefDVD.ui:106 -#. i18n: ectx: property (text), widget (QCheckBox, ckDvdAuthor) -#: po/rc.cpp:459 ui_prefDVD.h:212 rc.cpp:459 -msgid "use dvdAuthor for copy without menus" -msgstr "utiliser dvdAuthor pour la copie sans menus" +#: src/core/k9dvd.cpp:241 +msgid "Dansk" +msgstr "Danois" -#. i18n: file: src/main/prefDVD.ui:119 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox_2) -#: po/rc.cpp:465 ui_prefDVD.h:214 rc.cpp:465 -#, fuzzy -msgid "Burning" -msgstr "Gravure" - -#. i18n: file: src/main/prefDVD.ui:125 -#. i18n: ectx: property (text), widget (QCheckBox, ckK3b) -#: po/rc.cpp:468 ui_prefDVD.h:215 rc.cpp:468 -msgid "Burn with k3b" -msgstr "Graver avec k3b" - -#. i18n: file: src/main/prefDVD.ui:128 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckK3b) -#. i18n: file: src/main/prefMPEG4.ui:344 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefDVD.ui:128 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckK3b) -#. i18n: file: src/main/prefMPEG4.ui:344 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbBitrate) -#: po/rc.cpp:471 po/rc.cpp:606 ui_prefDVD.h:216 ui_prefMPEG4.h:382 rc.cpp:471 -#: rc.cpp:606 -msgid "Alt+B" -msgstr "" - -#. i18n: file: src/main/prefDVD.ui:141 -#. i18n: ectx: property (text), widget (QCheckBox, ckAutoBurn) -#: po/rc.cpp:474 ui_prefDVD.h:217 rc.cpp:474 -msgid "Auto burn" -msgstr "Gravure auto" +#: src/core/k9dvd.cpp:241 +msgid "Deutsch" +msgstr "Allemand" -#. i18n: file: src/main/prefDVD.ui:144 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckAutoBurn) -#: po/rc.cpp:477 ui_prefDVD.h:218 rc.cpp:477 -msgid "Alt+T" +#: src/core/k9dvd.cpp:241 +msgid "Bhutani" msgstr "" -#. i18n: file: src/main/prefDVD.ui:154 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox_3) -#: po/rc.cpp:480 ui_prefDVD.h:219 rc.cpp:480 -msgid "Performances" -msgstr "Performances" +#: src/core/k9dvd.cpp:241 +msgid "Greek" +msgstr "Grèque" -#. i18n: file: src/main/prefDVD.ui:160 -#. i18n: ectx: property (text), widget (QCheckBox, ckQuickScan) -#: po/rc.cpp:483 ui_prefDVD.h:220 rc.cpp:483 -msgid "Quick scan" -msgstr "Scan rapide" +#: src/core/k9dvd.cpp:241 +msgid "English" +msgstr "Anglais" -#. i18n: file: src/main/prefDVD.ui:163 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckQuickScan) -#: po/rc.cpp:486 ui_prefDVD.h:221 rc.cpp:486 -msgid "Alt+Q" +#: src/core/k9dvd.cpp:242 +msgid "Esperanto" msgstr "" -#. i18n: file: src/main/prefDVD.ui:176 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:489 ui_prefDVD.h:222 rc.cpp:489 -msgid "DVD read ahead" -msgstr "DVD read ahead" - -#. i18n: file: src/main/prefDVD.ui:189 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:495 ui_prefDVD.h:226 rc.cpp:495 -msgid "skip bad sectors (slow)" -msgstr "ignorer les secteurs défectueux (lent)" +#: src/core/k9dvd.cpp:242 +msgid "Espanol" +msgstr "Espagnol" -#. i18n: file: src/main/prefDVD.ui:194 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:498 ui_prefDVD.h:227 rc.cpp:498 -msgid "skip bad sectors (faster)" -msgstr "ignorer les secteurs défectueux (plus rapide)" +#: src/core/k9dvd.cpp:242 +msgid "Estonian" +msgstr "Estonien" -#. i18n: file: src/main/prefDVD.ui:208 -#. i18n: ectx: property (text), widget (QLabel, label_2) -#: po/rc.cpp:501 ui_prefDVD.h:229 rc.cpp:501 -msgid "" -"this option can improve reading of DVD having bad sectors.\n" -"It will require root privileges when opening the DVD." +#: src/core/k9dvd.cpp:242 +msgid "Basque" msgstr "" -"cette option peut améliorer la lecture des DVD comportant des secteurs défectueux.\n" -"Elle requiert les privilèges root au moment de l'ouverture du DVD." -#. i18n: file: src/main/prefMencoder.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMencoder) -#. i18n: file: src/main/prefMPEG4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMPEG4) -#. i18n: file: src/main/prefpreview.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefPreview) -#. i18n: file: src/main/prefMencoder.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMencoder) -#. i18n: file: src/main/prefMPEG4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMPEG4) -#. i18n: file: src/main/prefpreview.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefPreview) -#: po/rc.cpp:505 po/rc.cpp:552 po/rc.cpp:639 ui_prefMencoder.h:409 -#: ui_prefMPEG4.h:358 ui_prefpreview.h:291 rc.cpp:505 rc.cpp:552 rc.cpp:639 -msgid "Form1" +#: src/core/k9dvd.cpp:242 +msgid "Persian" +msgstr "Perse" + +#: src/core/k9dvd.cpp:243 +msgid "Suomi" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:37 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:508 ui_prefMencoder.h:410 rc.cpp:508 -msgid "" -"$PASS\n" -"$WIDTH\n" -"$HEIGHT\n" -"$VIDBR\n" -"$AUDBR" +#: src/core/k9dvd.cpp:243 +msgid "Fiji" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:57 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#: po/rc.cpp:515 ui_prefMencoder.h:415 rc.cpp:515 -msgid "" -"pass number\n" -"video width\n" -"video height\n" -"video bitrate\n" -"audio bitrate" +#: src/core/k9dvd.cpp:243 +msgid "Faroese" msgstr "" -"numéro de la passe\n" -"largeur de la vidéo\n" -"hauteur de la vidéo\n" -"bitrate vidéo\n" -"bitrate audio" -#. i18n: file: src/main/prefMencoder.ui:70 -#. i18n: ectx: attribute (title), widget (QWidget, tab) -#: po/rc.cpp:522 ui_prefMencoder.h:430 rc.cpp:522 -msgid "Video codecs" -msgstr "Codecs Vidéo" +#: src/core/k9dvd.cpp:243 +msgid "Francais" +msgstr "Français" -#. i18n: file: src/main/prefMencoder.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#: po/rc.cpp:528 ui_prefMencoder.h:422 rc.cpp:528 -msgid "fourcc" +#: src/core/k9dvd.cpp:243 +msgid "Frisian" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:131 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_3) -#: po/rc.cpp:531 ui_prefMencoder.h:423 rc.cpp:531 -msgid "first pass" -msgstr "première passe" - -#. i18n: file: src/main/prefMencoder.ui:233 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:534 ui_prefMencoder.h:426 rc.cpp:534 -msgid "one pass" -msgstr "une passe" +#: src/core/k9dvd.cpp:243 +msgid "Gaelic" +msgstr "Gaélique" -#. i18n: file: src/main/prefMencoder.ui:301 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_3_2) -#: po/rc.cpp:537 ui_prefMencoder.h:429 rc.cpp:537 -msgid "second pass" -msgstr "deuxième passe" +#: src/core/k9dvd.cpp:244 +msgid "Scots Gaelic" +msgstr "Gaélique Ecossais" -#. i18n: file: src/main/prefMencoder.ui:322 -#. i18n: ectx: attribute (title), widget (QWidget, tab) -#: po/rc.cpp:540 ui_prefMencoder.h:434 rc.cpp:540 -msgid "Audio codecs" -msgstr "Codecs Audio" +#: src/core/k9dvd.cpp:244 +msgid "Galician" +msgstr "Gaélique" -#. i18n: file: src/main/prefMencoder.ui:427 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_2_2) -#: po/rc.cpp:546 ui_prefMencoder.h:433 rc.cpp:546 -msgid "options" -msgstr "options" +#: src/core/k9dvd.cpp:244 +msgid "Guarani" +msgstr "" -#. i18n: file: src/main/prefMencoder.ui:453 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:549 ui_prefMencoder.h:435 rc.cpp:549 -msgid "Available variables" -msgstr "variables disponibles" +#: src/core/k9dvd.cpp:244 +msgid "Gujarati" +msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:57 -#. i18n: ectx: attribute (title), widget (QWidget, tabVideo) -#: po/rc.cpp:555 ui_prefMPEG4.h:383 rc.cpp:555 -msgid "Video" -msgstr "Vidéo" +#: src/core/k9dvd.cpp:244 +msgid "Hausa" +msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:63 -#. i18n: ectx: property (text), widget (QCheckBox, ck2passes) -#: po/rc.cpp:558 ui_prefMPEG4.h:360 rc.cpp:558 -msgid "2 pass" -msgstr "2 passes" +#: src/core/k9dvd.cpp:245 src/core/k9dvd.cpp:247 +msgid "Hebrew" +msgstr "Hébreux" -#. i18n: file: src/main/prefMPEG4.ui:66 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ck2passes) -#: po/rc.cpp:561 ui_prefMPEG4.h:361 rc.cpp:561 -msgid "Alt+2" +#: src/core/k9dvd.cpp:245 +msgid "Hindi" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:73 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4) -#. i18n: file: src/main/prefMPEG4.ui:403 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4_2) -#. i18n: file: src/main/prefMPEG4.ui:73 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4) -#. i18n: file: src/main/prefMPEG4.ui:403 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4_2) -#: po/rc.cpp:564 po/rc.cpp:612 ui_prefMPEG4.h:362 ui_prefMPEG4.h:384 -#: rc.cpp:564 rc.cpp:612 -msgid "Codec" -msgstr "Codec" +#: src/core/k9dvd.cpp:245 +msgid "Hrvatski" +msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:93 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:567 ui_prefMPEG4.h:365 rc.cpp:567 -msgid "XviD" +#: src/core/k9dvd.cpp:245 +msgid "Magyar" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:98 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:570 ui_prefMPEG4.h:366 rc.cpp:570 -msgid "lavc MPEG4" +#: src/core/k9dvd.cpp:245 +msgid "Armenian" +msgstr "Arménien" + +#: src/core/k9dvd.cpp:246 +msgid "Interlingua" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:103 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:573 ui_prefMPEG4.h:367 rc.cpp:573 -msgid "x264" +#: src/core/k9dvd.cpp:246 +msgid "Indonesian" +msgstr "Indonésien" + +#: src/core/k9dvd.cpp:246 +msgid "Interlingue" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:152 -#. i18n: ectx: property (text), widget (QLineEdit, leMp4Width) -#: po/rc.cpp:582 ui_prefMPEG4.h:372 rc.cpp:582 -msgid "640" +#: src/core/k9dvd.cpp:246 +msgid "Inupiak" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:168 -#. i18n: ectx: property (text), widget (QCheckBox, ckMp4AspectRatio) -#: po/rc.cpp:585 ui_prefMPEG4.h:373 rc.cpp:585 -msgid "&keep aspect ratio" -msgstr "Conserver les proportions" +#: src/core/k9dvd.cpp:247 +msgid "Islenska" +msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:297 -#. i18n: ectx: property (text), widget (QRadioButton, rbSize) -#: po/rc.cpp:594 ui_prefMPEG4.h:378 rc.cpp:594 -msgid "File size" -msgstr "Taille du fichier" +#: src/core/k9dvd.cpp:247 +msgid "Italiano" +msgstr "Italien" -#. i18n: file: src/main/prefMPEG4.ui:300 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbSize) -#: po/rc.cpp:597 ui_prefMPEG4.h:379 rc.cpp:597 -msgid "Alt+S" +#: src/core/k9dvd.cpp:247 +msgid "Inuktitut" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:322 -#. i18n: ectx: property (suffix), widget (QSpinBox, sbMp4Size) -#: po/rc.cpp:600 ui_prefMPEG4.h:380 rc.cpp:600 -msgid " MB" -msgstr " Mo" +#: src/core/k9dvd.cpp:247 +msgid "Japanese" +msgstr "Japonais" -#. i18n: file: src/main/prefMPEG4.ui:420 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:615 ui_prefMPEG4.h:387 rc.cpp:615 -msgid "mp3" +#: src/core/k9dvd.cpp:248 src/core/k9dvd.cpp:263 +msgid "Yiddish" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:425 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:618 ui_prefMPEG4.h:388 rc.cpp:618 -msgid "faac" -msgstr "" +#: src/core/k9dvd.cpp:248 +msgid "Javanese" +msgstr "Javanais" -#. i18n: file: src/main/prefMPEG4.ui:430 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:621 ui_prefMPEG4.h:389 rc.cpp:621 -msgid "mp2" -msgstr "" +#: src/core/k9dvd.cpp:248 +msgid "Georgian" +msgstr "Géorgien" -#. i18n: file: src/main/prefMPEG4.ui:435 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:624 ui_prefMPEG4.h:390 rc.cpp:624 -msgid "ac3" +#: src/core/k9dvd.cpp:248 +msgid "Kazakh" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:440 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:627 ui_prefMPEG4.h:391 rc.cpp:627 -msgid "adpcm ima" +#: src/core/k9dvd.cpp:248 +msgid "Greenlandic" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:512 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:633 ui_prefMPEG4.h:395 rc.cpp:633 -msgid "Gain" -msgstr "Gain" - -#. i18n: file: src/main/prefMPEG4.ui:542 -#. i18n: ectx: property (text), widget (QCheckBox, ckUseCache) -#: po/rc.cpp:636 ui_prefMPEG4.h:397 rc.cpp:636 -msgid "use cell cache" -msgstr "mise en cache des cellules" - -#. i18n: file: src/main/prefpreview.ui:36 -#. i18n: ectx: property (text), widget (QRadioButton, rbInternal) -#: po/rc.cpp:642 ui_prefpreview.h:293 rc.cpp:642 -msgid "&Internal Player" -msgstr "Lecteur interne" +#: src/core/k9dvd.cpp:249 +msgid "Cambodian" +msgstr "Cambodgien" -#. i18n: file: src/main/prefpreview.ui:39 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbInternal) -#: po/rc.cpp:645 ui_prefpreview.h:294 rc.cpp:645 -msgid "Alt+I" +#: src/core/k9dvd.cpp:249 +msgid "Kannada" msgstr "" -#. i18n: file: src/main/prefpreview.ui:46 -#. i18n: ectx: property (text), widget (QRadioButton, rbMplayer) -#: po/rc.cpp:648 ui_prefpreview.h:295 rc.cpp:648 -msgid "MPlayer" -msgstr "MPlayer" +#: src/core/k9dvd.cpp:249 +msgid "Korean" +msgstr "Coréen" -#. i18n: file: src/main/prefpreview.ui:49 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbMplayer) -#: po/rc.cpp:651 ui_prefpreview.h:296 rc.cpp:651 -msgid "Alt+M" +#: src/core/k9dvd.cpp:249 +msgid "Kashmiri" msgstr "" -#. i18n: file: src/main/prefpreview.ui:56 -#. i18n: ectx: property (text), widget (QRadioButton, rbXine) -#: po/rc.cpp:654 ui_prefpreview.h:297 rc.cpp:654 -msgid "Xine Player" +#: src/core/k9dvd.cpp:249 +msgid "Kurdish" msgstr "" -#. i18n: file: src/main/prefpreview.ui:63 -#. i18n: ectx: property (text), widget (QRadioButton, rbPhonon) -#: po/rc.cpp:657 ui_prefpreview.h:298 rc.cpp:657 -msgid "Phonon" +#: src/core/k9dvd.cpp:250 +msgid "Kirghiz" msgstr "" -#. i18n: file: src/main/prefpreview.ui:127 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:660 ui_prefpreview.h:299 rc.cpp:660 -msgid "Internal viewer options" -msgstr "Options du lecteur interne" +#: src/core/k9dvd.cpp:250 +msgid "Latin" +msgstr "" -#. i18n: file: src/main/prefpreview.ui:137 -#. i18n: ectx: property (text), widget (QCheckBox, ckUseGL) -#: po/rc.cpp:663 ui_prefpreview.h:300 rc.cpp:663 -msgid "use OpenGL" -msgstr "utiliser OpenGL" +#: src/core/k9dvd.cpp:250 +msgid "Lingala" +msgstr "" -#. i18n: file: src/main/prefpreview.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefpreview.ui:320 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#. i18n: file: src/main/prefpreview.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefpreview.ui:320 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#: po/rc.cpp:666 po/rc.cpp:699 ui_prefpreview.h:301 ui_prefpreview.h:318 -#: rc.cpp:666 rc.cpp:699 -msgid "Video output" -msgstr "Sortie vidéo" +#: src/core/k9dvd.cpp:250 +msgid "Laothian" +msgstr "Laotien" -#. i18n: file: src/main/prefpreview.ui:188 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#. i18n: file: src/main/prefpreview.ui:376 -#. i18n: ectx: property (text), widget (QLabel, textLabel4_2) -#. i18n: file: src/main/prefpreview.ui:188 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#. i18n: file: src/main/prefpreview.ui:376 -#. i18n: ectx: property (text), widget (QLabel, textLabel4_2) -#: po/rc.cpp:669 po/rc.cpp:714 ui_prefpreview.h:302 ui_prefpreview.h:326 -#: rc.cpp:669 rc.cpp:714 -msgid "Audio output" -msgstr "Sortie Audio" +#: src/core/k9dvd.cpp:250 +msgid "Lithuanian" +msgstr "Lithuanien" -#. i18n: file: src/main/prefpreview.ui:199 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:331 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:199 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:331 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:672 po/rc.cpp:702 ui_prefpreview.h:305 ui_prefpreview.h:321 -#: rc.cpp:672 rc.cpp:702 -msgid "X11" +#: src/core/k9dvd.cpp:251 +msgid "Latvian, Lettish" msgstr "" -#. i18n: file: src/main/prefpreview.ui:204 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:336 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:204 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:336 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:675 po/rc.cpp:705 ui_prefpreview.h:306 ui_prefpreview.h:322 -#: rc.cpp:675 rc.cpp:705 -msgid "Xv" +#: src/core/k9dvd.cpp:251 +msgid "Malagasy" msgstr "" -#. i18n: file: src/main/prefpreview.ui:209 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:341 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:209 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:341 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:678 po/rc.cpp:708 ui_prefpreview.h:307 ui_prefpreview.h:323 -#: rc.cpp:678 rc.cpp:708 -msgid "OpenGL" -msgstr "OpenGL" - -#. i18n: file: src/main/prefpreview.ui:214 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:239 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:346 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:214 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:239 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:346 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:681 po/rc.cpp:690 po/rc.cpp:711 ui_prefpreview.h:308 -#: ui_prefpreview.h:314 ui_prefpreview.h:324 rc.cpp:681 rc.cpp:690 rc.cpp:711 -msgid "SDL" +#: src/core/k9dvd.cpp:251 +msgid "Maori" msgstr "" -#. i18n: file: src/main/prefpreview.ui:229 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:393 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#. i18n: file: src/main/prefpreview.ui:229 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:393 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#: po/rc.cpp:684 po/rc.cpp:717 ui_prefpreview.h:312 ui_prefpreview.h:329 -#: rc.cpp:684 rc.cpp:717 -msgid "ALSA" -msgstr "" +#: src/core/k9dvd.cpp:251 +msgid "Macedonian" +msgstr "Macédonien" -#. i18n: file: src/main/prefpreview.ui:234 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:398 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#. i18n: file: src/main/prefpreview.ui:234 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:398 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#: po/rc.cpp:687 po/rc.cpp:720 ui_prefpreview.h:313 ui_prefpreview.h:330 -#: rc.cpp:687 rc.cpp:720 -msgid "OSS" +#: src/core/k9dvd.cpp:251 +msgid "Malayalam" msgstr "" -#. i18n: file: src/main/prefpreview.ui:285 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:693 ui_prefpreview.h:316 rc.cpp:693 -msgid "MPlayer options" -msgstr "Options de MPlayer" +#: src/core/k9dvd.cpp:252 +msgid "Mongolian" +msgstr "Mongolien" + +#: src/core/k9dvd.cpp:252 +msgid "Moldavian" +msgstr "Moldave" + +#: src/core/k9dvd.cpp:252 +msgid "Marathi" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Malay" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Maltese" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Burmese" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nauru" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nepali" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nederlands" +msgstr "Néerlandais" + +#: src/core/k9dvd.cpp:253 +msgid "Norsk" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Occitan" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Oromo" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Oriya" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Punjabi" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Polish" +msgstr "Polonais" + +#: src/core/k9dvd.cpp:254 +msgid "Pashto, Pushto" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Portugues" +msgstr "Portugais" + +#: src/core/k9dvd.cpp:255 +msgid "Quechua" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Rhaeto-Romance" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Kirundi" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Romanian" +msgstr "Roumain" + +#: src/core/k9dvd.cpp:256 +msgid "Russian" +msgstr "Russe" + +#: src/core/k9dvd.cpp:256 +msgid "Kinyarwanda" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sanskrit" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sindhi" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sangho" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Serbo-Croatian" +msgstr "Serbo-Croate" + +#: src/core/k9dvd.cpp:257 +msgid "Sinhalese" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Slovak" +msgstr "Slovaque" + +#: src/core/k9dvd.cpp:257 +msgid "Slovenian" +msgstr "Slovène" + +#: src/core/k9dvd.cpp:257 +msgid "Samoan" +msgstr "" + +#: src/core/k9dvd.cpp:258 +msgid "Shona" +msgstr "" + +#: src/core/k9dvd.cpp:258 +msgid "Somali" +msgstr "" + +#: src/core/k9dvd.cpp:258 +msgid "Albanian" +msgstr "Albanais" + +#: src/core/k9dvd.cpp:258 +msgid "Serbian" +msgstr "Serbe" + +#: src/core/k9dvd.cpp:258 +msgid "Siswati" +msgstr "" + +#: src/core/k9dvd.cpp:259 +msgid "Sesotho" +msgstr "" + +#: src/core/k9dvd.cpp:259 +msgid "Sundanese" +msgstr "" + +#: src/core/k9dvd.cpp:259 +msgid "Svenska" +msgstr "" + +#: src/core/k9dvd.cpp:259 +msgid "Swahili" +msgstr "" + +#: src/core/k9dvd.cpp:259 +msgid "Tamil" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Telugu" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Tajik" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Thai" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Tigrinya" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Turkmen" +msgstr "" + +#: src/core/k9dvd.cpp:260 +msgid "Tagalog" +msgstr "" + +#: src/core/k9dvd.cpp:261 +msgid "Setswana" +msgstr "" + +#: src/core/k9dvd.cpp:261 +msgid "Tonga" +msgstr "" + +#: src/core/k9dvd.cpp:261 +msgid "Turkish" +msgstr "Turque" + +#: src/core/k9dvd.cpp:261 +msgid "Tsonga" +msgstr "" + +#: src/core/k9dvd.cpp:261 +msgid "Tatar" +msgstr "" + +#: src/core/k9dvd.cpp:261 +msgid "Twi" +msgstr "" + +#: src/core/k9dvd.cpp:262 +msgid "Uighur" +msgstr "" + +#: src/core/k9dvd.cpp:262 +msgid "Ukrainian" +msgstr "Ukrainien" + +#: src/core/k9dvd.cpp:262 +msgid "Urdu" +msgstr "" + +#: src/core/k9dvd.cpp:262 +msgid "Uzbek" +msgstr "" + +#: src/core/k9dvd.cpp:262 +msgid "Vietnamese" +msgstr "Vietnamien" + +#: src/core/k9dvd.cpp:263 +msgid "Volapuk" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Wolof" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Xhosa" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Yoruba" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Zhuang" +msgstr "" + +#: src/core/k9dvd.cpp:264 +msgid "Chinese" +msgstr "Chinois" + +#: src/core/k9dvd.cpp:264 +msgid "Zulu" +msgstr "" + +#: src/core/k9dvd.cpp:264 src/core/k9dvd.cpp:266 src/core/k9dvd.cpp:488 +msgid "Unknown" +msgstr "Inconnu" + +#: src/core/k9dvd.cpp:356 +msgid "Can't open disc %1!\n" +msgstr "Ne peut ouvrir le disque %1!\n" + +#: src/core/k9dvd.cpp:368 +msgid "Can't open main ifo!\n" +msgstr "Ne peut ouvrir le fichier ifo principal!\n" + +#: src/core/k9dvd.cpp:410 src/core/k9dvd.cpp:700 +msgid "Title %1" +msgstr "Titre %1" + +#: src/core/k9dvd.cpp:753 +msgid "reading title" +msgstr "lecture du titre" + +#: src/core/k9dvd.cpp:870 +msgid "Error opening vobs for title %1\n" +msgstr "Erreur d'ouverture des vobs pour le titre %1\n" + +#: src/core/k9dvd.cpp:881 +msgid "ERROR reading block %1\n" +msgstr "Erreur de lecture du bloc %1\n" + +#: src/core/k9dvdprogress.cpp:29 ui_dvdprogress.h:116 +msgid "DVD Analyze" +msgstr "Analyse du DVD" + +#: src/core/k9process.cpp:139 src/core/k9tools.cpp:34 +#: src/import/k9menu.cpp:165 +msgid "Error starting program %1" +msgstr "Erreur au lancement du programme %1" + +#: src/core/k9process.cpp:139 src/core/k9tools.cpp:34 src/core/k9tools.cpp:56 +#: src/import/k9menu.cpp:165 +msgid "Running program" +msgstr "Exécution du programme" + +#: src/core/k9tools.cpp:47 +msgid "Enter the root password" +msgstr "Entrez le mot de passe 'root'" + +#: src/core/k9tools.cpp:56 +msgid "The root password is not valid" +msgstr "Le mot de passe 'root' est invalide" + +#: src/devices/k9cddrive.cpp:214 +msgid "" +"The root password is needed to change the read ahead property of the dvd " +"drive" +msgstr "" +"Le mode de passe 'root' est nécessaire pour changer les propriétés 'read " +"ahead' du lecteur dvd" + +#: src/import/k9avidecode.cpp:40 src/import/k9avidecode.cpp:44 +#: src/import/k9avidecode.cpp:49 src/vamps/k9ffmpeg.cpp:33 +#: src/vamps/k9ffmpeg.cpp:37 src/vamps/k9ffmpeg.cpp:46 +msgid "Cannot open then library %1" +msgstr "Impossible d'ouvrir la librairie %1" + +#: src/import/k9avidecode.cpp:113 +msgid "Couldn't open the file %1" +msgstr "Ne peut ouvrir le fichier %1" + +#: src/import/k9avidecode.cpp:118 +msgid "Couldn't find stream information" +msgstr "Ne peut trouver les informations du flux" + +#: src/import/k9avidecode.cpp:131 +msgid "The file doesn't contain any video stream" +msgstr "Le fichier ne contient pas de flux vidéo" + +#: src/import/k9avidecode.cpp:142 +msgid "Unsupported codec" +msgstr "Codec non supporté" + +#: src/import/k9avidecode.cpp:147 +msgid "Could'nt open the codec" +msgstr "Ne peut ouvrir le codec" + +#: src/import/k9avidecode.cpp:158 +msgid "Unable to allocate memory for frames" +msgstr "Impossible d'allouer la mémoire pour les images" + +#: src/import/k9import.cpp:36 ui_import.h:130 +msgid "import" +msgstr "importer" + +#: src/import/k9import.cpp:69 src/import/k9menuedit.cpp:283 ui_menuEdit.h:218 +msgid "Root Menu" +msgstr "Menu Racine" + +#: src/import/k9import.cpp:87 src/main/k9main.cpp:492 src/main/k9main.cpp:1303 +#: ui_astsource.h:117 +msgid "ISO Image" +msgstr "Image ISO" + +#: src/import/k9import.cpp:88 src/main/k9main.cpp:1304 ui_astsource.h:116 +msgid "Folder" +msgstr "Dossier" + +#: src/import/k9import.cpp:239 src/import/k9import.cpp:254 +msgid "remove" +msgstr "supprimer" + +#: src/import/k9import.cpp:242 +msgid "add chapter" +msgstr "ajouter un chapitre" + +#: src/import/k9importfiles.cpp:88 +msgid "Add Title" +msgstr "Ajouter un titre" + +#: src/import/k9importfiles.cpp:96 ui_chapterEdit.h:219 +msgid "Chapter properties" +msgstr "Propriétés du chapitre" + +#: src/import/k9importfiles.cpp:109 +msgid "Edit menu" +msgstr "Editer le menu" + +#: src/import/k9importfiles.cpp:158 +msgid "Create DVD" +msgstr "Créer le DVD" + +#: src/import/k9importfiles.cpp:162 src/main/k9settings.cpp:35 +#: ui_astdestination.h:183 +msgid "DVD Backup" +msgstr "Sauvegarde de DVD" + +#: src/import/k9menuedit.cpp:242 +msgid "Title %1 Menu" +msgstr "Menu du titre %1" + +#: src/import/k9menuedit.cpp:251 src/import/k9menuedit.cpp:288 +msgid "Play Menu" +msgstr "Lecture du menu" + +#: src/import/k9menuedit.cpp:253 +msgid "Play Title" +msgstr "Lecture du titre" + +#: src/import/k9menuedit.cpp:259 +msgid "Play Root Menu" +msgstr "Lecture du menu racine" + +#: src/import/k9menuedit.cpp:261 +msgid "Play Title Menu" +msgstr "Lecture du menu du titre" -#. i18n: file: src/main/prefpreview.ui:313 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:696 ui_prefpreview.h:317 rc.cpp:696 -msgid "Xine player options" -msgstr "Options du lecteur Xine" +#: src/import/k9menuedit.cpp:266 src/import/k9menuedit.cpp:292 +msgid "Play Title %1" +msgstr "Lecture du titre %1" -#. i18n: file: src/main/titlefactor.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, titleFactor) -#: po/rc.cpp:723 ui_titlefactor.h:119 rc.cpp:723 -msgid "Shrink Factors" -msgstr "Facteurs de compression" +#: src/import/k9newdvd.cpp:96 +msgid "Creating root menu" +msgstr "Création du menu racine" -#. i18n: file: src/main/titlefactor.ui:28 -#. i18n: ectx: property (text), widget (QLabel, lbTitle) -#: po/rc.cpp:727 ui_titlefactor.h:120 rc.cpp:727 -#, no-c-format -msgid "Shrink Factor for Title %1" -msgstr "Facteur de compression pour le Titre %1" +#: src/import/k9newdvd.cpp:141 +msgid "The dvd authoring was canceled" +msgstr "L'authoring du DVD a été annulé" -#. i18n: file: src/main/titlefactor.ui:44 -#. i18n: ectx: property (title), widget (Q3GroupBox, gbTitle) -#: po/rc.cpp:730 ui_titlefactor.h:121 rc.cpp:730 -msgid "Change Factor" -msgstr "Modifier le facteur" +#: src/import/k9newdvd.cpp:167 +msgid "Creating menu for title %1" +msgstr "Création du menu pour le titre %1" -#. i18n: file: src/main/titlefactor.ui:78 -#. i18n: ectx: property (text), widget (QLabel, tFactor) -#: po/rc.cpp:733 ui_titlefactor.h:122 rc.cpp:733 -msgid "0.00" -msgstr "" +#: src/import/k9newdvd.cpp:442 ui_mp4dlg.h:246 +msgid "fps" +msgstr "img/s" -#. i18n: file: src/main/titlefactor.ui:88 -#. i18n: ectx: property (text), widget (QLabel, lTargetSize) -#: po/rc.cpp:737 src/main/k9titlefactor.cpp:64 src/main/k9titlefactor.cpp:101 -#: src/main/k9titlefactor.cpp:135 ui_titlefactor.h:123 rc.cpp:737 -#, no-c-format -msgid "size : %1 MB" -msgstr "taille : %1 Mo" +#: src/import/k9newdvd.cpp:479 src/import/k9newtitle.cpp:97 +msgid "title %1" +msgstr "titre %1" -#. i18n: file: src/main/viewmpeg2.ui:31 -#. i18n: ectx: property (windowTitle), widget (QWidget, ViewMPEG2) -#: po/rc.cpp:740 ui_viewmpeg2.h:136 rc.cpp:740 -msgid "k9Copy - Title Preview" -msgstr "Aperçu du Titre" +#: src/import/k9newtitle.cpp:89 ui_newTitle.h:192 +msgid "Add title" +msgstr "Ajouter un titre" -#. i18n: file: src/mplayer/mplayer.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MPlayer) -#: po/rc.cpp:743 src/main/k9copy.cpp:176 src/main/k9settings.cpp:50 -#: src/mplayer/k9mplayer.cpp:105 src/mplayer/k9xine.cpp:143 ui_mplayer.h:239 -#: rc.cpp:743 -msgid "Preview" -msgstr "Aperçu" +#: src/main/k9copy.cpp:56 src/main/k9main.cpp:385 src/main/k9main.cpp:604 +#: src/main/k9main.cpp:1184 src/main/k9main.cpp:1186 src/main/k9main.cpp:1249 +msgid "Ready" +msgstr "Prêt" -#. i18n: file: src/mplayer/mplayer.ui:54 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:749 ui_mplayer.h:242 rc.cpp:749 -msgid "Subpicture" -msgstr "Sous-titre" +#: src/main/k9copy.cpp:115 +msgid "Shrink Factor" +msgstr "Facteur de compression" -#. i18n: file: src/mplayer/mplayer.ui:271 -#. i18n: ectx: property (text), widget (QToolButton, bDown) -#: po/rc.cpp:752 ui_mplayer.h:247 rc.cpp:752 -msgid "-" -msgstr "" +#: src/main/k9copy.cpp:126 +msgid "MPEG4 Encoding Options" +msgstr "Options d'encodage MPEG-4" -#. i18n: file: src/mplayer/mplayer.ui:391 -#. i18n: ectx: property (text), widget (QToolButton, bUp) -#: po/rc.cpp:755 ui_mplayer.h:249 rc.cpp:755 -msgid "+" -msgstr "" +#: src/main/k9copy.cpp:148 ui_playbackoptionsw.h:226 +msgid "DVD playback options" +msgstr "Options de lecture du DVD" -#: po/rc.cpp:765 rc.cpp:765 -msgctxt "NAME OF TRANSLATORS" -msgid "Your names" -msgstr "" +#: src/main/k9copy.cpp:157 ui_langselectw.h:61 +msgid "Selection" +msgstr "Sélection" -#: po/rc.cpp:766 rc.cpp:766 -msgctxt "EMAIL OF TRANSLATORS" -msgid "Your emails" -msgstr "" +#: src/main/k9copy.cpp:175 src/main/k9settings.cpp:50 +#: src/mplayer/k9mplayer.cpp:157 src/mplayer/k9xine.cpp:143 ui_mplayer.h:239 +msgid "Preview" +msgstr "Aperçu" -#: src/assistant/k9assistant.cpp:43 -msgid "DVD backup assistant" -msgstr "Assistant de backup de DVD" +#: src/main/k9copy.cpp:247 +msgid "Copy" +msgstr "Copie" -#: src/assistant/k9assistant.cpp:47 -msgid "source" -msgstr "source" +#: src/main/k9copy.cpp:252 +msgid "Extract to MPEG files" +msgstr "Extraction vers fichiers MPEG" -#: src/assistant/k9assistant.cpp:48 -msgid "Select the source of the backup" -msgstr "Sélectionnez la source du backup" +#: src/main/k9copy.cpp:257 +msgid "Create MPEG-4" +msgstr "Encoder au format MPEG-4" -#: src/assistant/k9assistant.cpp:54 -msgid "destination" -msgstr "destination" +#: src/main/k9copy.cpp:266 +msgid "Eject" +msgstr "Ejecter" -#: src/assistant/k9assistant.cpp:55 -msgid "Select the destination of the backup" -msgstr "Sélectionnez la destination du backup" +#: src/main/k9copy.cpp:272 +msgid "Wizard" +msgstr "Assistant" -#: src/assistant/k9assistant.cpp:61 -msgid "Select the titles you want to copy" -msgstr "Sélectionnez les titres que vous voulez copier" +#: src/main/k9copy.cpp:279 +msgid "DVD Author" +msgstr "Création de DVD" -#: src/assistant/k9assistant.cpp:68 -msgid "streams" -msgstr "flux" +#: src/main/k9ffmpegcmdgen.cpp:129 +msgid "ffmpeg command generator" +msgstr "générateur de commande ffmpeg" -#: src/assistant/k9assistant.cpp:69 -msgid "Select the streams you want to keep" -msgstr "Sélectionnez les flux que vous voulez conserver" +#: src/main/k9langselect.cpp:89 ui_mplayer.h:240 ui_phonon.h:122 +#: ui_playbackoptionsw.h:234 ui_prefAuthor.h:192 ui_prefMPEG4.h:414 +msgid "Audio" +msgstr "Audio" -#: src/assistant/k9assistant.cpp:75 -msgid "mp4" -msgstr "" +#: src/main/k9langselect.cpp:100 ui_phonon.h:123 +msgid "Subtitles" +msgstr "Sous-titres" -#: src/assistant/k9assistant.cpp:76 -msgid "Set mp4 options for each title" -msgstr "Définir les options mp4 pour chaque titre" +#: src/main/k9main.cpp:558 +msgid "Open DVD" +msgstr "Ouvrir le DVD" -#: src/assistant/k9assistant.cpp:82 -msgid "DVDOption" +#: src/main/k9main.cpp:578 +msgid "Titleset %1" msgstr "" -#: src/assistant/k9assistant.cpp:83 -msgid "Set DVD playback options" -msgstr "Définir les options de lecture du DVD" - -#: src/assistant/k9assistant.cpp:89 -msgid "mpeg" -msgstr "mpeg" +#: src/main/k9main.cpp:643 +msgid "chapters" +msgstr "chapitres" -#: src/assistant/k9assistant.cpp:90 -msgid "Set mpeg options for each title" -msgstr "Définir les options mpeg pour chaque titre" +#: src/main/k9main.cpp:712 +msgid "video %1 " +msgstr "" -#: src/assistant/k9assistant.cpp:109 src/assistant/k9assistant.cpp:192 -#: src/import/k9importfiles.cpp:200 src/main/k9copy.cpp:362 -#: src/main/k9settings.cpp:23 -msgid "Settings" -msgstr "Paramètres" +#: src/main/k9main.cpp:724 +msgid "audio %1 " +msgstr "" -#: src/assistant/k9assistant.cpp:110 -msgid "k9copy settings" -msgstr "Paramètres de k9copy" +#: src/main/k9main.cpp:746 +msgid "subpicture %1 " +msgstr "Sous-titre %1 " -#: src/assistant/k9assistant.cpp:145 -msgid "The destination of the copy isn't valid" -msgstr "La destination de la copie est invalide" +#: src/main/k9main.cpp:1397 +msgid "Open ISO Image" +msgstr "Ouvrir l'image ISO" -#: src/assistant/k9assistant.cpp:153 -msgid "You must select at least on title !" -msgstr "Vous devez sélectionner au moins un titre !" +#: src/main/k9mencodercmdgen.cpp:63 ui_mencoderCmdGen.h:108 +msgid "MEncoder options" +msgstr "Options de MEncoder" -#: src/assistant/k9assistant.cpp:187 -msgid "cannot continue" -msgstr "ne peut continuer" +#: src/main/k9mencodercmdgen.cpp:78 +msgid "Audio Codec" +msgstr "Codec Audio" -#: src/assistant/k9aststreams.cpp:38 -msgid "audio : %1 %2 %3 ch" -msgstr "audio : %1 %2 %3 ch" - -#: src/assistant/k9aststreams.cpp:49 -msgid "subtitle : %1 %2" -msgstr "sous titres : %1 %2" - -#: src/assistant/k9asttitles.cpp:187 src/backup/k9mp4enc.cpp:199 -#: src/backup/k9mp4enc.cpp:201 src/backup/k9mp4enc.cpp:251 -#: src/backup/k9mp4enc.cpp:446 src/main/k9main.cpp:550 src/main/k9main.cpp:666 -#: src/main/k9main.cpp:683 src/main/k9mp4title.cpp:50 -#: src/main/k9prefdvd.cpp:37 src/main/k9prefmpeg4.cpp:35 -msgid "MB" -msgstr "Mo" +#: src/main/k9mencodercmdgen.cpp:94 +msgid "Video Codec" +msgstr "Codec Vidéo" -#: src/backup/k9dvdauthor.cpp:147 src/backup/k9dvdauthor.cpp:392 -msgid "'%1' not selected" -msgstr "'%1' non sélectionné" +#: src/main/k9mencodercmdgen.cpp:113 +msgid "Filters" +msgstr "Filtres" -#: src/backup/k9dvdauthor.cpp:148 src/backup/k9dvdauthor.cpp:393 -#: src/backup/k9dvdauthor.cpp:416 src/backup/k9dvdauthor.cpp:470 -#: src/backup/k9dvdauthor.cpp:479 src/backup/k9dvdauthor.cpp:482 -#: src/core/k9burndvd.cpp:243 src/core/k9burndvd.cpp:327 -#: src/import/k9newdvd.cpp:129 -msgid "authoring" -msgstr "authoring" +#: src/main/k9mp4title.cpp:40 src/main/k9mp4title.cpp:138 +#: src/main/k9titlefactor.cpp:111 +msgid "Select a Title in the treeview..." +msgstr "Sélectionnez un titre dans l'arborescence..." -#: src/backup/k9dvdauthor.cpp:416 src/backup/k9mp4enc.cpp:113 -#: src/core/k9burndvd.cpp:231 src/core/k9burndvd.cpp:315 -#: src/mplayer/k9mplayer.cpp:105 src/mplayer/k9xine.cpp:143 -msgid "Unable to run %1" -msgstr "Impossible d'exécuter %1" +#: src/main/k9playbackoptions.cpp:149 +msgid "none" +msgstr "aucun" -#: src/backup/k9dvdauthor.cpp:429 src/backup/k9dvdauthor.cpp:510 -#: src/backup/k9dvdauthor.cpp:548 src/import/k9newdvd.cpp:150 -#: src/main/k9settings.cpp:56 src/main/k9settings.cpp:57 -msgid "Authoring" -msgstr "Authoring" +#: src/main/k9prefmencoder.cpp:145 src/main/k9prefmencoder.cpp:149 +#: src/main/k9prefmencoder.cpp:160 src/main/k9prefmencoder.cpp:162 +msgid "new profile" +msgstr "nouveau profil" -#: src/backup/k9dvdauthor.cpp:470 -msgid "Dvdauthor error :\n" -msgstr "Erreur dans DVDAuthor :\n" +#: src/main/k9settings.cpp:29 src/main/kconfigdlg.cpp:35 ui_configDlg.h:123 +msgid "Devices" +msgstr "Lecteurs" -#: src/backup/k9dvdauthor.cpp:479 -msgid "Authoring cancelled" -msgstr "L'authoring a été annulé" +#: src/main/k9settings.cpp:30 +msgid "Devices not detected by k9copy" +msgstr "Périphériques non détectés par k9copy" -#: src/backup/k9dvdauthor.cpp:482 src/import/k9newdvd.cpp:143 -msgid "An error occured while running DVDAuthor:\n" -msgstr "Un erreur est survenue lors de l'exécution de DVDAuthor\n" +#: src/main/k9settings.cpp:34 +msgid "DVD" +msgstr "DVD" -#: src/backup/k9dvdauthor.cpp:549 -msgid "Fixing VOBUS" -msgstr "Correction des VOBUS" +#: src/main/k9settings.cpp:39 +msgid "MEncoder" +msgstr "" -#: src/backup/k9dvdbackup.cpp:149 src/backup/k9dvdbackup.cpp:163 -#: src/backup/k9dvdbackup.cpp:526 src/backup/k9dvdbackup.cpp:612 -msgid "DVD backup cancelled" -msgstr "Le Backup du DVD a été annulé" +#: src/main/k9settings.cpp:40 +msgid "MPEG-4 Codecs" +msgstr "Codecs MPEG-4" -#: src/backup/k9dvdbackup.cpp:176 -msgid "unable to open VIDEO_TS.IFO" -msgstr "impossible d'ouvrir VIDEO_TS.IFO" +#: src/main/k9settings.cpp:44 +msgid "MPEG-4" +msgstr "" -#: src/backup/k9dvdbackup.cpp:198 src/backup/k9dvdbackup.cpp:380 -#: src/backup/k9dvdbackup.cpp:450 -msgid "Unable to open file " -msgstr "Impossible d'ouvrir le fichier " +#: src/main/k9settings.cpp:51 +msgid "Title preview" +msgstr "Aperçu du Titre" -#: src/backup/k9dvdbackup.cpp:276 -msgid "Unable to open titleset %1" -msgstr "Impossible d'ouvrir le titleset %1" +#: src/main/k9titlefactor.cpp:64 src/main/k9titlefactor.cpp:101 +#: src/main/k9titlefactor.cpp:135 ui_titlefactor.h:123 +msgid "size : %1 MB" +msgstr "taille : %1 Mo" -#: src/backup/k9dvdbackup.cpp:282 src/backup/k9dvdbackup.cpp:584 -msgid "Extracting titleset %1" -msgstr "lecture du titleset %1" +#: src/main/k9titlefactor.cpp:122 +msgid "Shrink Factor for %1" +msgstr "Facteur de compression pour %1" -#: src/backup/k9dvdbackup.cpp:457 -msgid "Unable to open menu for titleset %1" -msgstr "Impossible d'ouvrir le menu pour le titleset %1" +#: src/main/kviewmpeg2.cpp:81 +msgid "Title Preview" +msgstr "Aperçu du Titre" -#: src/backup/k9dvdbackup.cpp:483 -msgid "Extracting menu for titleset %1" -msgstr "Extraction du menu pour le titleset %1" +#: src/player/k9play.cpp:341 +msgid "Error opening the DVD" +msgstr "Erreur à l'ouverture du DVD" -#: src/backup/k9dvdbackup.cpp:576 -msgid "Unable to open ifo file for titleset %1" -msgstr "Impossible d'ouvrir le fichier ifo pour le titre %1" +#: src/player/k9play.cpp:348 +msgid "Error on dvdnav_set_readahead_flag: %1" +msgstr "" -#: src/backup/k9dvdbackup.cpp:588 src/backup/k9dvdbackup.cpp:1703 -msgid "Unable to open DVD" -msgstr "Impossible d'ouvrir le DVD" +#: src/player/k9play.cpp:357 +msgid "Error on setting languages: %1" +msgstr "Erreur lors de la définition de la langue %1" -#: src/backup/k9dvdbackup.cpp:598 -msgid "Unable to open vobs for titleset %1" -msgstr "Erreur d'ouverture des vobs pour le titre %1" +#: src/player/k9play.cpp:365 +msgid "Error on dvdnav_set_PGC_positioning_flag: %1" +msgstr "" -#: src/backup/k9dvdbackup.cpp:1393 -msgid "Updating vob %1" -msgstr "Mise à jour du vob %1" +#: src/player/k9play.cpp:400 +msgid "Error getting next block: %1" +msgstr "Erreur lors de la lecture du block suivant %1" -#: src/backup/k9dvdbackup.cpp:1410 -msgid "DVD backup canceled" -msgstr "Le backup du DVD a été annulé" +#: src/vamps/k9ffmpeg.cpp:41 +msgid "Cannot open the library %1" +msgstr "Impossible d'ouvrir la librairie %1" -#: src/backup/k9execcopy.cpp:30 src/backup/k9execcopy.cpp:106 -#: src/backup/k9execcopy.cpp:172 src/main/k9main.cpp:358 -#: src/main/k9main.cpp:1086 src/main/k9main.cpp:1155 -msgid "DVD is not opened" -msgstr "Le DVD n'est pas ouvert" +#: src/xine/main.cpp:50 +msgid "wid" +msgstr "" -#: src/backup/k9execcopy.cpp:30 src/backup/k9execcopy.cpp:54 -#: src/backup/k9execcopy.cpp:96 src/main/k9main.cpp:358 -#: src/main/k9main.cpp:383 -msgid "DVD Copy" -msgstr "Copie de DVD" +#: src/xine/main.cpp:51 +msgid "vo" +msgstr "" -#: src/backup/k9execcopy.cpp:54 src/main/k9main.cpp:383 -msgid "" -"Insufficient disk space on %1\n" -"%2 mb expected." +#: src/xine/main.cpp:52 +msgid "ao" msgstr "" -"Espace disque insuffisant sur %1\n" -"%2 mb attendus." -#: src/backup/k9execcopy.cpp:96 src/backup/k9execcopy.cpp:219 -#: src/main/k9main.cpp:1202 -msgid "Selected titles have been successfully extracted" -msgstr "Les titres sélectionnés ont été extraits avec succès" +#: ui_astdestination.h:181 ui_astdvdoption.h:88 ui_astmp4.h:76 ui_astmpeg.h:76 +#: ui_astsource.h:113 ui_aststreams.h:53 ui_asttitles.h:71 +#: ui_ffmpegCmdGen.h:570 ui_phonon.h:119 +msgid "Form" +msgstr "" -#: src/backup/k9execcopy.cpp:124 src/backup/k9execcopy.cpp:190 -#: src/backup/k9mp4enc.cpp:189 src/main/k9main.cpp:1105 -#: src/main/k9main.cpp:1174 -msgid "Save file to disk" -msgstr "Enregister le fichier sur le disque" +#: ui_astdestination.h:185 +msgid "to Disc" +msgstr "sur disque" -#: src/backup/k9execcopy.cpp:163 src/main/k9main.cpp:1144 -msgid "Selected titles have been successfully encoded" -msgstr "Les titres sélectionnés ont été encodés avec succès" +#: ui_astdestination.h:186 +msgid "to Folder" +msgstr "vers un dossier" -#: src/backup/k9mp4dlg.cpp:27 -msgid "transcoding" -msgstr "transcodage" +#: ui_astdestination.h:187 +msgid "to Iso image" +msgstr "vers une image Iso" -#: src/backup/k9mp4enc.cpp:113 src/backup/k9mp4enc.cpp:387 -msgid "Encoding error" -msgstr "Erreur d'encodage" +#: ui_astdestination.h:188 +msgid "Rip and encode DVD" +msgstr "Extraire et encoder le DVD" -#: src/backup/k9mp4enc.cpp:302 src/backup/k9mp4enc.cpp:304 -#: src/import/k9newdvd.cpp:274 -msgid "Encoding %1" -msgstr "Encodage %1" +#: ui_astdestination.h:189 +msgid "Rip DVD without encoding" +msgstr "Extraire le DVD sans encoder" -#: src/backup/k9mp4enc.cpp:302 -msgid "pass %1" -msgstr "passe %1" +#: ui_astdestination.h:190 +msgid "Extract audio" +msgstr "Extraire les pistes audio" -#: src/backup/k9mp4enc.cpp:387 -msgid "Error while running mencoder :" -msgstr "Un erreur est survenue lors de l'exécution de MEncoder :" - -#: src/core/k9burndvd.cpp:187 src/core/k9burndvd.cpp:188 -#: src/core/k9burndvd.cpp:261 src/core/k9burndvd.cpp:262 -#: src/core/k9burndvd.cpp:355 src/main/k9main.cpp:417 -msgid "Burning DVD" -msgstr "Gravure du DVD" +#: ui_astdvdoption.h:90 +msgid "Copy original menus" +msgstr "Copier les menus originaux" -#: src/core/k9burndvd.cpp:199 src/core/k9burndvd.cpp:290 -#: src/import/k9import.cpp:313 src/main/k9main.cpp:368 -msgid "Save image to disk" -msgstr "Enregister l'image sur le disque" +#: ui_astdvdoption.h:91 +msgid "Don't copy menus." +msgstr "Ne pas copier les menus" -#: src/core/k9burndvd.cpp:222 src/core/k9burndvd.cpp:308 -msgid "Insert a recordable DVD" -msgstr "Insérer un DVD enregistrable" +#: ui_astdvdoption.h:92 +msgid "Drag items to set title playing sequence" +msgstr "Déplacer les éléments de la liste pour définir l'ordre de lecture" -#: src/core/k9burndvd.cpp:222 src/core/k9burndvd.cpp:231 -#: src/core/k9burndvd.cpp:236 src/core/k9burndvd.cpp:309 -#: src/core/k9burndvd.cpp:315 src/core/k9burndvd.cpp:320 -msgid "DVD burning" -msgstr "Gravure du DVD" +#: ui_astmp4.h:77 +msgid "Encoding options for title " +msgstr "Options d'encodage pour le titre" -#: src/core/k9burndvd.cpp:231 src/core/k9burndvd.cpp:315 -msgid "Error burning DVD :\n" -msgstr "Erreur lors de lors de la gravure du DVD :\n" +#: ui_astmpeg.h:77 +msgid "Select options for title" +msgstr "Sélectionnez les options du titre" -#: src/core/k9burndvd.cpp:236 src/core/k9burndvd.cpp:320 -msgid "DVD Burning finished" -msgstr "Gravure du DVD terminée" +#: ui_astsource.h:115 +msgid "DVD Drive" +msgstr "Lecteur DVD" -#: src/core/k9burndvd.cpp:242 src/core/k9burndvd.cpp:326 -msgid "An error occured while Burning DVD: %1" -msgstr "Un erreur est survenue pendant la gravure du DVD : %1" +#: ui_aststreams.h:54 +msgid "Selected titles" +msgstr "Titres sélectionnés" -#: src/core/k9burndvd.cpp:242 src/core/k9burndvd.cpp:326 -msgid "Insert an other DVD" -msgstr "Insérer un autre DVD" +#: ui_asttitles.h:73 +msgid "size" +msgstr "Taille" -#: src/core/k9burndvd.cpp:356 -msgid "Current write speed :%1 x" -msgstr "Vitesse d'écriture :%1 x" +#: ui_backupdlg.h:242 +msgid "

DVD Backup

" +msgstr "" -#: src/core/k9dialogs.cpp:124 -msgid "select a directory" -msgstr "sélectionnez un répertoire" +#: ui_backupdlg.h:243 +msgid "Current step" +msgstr "Etape en cours" -#: src/core/k9dvd.cpp:133 -msgid "for visually impaired" -msgstr "pour déficients visuels" +#: ui_backupdlg.h:244 ui_mp4dlg.h:247 ui_progress.h:173 +msgid "Elapsed Time" +msgstr "Temps écoulé" -#: src/core/k9dvd.cpp:134 -msgid "director's comments" -msgstr "commentaires du réalisateur" +#: ui_backupdlg.h:245 ui_chapterEdit.h:220 ui_import.h:139 ui_newTitle.h:194 +msgid "--:--:--" +msgstr "" -#: src/core/k9dvd.cpp:135 -msgid "alternate director's comments" -msgstr "commentaires du réalisateurs alternatifs" +#: ui_chapterEdit.h:222 +msgid "" +"*.avi\n" +"*.mpeg\n" +"*.mpg\n" +"*.*" +msgstr "" -#: src/core/k9dvd.cpp:139 -msgid "Large" -msgstr "Large" +#: ui_chapterEdit.h:226 +msgid "start" +msgstr "Au démarrage" -#: src/core/k9dvd.cpp:140 -msgid "Children" -msgstr "Enfants" +#: ui_chapterEdit.h:227 ui_chapterEdit.h:231 ui_newTitle.h:198 +msgid "HH:mm:ss" +msgstr "" -#: src/core/k9dvd.cpp:141 src/core/k9dvd.cpp:147 src/core/k9dvd.cpp:148 -#: src/core/k9dvd.cpp:149 -msgid "reserved" -msgstr "réservé" +#: ui_chapterEdit.h:228 ui_chapterEdit.h:232 +msgid "set Current Frame" +msgstr "Image courante" -#: src/core/k9dvd.cpp:142 -msgid "Normal captions" -msgstr "Sous-titres normaux" +#: ui_chapterEdit.h:229 ui_chapterEdit.h:233 +msgid "break continuity" +msgstr "rupture de continuité" -#: src/core/k9dvd.cpp:143 -msgid "Large captions" -msgstr "Sous-titres larges" +#: ui_chapterEdit.h:230 +msgid "end" +msgstr "fin" -#: src/core/k9dvd.cpp:144 -msgid "Children captions" -msgstr "Sous-titres pour enfants" +#: ui_chapterEdit.h:234 +msgid "set Title button" +msgstr "définir le bouton du titre" -#: src/core/k9dvd.cpp:146 -msgid "Forced" -msgstr "Forcé" +#: ui_configDlg.h:124 +msgid "device" +msgstr "périphérique" -#: src/core/k9dvd.cpp:150 -msgid "Director's comments" -msgstr "Commentaires du réalisateur" +#: ui_configDlg.h:125 ui_prefMencoder.h:485 ui_prefMencoder.h:501 +msgid "label" +msgstr "libellé" -#: src/core/k9dvd.cpp:151 -msgid "Large director's comments" -msgstr "Commentaires du réalisateur larges" +#: ui_configDlg.h:126 +msgid "Input" +msgstr "Entrée" -#: src/core/k9dvd.cpp:152 -msgid "Director's comments for children" -msgstr "Commentaires du réalisateur pour les enfants" +#: ui_configDlg.h:127 ui_import.h:131 ui_prefDVD.h:211 +msgid "Output" +msgstr "Sortie" -#: src/core/k9dvd.cpp:202 -msgid "Couldn't open %1 for title\n" -msgstr "Ne peut ouvrir %1 pour lecture du titre\n" +#: ui_configDlg.h:128 ui_newTitle.h:200 +msgid "Add" +msgstr "Ajouter" -#: src/core/k9dvd.cpp:204 src/core/k9dvd.cpp:212 src/core/k9dvd.cpp:220 -#: src/core/k9dvd.cpp:382 src/main/k9main.cpp:527 -msgid "unknown" -msgstr "inconnu" +#: ui_configDlg.h:130 +msgid "Remove" +msgstr "Supprimer" -#: src/core/k9dvd.cpp:210 -msgid "Couldn't seek in %1 for title\n" -msgstr "Ne peut accéder à %1 pour lecture du titre\n" +#: ui_ffmpegCmdGen.h:573 +msgid "Set the video bitrate in bit/s (default = 200 kb/s)" +msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Not Specified" -msgstr "Non spécifié" +#: ui_ffmpegCmdGen.h:576 +msgid "b" +msgstr "b" -#: src/core/k9dvd.cpp:237 -msgid "Afar" +#: ui_ffmpegCmdGen.h:577 +msgid "$VIDBRk" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Abkhazian" +#: ui_ffmpegCmdGen.h:578 ui_ffmpegCmdGen.h:767 +msgid "k" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Afrikaans" +#: ui_ffmpegCmdGen.h:581 +msgid "Set the number of video frames to record" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Amharic" +#: ui_ffmpegCmdGen.h:584 +msgid "vframes" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Arabic" -msgstr "Arabe" - -#: src/core/k9dvd.cpp:238 -msgid "Assamese" +#: ui_ffmpegCmdGen.h:587 +msgid "Set frame rate (Hz value, fraction or abbreviation), (default = 25)" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Aymara" +#: ui_ffmpegCmdGen.h:590 +msgid "r" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Azerbaijani" +#: ui_ffmpegCmdGen.h:593 +msgid "" +"Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg " +"default = same as source)" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Bashkir" +#: ui_ffmpegCmdGen.h:596 +msgid "s" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Byelorussian" -msgstr "Biélorusse" - -#: src/core/k9dvd.cpp:239 -msgid "Bulgarian" -msgstr "Bulgare" - -#: src/core/k9dvd.cpp:239 -msgid "Bihari" +#: ui_ffmpegCmdGen.h:599 +msgid "$WIDTHx$HEIGHT" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Bislama" +#: ui_ffmpegCmdGen.h:600 +msgid "sqcif" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Bengali; Bangla" +#: ui_ffmpegCmdGen.h:601 +msgid "qcif" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Tibetan" -msgstr "Tibétain" - -#: src/core/k9dvd.cpp:240 -msgid "Breton" -msgstr "Breton" - -#: src/core/k9dvd.cpp:240 -msgid "Catalan" +#: ui_ffmpegCmdGen.h:602 +msgid "cif" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Corsican" -msgstr "Corse" - -#: src/core/k9dvd.cpp:240 -msgid "Czech" -msgstr "Tchèque" - -#: src/core/k9dvd.cpp:241 -msgid "Welsh" -msgstr "Gallois" - -#: src/core/k9dvd.cpp:241 -msgid "Dansk" -msgstr "Danois" - -#: src/core/k9dvd.cpp:241 -msgid "Deutsch" -msgstr "Allemand" - -#: src/core/k9dvd.cpp:241 -msgid "Bhutani" +#: ui_ffmpegCmdGen.h:603 +msgid "4cif" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Greek" -msgstr "Grèque" - -#: src/core/k9dvd.cpp:241 -msgid "English" -msgstr "Anglais" +#: ui_ffmpegCmdGen.h:604 +msgid "qqvga" +msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Esperanto" +#: ui_ffmpegCmdGen.h:605 +msgid "qvga" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Espanol" -msgstr "Espagnol" +#: ui_ffmpegCmdGen.h:606 +msgid "vga" +msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Estonian" -msgstr "Estonien" +#: ui_ffmpegCmdGen.h:607 +msgid "svga" +msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Basque" +#: ui_ffmpegCmdGen.h:608 +msgid "xga" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Persian" -msgstr "Perse" +#: ui_ffmpegCmdGen.h:609 +msgid "uxga" +msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Suomi" +#: ui_ffmpegCmdGen.h:610 +msgid "qxga" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Fiji" +#: ui_ffmpegCmdGen.h:611 +msgid "sxga" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Faroese" +#: ui_ffmpegCmdGen.h:612 +msgid "qsxga" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Francais" -msgstr "Français" +#: ui_ffmpegCmdGen.h:613 +msgid "hsxga" +msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Frisian" +#: ui_ffmpegCmdGen.h:614 +msgid "wvga" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Gaelic" -msgstr "Gaélique" +#: ui_ffmpegCmdGen.h:615 +msgid "wsxga" +msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Scots Gaelic" -msgstr "Gaélique Ecossais" +#: ui_ffmpegCmdGen.h:616 +msgid "wuxga" +msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Galician" -msgstr "Gaélique" +#: ui_ffmpegCmdGen.h:617 +msgid "woxga" +msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Guarani" +#: ui_ffmpegCmdGen.h:618 +msgid "wqsxga" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Gujarati" +#: ui_ffmpegCmdGen.h:619 +msgid "wquxga" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Hausa" +#: ui_ffmpegCmdGen.h:620 +msgid "whuxga" msgstr "" -#: src/core/k9dvd.cpp:245 src/core/k9dvd.cpp:247 -msgid "Hebrew" -msgstr "Hébreux" +#: ui_ffmpegCmdGen.h:621 +msgid "cga" +msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Hindi" +#: ui_ffmpegCmdGen.h:622 +msgid "ega" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Hrvatski" +#: ui_ffmpegCmdGen.h:623 +msgid "hd480" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Magyar" +#: ui_ffmpegCmdGen.h:624 +msgid "hd720" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Armenian" -msgstr "Arménien" +#: ui_ffmpegCmdGen.h:625 +msgid "hd1080" +msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Interlingua" +#: ui_ffmpegCmdGen.h:629 +msgid "Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Indonesian" -msgstr "Indonésien" +#: ui_ffmpegCmdGen.h:632 +msgid "aspect" +msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Interlingue" +#: ui_ffmpegCmdGen.h:635 +msgid "4:3" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Inupiak" +#: ui_ffmpegCmdGen.h:636 +msgid "16:9" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Islenska" +#: ui_ffmpegCmdGen.h:640 +msgid "Set top crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Italiano" -msgstr "Italien" +#: ui_ffmpegCmdGen.h:643 +msgid "croptop" +msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Inuktitut" +#: ui_ffmpegCmdGen.h:646 +msgid "Set bottom crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Japanese" -msgstr "Japonais" +#: ui_ffmpegCmdGen.h:649 +msgid "cropbottom" +msgstr "" -#: src/core/k9dvd.cpp:248 src/core/k9dvd.cpp:263 -msgid "Yiddish" +#: ui_ffmpegCmdGen.h:652 +msgid "Set left crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Javanese" -msgstr "Javanais" +#: ui_ffmpegCmdGen.h:655 +msgid "cropleft" +msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Georgian" -msgstr "Géorgien" +#: ui_ffmpegCmdGen.h:658 +msgid "Set right crop band size (in pixels)." +msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Kazakh" +#: ui_ffmpegCmdGen.h:661 +msgid "cropright" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Greenlandic" +#: ui_ffmpegCmdGen.h:664 ui_ffmpegCmdGen.h:693 +msgid "Set right crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Cambodian" -msgstr "Cambodgien" +#: ui_ffmpegCmdGen.h:669 +msgid "Set top pad band size (in pixels)" +msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kannada" +#: ui_ffmpegCmdGen.h:672 +msgid "padtop" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Korean" -msgstr "Coréen" +#: ui_ffmpegCmdGen.h:675 +msgid "Set bottom pad band size (in pixels)" +msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kashmiri" +#: ui_ffmpegCmdGen.h:678 +msgid "padbottom" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kurdish" +#: ui_ffmpegCmdGen.h:681 +msgid "Set left pad band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Kirghiz" +#: ui_ffmpegCmdGen.h:684 +msgid "padleft" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Latin" +#: ui_ffmpegCmdGen.h:687 +msgid "Set right pad band size (in pixels)." msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Lingala" +#: ui_ffmpegCmdGen.h:690 +msgid "padright" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Laothian" -msgstr "Laotien" +#: ui_ffmpegCmdGen.h:698 +msgid "" +"Set color of padded bands. The value for padcolor is expressed as a six " +"digit hexadecimal number where the first two digits represent red, the " +"middle two digits green and last two digits blue (default = 000000 (black))" +msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Lithuanian" -msgstr "Lithuanien" +#: ui_ffmpegCmdGen.h:701 +msgid "padcolor" +msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Latvian, Lettish" +#: ui_ffmpegCmdGen.h:702 +msgid "HHHHHH; " msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Malagasy" +#: ui_ffmpegCmdGen.h:705 +msgid "Set video bitrate tolerance (in bit/s)" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Maori" +#: ui_ffmpegCmdGen.h:708 +msgid "bt" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Macedonian" -msgstr "Macédonien" +#: ui_ffmpegCmdGen.h:711 +msgid "Set max video bitrate (in bit/s)" +msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Malayalam" +#: ui_ffmpegCmdGen.h:714 +msgid "maxrate" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Mongolian" -msgstr "Mongolien" +#: ui_ffmpegCmdGen.h:717 +msgid "Set min video bitrate (in bit/s)" +msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Moldavian" -msgstr "Moldave" +#: ui_ffmpegCmdGen.h:720 +msgid "minrate" +msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Marathi" +#: ui_ffmpegCmdGen.h:723 +msgid "Set video buffer verifier buffer size (in bits)" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Malay" +#: ui_ffmpegCmdGen.h:726 +msgid "bufsize" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Maltese" +#: ui_ffmpegCmdGen.h:729 +msgid "" +"Force video codec to codec. Use the copy special value to tell that the raw " +"codec data must be copied as is" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Burmese" +#: ui_ffmpegCmdGen.h:732 +msgid "vcodec" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nauru" +#: ui_ffmpegCmdGen.h:735 +msgid "copy" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nepali" +#: ui_ffmpegCmdGen.h:739 +msgid "Use same video quality as source (implies VBR)" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nederlands" -msgstr "Néerlandais" +#: ui_ffmpegCmdGen.h:742 +msgid "sameq" +msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Norsk" +#: ui_ffmpegCmdGen.h:743 +msgid "pass" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Occitan" +#: ui_ffmpegCmdGen.h:744 +msgid "$PASS" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Oromo" +#: ui_ffmpegCmdGen.h:745 +msgid "passlogfile" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Oriya" +#: ui_ffmpegCmdGen.h:746 +msgid "$PASSLOGFILE" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Punjabi" +#: ui_ffmpegCmdGen.h:747 +msgid "FFMpeg Video options " msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Polish" -msgstr "Polonais" +#: ui_ffmpegCmdGen.h:750 +msgid "Set the number of audio frames to record" +msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Pashto, Pushto" +#: ui_ffmpegCmdGen.h:753 +msgid "aframes" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Portugues" -msgstr "Portugais" +#: ui_ffmpegCmdGen.h:756 +msgid "Set the audio sampling frequency (default = 44100 Hz)" +msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Quechua" +#: ui_ffmpegCmdGen.h:759 +msgid "ar" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Rhaeto-Romance" +#: ui_ffmpegCmdGen.h:762 +msgid "Set the audio bitrate in bit/s (default = 64k)" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Kirundi" +#: ui_ffmpegCmdGen.h:765 +msgid "ab" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Romanian" -msgstr "Roumain" +#: ui_ffmpegCmdGen.h:766 +msgid "$AUDBRk" +msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Russian" -msgstr "Russe" +#: ui_ffmpegCmdGen.h:770 +msgid "Set the number of audio channels (default = 1)" +msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Kinyarwanda" +#: ui_ffmpegCmdGen.h:773 +msgid "ac" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sanskrit" +#: ui_ffmpegCmdGen.h:776 +msgid "" +"Force audio codec to codec. Use the copy special value to specify that the " +"raw codec data must be copied as is" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sindhi" +#: ui_ffmpegCmdGen.h:779 +msgid "acodec" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sangho" +#: ui_ffmpegCmdGen.h:782 +msgid "COPY" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Serbo-Croatian" -msgstr "Serbo-Croate" +#: ui_ffmpegCmdGen.h:786 +msgid "Force audio tag/fourcc" +msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Sinhalese" +#: ui_ffmpegCmdGen.h:789 +msgid "atag" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Slovak" -msgstr "Slovaque" +#: ui_ffmpegCmdGen.h:790 +msgid "nnnnn; " +msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Slovenian" -msgstr "Slovène" +#: ui_ffmpegCmdGen.h:793 +msgid "Bitstream filters" +msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Samoan" +#: ui_ffmpegCmdGen.h:796 +msgid "absf" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Shona" +#: ui_ffmpegCmdGen.h:799 +msgid "dump_extra" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Somali" +#: ui_ffmpegCmdGen.h:800 +msgid "remove_extra" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Albanian" -msgstr "Albanais" +#: ui_ffmpegCmdGen.h:801 +msgid "noise" +msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Serbian" -msgstr "Serbe" +#: ui_ffmpegCmdGen.h:802 +msgid "mp3comp" +msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Siswati" +#: ui_ffmpegCmdGen.h:803 +msgid "mp3decomp" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Sesotho" +#: ui_ffmpegCmdGen.h:805 +msgid "FFMpeg Audio options" +msgstr "Options audio de FFMpeg" + +#: ui_import.h:132 +msgid "Video files" +msgstr "Fichiers vidéo" + +#: ui_import.h:133 ui_k9mainw.h:189 ui_k9mainw.h:195 ui_mp4dlg.h:250 +#: ui_phonon.h:120 ui_phonon.h:121 ui_processList.h:81 +msgid "..." msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Sundanese" +#: ui_import.h:136 +msgid "PAL" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Svenska" +#: ui_import.h:137 +msgid "NTSC" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Swahili" +#: ui_k9mainw.h:182 +msgid "MainDlg" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Tamil" +#: ui_k9mainw.h:186 +msgid "Open a folder" +msgstr "Ouvrir un dossier" + +#: ui_k9mainw.h:192 +msgid "Open an iso image" +msgstr "Ouvrir une image ISO" + +#: ui_k9mainw.h:196 +msgid "Output device " +msgstr "Graveur" + +#: ui_k9mainw.h:197 +msgid "@" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Telugu" +#: ui_k9mainw.h:202 ui_prefMPEG4.h:394 +msgid "X" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Tajik" -msgstr "" +#: ui_k9mainw.h:203 +msgid "Title" +msgstr "Titre" + +#: ui_k9mainw.h:204 ui_mp4dlg.h:249 +msgid "Size" +msgstr "Taille" + +#: ui_k9mainw.h:205 +msgid "Content" +msgstr "Contenu" + +#: ui_langselectw.h:62 +msgid "Languages" +msgstr "Langues" -#: src/core/k9dvd.cpp:260 -msgid "Thai" +#: ui_mencoderCmdGen.h:109 +msgid "1" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Tigrinya" -msgstr "" +#: ui_menuEdit.h:206 +msgid "Edit Menu" +msgstr "Editer le menu" -#: src/core/k9dvd.cpp:260 -msgid "Turkmen" -msgstr "" +#: ui_menuEdit.h:207 +msgid "Text" +msgstr "Texte" -#: src/core/k9dvd.cpp:260 -msgid "Tagalog" -msgstr "" +#: ui_menuEdit.h:208 +msgid "Background picture" +msgstr "Image de fond" -#: src/core/k9dvd.cpp:261 -msgid "Setswana" -msgstr "" +#: ui_menuEdit.h:210 ui_prefAuthor.h:209 +msgid "Font" +msgstr "Police" -#: src/core/k9dvd.cpp:261 -msgid "Tonga" -msgstr "" +#: ui_menuEdit.h:213 +msgid "Bottom" +msgstr "Bas" -#: src/core/k9dvd.cpp:261 -msgid "Turkish" -msgstr "Turque" +#: ui_menuEdit.h:214 +msgid "Right" +msgstr "Droite" -#: src/core/k9dvd.cpp:261 -msgid "Tsonga" -msgstr "" +#: ui_menuEdit.h:219 +msgid "At start" +msgstr "Au démarrage" -#: src/core/k9dvd.cpp:261 -msgid "Tatar" -msgstr "" +#: ui_menuEdit.h:222 +msgid "Play menu" +msgstr "Jouer le menu" -#: src/core/k9dvd.cpp:261 -msgid "Twi" -msgstr "" +#: ui_menuEdit.h:223 ui_menuEdit.h:230 +msgid "Play title 1" +msgstr "Lecture du titre 1" -#: src/core/k9dvd.cpp:262 -msgid "Uighur" -msgstr "" +#: ui_menuEdit.h:225 +msgid "At End" +msgstr "En fin" -#: src/core/k9dvd.cpp:262 -msgid "Ukrainian" -msgstr "Ukrainien" +#: ui_menuEdit.h:228 +msgid "Play root menu" +msgstr "Jouer le menu racine" -#: src/core/k9dvd.cpp:262 -msgid "Urdu" -msgstr "" +#: ui_menuEdit.h:229 +msgid "Play title menu" +msgstr "Lecture du &titre" -#: src/core/k9dvd.cpp:262 -msgid "Uzbek" -msgstr "" +#: ui_mp4dlg.h:248 ui_prefAuthor.h:205 ui_prefMPEG4.h:399 ui_prefMPEG4.h:411 +msgid "Bitrate" +msgstr "Bitrate" -#: src/core/k9dvd.cpp:262 -msgid "Vietnamese" -msgstr "Vietnamien" +#: ui_mplayer.h:242 +msgid "Subpicture" +msgstr "Sous-titre" -#: src/core/k9dvd.cpp:263 -msgid "Volapuk" +#: ui_mplayer.h:247 +msgid "-" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Wolof" +#: ui_mplayer.h:249 +msgid "+" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Xhosa" -msgstr "" +#: ui_newTitle.h:193 +msgid "Video file" +msgstr "Fichier vidéo" -#: src/core/k9dvd.cpp:263 -msgid "Yoruba" -msgstr "" +#: ui_newTitle.h:196 +msgid "number of chapters" +msgstr "nombre de chapitres" -#: src/core/k9dvd.cpp:263 -msgid "Zhuang" -msgstr "" +#: ui_newTitle.h:197 +msgid "chapter length" +msgstr "longueur du chapitre" -#: src/core/k9dvd.cpp:264 -msgid "Chinese" -msgstr "Chinois" +#: ui_newTitle.h:199 +msgid "Do not reencode" +msgstr "Ne pas réencoder" -#: src/core/k9dvd.cpp:264 -msgid "Zulu" +#: ui_playbackoptionsw.h:227 +msgid "&Keep original menus" +msgstr "Conserver les menus originaux" + +#: ui_playbackoptionsw.h:228 ui_prefMPEG4.h:392 +msgid "Alt+K" msgstr "" -#: src/core/k9dvd.cpp:264 src/core/k9dvd.cpp:266 src/core/k9dvd.cpp:488 -msgid "Unknown" -msgstr "Inconnu" +#: ui_playbackoptionsw.h:231 +msgid "Selected Titles" +msgstr "Titres sélectionnés" -#: src/core/k9dvd.cpp:356 -msgid "Can't open disc %1!\n" -msgstr "Ne peut ouvrir le disque %1!\n" +#: ui_playbackoptionsw.h:232 +msgid "Default language" +msgstr "Langue par défaut" -#: src/core/k9dvd.cpp:368 -msgid "Can't open main ifo!\n" -msgstr "Ne peut ouvrir le fichier ifo principal!\n" +#: ui_playbackoptionsw.h:233 +msgid "Subtitle" +msgstr "Sous-titre" -#: src/core/k9dvd.cpp:410 src/core/k9dvd.cpp:701 -msgid "Title %1" -msgstr "Titre %1" +#: ui_prefAuthor.h:191 +msgid "Authoring options" +msgstr "Options d'authoring" -#: src/core/k9dvd.cpp:752 -msgid "reading title" -msgstr "lecture du titre" +#: ui_prefAuthor.h:195 +msgid "AC3" +msgstr "" -#: src/core/k9dvd.cpp:869 -msgid "Error opening vobs for title %1\n" -msgstr "Erreur d'ouverture des vobs pour le titre %1\n" +#: ui_prefAuthor.h:196 +msgid "MP2" +msgstr "" -#: src/core/k9dvd.cpp:880 -msgid "ERROR reading block %1\n" -msgstr "Erreur de lecture du bloc %1\n" +#: ui_prefAuthor.h:200 +msgid "128" +msgstr "" -#: src/core/k9process.cpp:120 src/core/k9tools.cpp:34 -#: src/import/k9menu.cpp:165 -msgid "Error starting program %1" -msgstr "Erreur au lancement du programme %1" +#: ui_prefAuthor.h:201 +msgid "192" +msgstr "" -#: src/core/k9process.cpp:120 src/core/k9tools.cpp:34 src/core/k9tools.cpp:56 -#: src/import/k9menu.cpp:165 -msgid "Running program" -msgstr "Exécution du programme" +#: ui_prefAuthor.h:202 +msgid "320" +msgstr "" -#: src/core/k9tools.cpp:47 -msgid "Enter the root password" -msgstr "Entrez le mot de passe 'root'" +#: ui_prefAuthor.h:204 +msgid "Format" +msgstr "" -#: src/core/k9tools.cpp:56 -msgid "The root password is not valid" -msgstr "Le mot de passe 'root' est invalide" +#: ui_prefAuthor.h:206 +msgid "Buttons" +msgstr "Boutons" -#: src/devices/k9cddrive.cpp:214 -msgid "" -"The root password is needed to change the read ahead property of the dvd " -"drive" -msgstr "Le mode de passe 'root' est nécessaire pour changer les propriétés 'read ahead' du lecteur dvd" +#: ui_prefAuthor.h:207 ui_prefMPEG4.h:387 +msgid "Width" +msgstr "Largeur" -#: src/import/k9avidecode.cpp:40 src/import/k9avidecode.cpp:44 -#: src/import/k9avidecode.cpp:49 -msgid "Cannot open then library %1" -msgstr "Impossible d'ouvrir la librairie %1" +#: ui_prefAuthor.h:208 ui_prefMPEG4.h:388 +msgid "Height" +msgstr "Hauteur" -#: src/import/k9avidecode.cpp:113 -msgid "Couldn't open the file %1" -msgstr "Ne peut ouvrir le fichier %1" +#: ui_prefAuthor.h:210 +msgid "Hilite color" +msgstr "Surbrillance" -#: src/import/k9avidecode.cpp:118 -msgid "Couldn't find stream information" -msgstr "Ne peut trouver les informations du flux" +#: ui_prefAuthor.h:212 +msgid "Text color" +msgstr "Couleur du texte" -#: src/import/k9avidecode.cpp:131 -msgid "The file doesn't contain any video stream" -msgstr "Le fichier ne contient pas de flux vidéo" +#: ui_prefDVD.h:210 +msgid "prefDVD" +msgstr "" -#: src/import/k9avidecode.cpp:142 -msgid "Unsupported codec" -msgstr "Codec non supporté" +#: ui_prefDVD.h:212 +msgid "Output directory" +msgstr "Répertoire de sortie" -#: src/import/k9avidecode.cpp:147 -msgid "Could'nt open the codec" -msgstr "Ne peut ouvrir le codec" +#: ui_prefDVD.h:213 +msgid "Clear output directory on exit" +msgstr "Vider le répertoire de sortie en quittant" -#: src/import/k9avidecode.cpp:158 -msgid "Unable to allocate memory for frames" -msgstr "Impossible d'allouer la mémoire pour les images" +#: ui_prefDVD.h:214 +msgid "Alt+Y" +msgstr "" -#: src/import/k9import.cpp:179 src/import/k9import.cpp:194 -#: src/import/k9newtitle.cpp:151 src/import/k9newtitle.cpp:173 -#: src/main/k9main.cpp:616 src/main/k9main.cpp:631 -msgid "chapter %1" -msgstr "chapitre %1" +#: ui_prefDVD.h:215 +msgid "DVD size" +msgstr "Taille du DVD" -#: src/import/k9import.cpp:239 src/import/k9import.cpp:254 -msgid "remove" -msgstr "supprimer" +#: ui_prefDVD.h:216 +msgid "one file/chapter (MPEG extraction)" +msgstr "un fichier par chapitre (extraction MPEG)" -#: src/import/k9import.cpp:242 -msgid "add chapter" -msgstr "ajouter un chapitre" +#: ui_prefDVD.h:217 ui_prefDVD.h:219 +msgid "Alt+D" +msgstr "" -#: src/import/k9importfiles.cpp:88 -msgid "Add Title" -msgstr "Ajouter un titre" +#: ui_prefDVD.h:218 +msgid "use dvdAuthor for copy without menus" +msgstr "utiliser dvdAuthor pour la copie sans menus" -#: src/import/k9importfiles.cpp:109 -msgid "Edit menu" -msgstr "Editer le menu" +#: ui_prefDVD.h:220 +msgid "Enable prohibited user operations" +msgstr "" -#: src/import/k9importfiles.cpp:158 -msgid "Create DVD" -msgstr "Créer le DVD" +#: ui_prefDVD.h:221 +msgid "Burning" +msgstr "Gravure" -#: src/import/k9menuedit.cpp:243 -msgid "Title %1 Menu" -msgstr "Menu du titre %1" +#: ui_prefDVD.h:222 +msgid "Burn with k3b" +msgstr "Graver avec k3b" -#: src/import/k9menuedit.cpp:252 src/import/k9menuedit.cpp:289 -msgid "Play Menu" -msgstr "Lecture du menu" +#: ui_prefDVD.h:223 ui_prefMPEG4.h:400 +msgid "Alt+B" +msgstr "" -#: src/import/k9menuedit.cpp:254 -msgid "Play Title" -msgstr "Lecture du titre" +#: ui_prefDVD.h:224 +msgid "Auto burn" +msgstr "Gravure auto" -#: src/import/k9menuedit.cpp:260 -msgid "Play Root Menu" -msgstr "Lecture du menu racine" +#: ui_prefDVD.h:225 +msgid "Alt+T" +msgstr "" -#: src/import/k9menuedit.cpp:262 -msgid "Play Title Menu" -msgstr "Lecture du menu du titre" +#: ui_prefDVD.h:226 +msgid "Performances" +msgstr "Performances" + +#: ui_prefDVD.h:227 +msgid "Quick scan" +msgstr "Scan rapide" -#: src/import/k9menuedit.cpp:267 src/import/k9menuedit.cpp:293 -msgid "Play Title %1" -msgstr "Lecture du titre %1" +#: ui_prefDVD.h:228 +msgid "Alt+Q" +msgstr "" -#: src/import/k9newdvd.cpp:96 -msgid "Creating root menu" -msgstr "Création du menu racine" +#: ui_prefDVD.h:229 +msgid "DVD read ahead" +msgstr "DVD read ahead" -#: src/import/k9newdvd.cpp:141 -msgid "The dvd authoring was canceled" -msgstr "L'authoring du DVD a été annulé" +#: ui_prefDVD.h:233 +msgid "skip bad sectors (slow)" +msgstr "ignorer les secteurs défectueux (lent)" -#: src/import/k9newdvd.cpp:167 -msgid "Creating menu for title %1" -msgstr "Création du menu pour le titre %1" +#: ui_prefDVD.h:234 +msgid "skip bad sectors (faster)" +msgstr "ignorer les secteurs défectueux (plus rapide)" -#: src/import/k9newdvd.cpp:480 src/import/k9newtitle.cpp:97 -msgid "title %1" -msgstr "titre %1" +#: ui_prefDVD.h:236 +msgid "" +"this option can improve reading of DVD having bad sectors.\n" +"It will require root privileges when opening the DVD." +msgstr "" +"cette option peut améliorer la lecture des DVD comportant des secteurs " +"défectueux.\n" +"Elle requiert les privilèges root au moment de l'ouverture du DVD." -#: src/main/k9copy.cpp:56 src/main/k9main.cpp:437 src/main/k9main.cpp:570 -#: src/main/k9main.cpp:1147 src/main/k9main.cpp:1204 -msgid "Ready" -msgstr "Prêt" +#: ui_prefMencoder.h:472 ui_prefMPEG4.h:375 ui_prefpreview.h:291 +msgid "Form1" +msgstr "" -#: src/main/k9copy.cpp:116 -msgid "Shrink Factor" -msgstr "Facteur de compression" +#: ui_prefMencoder.h:473 +msgid "" +"$PASS\n" +"$WIDTH\n" +"$HEIGHT\n" +"$VIDBR\n" +"$AUDBR" +msgstr "" -#: src/main/k9copy.cpp:127 -msgid "MPEG4 Encoding Options" -msgstr "Options d'encodage MPEG-4" +#: ui_prefMencoder.h:478 +msgid "" +"pass number\n" +"video width\n" +"video height\n" +"video bitrate\n" +"audio bitrate" +msgstr "" +"numéro de la passe\n" +"largeur de la vidéo\n" +"hauteur de la vidéo\n" +"bitrate vidéo\n" +"bitrate audio" -#: src/main/k9copy.cpp:242 -msgid "Play title" -msgstr "Lecture du &titre" +#: ui_prefMencoder.h:483 +msgid "Available variables" +msgstr "variables disponibles" -#: src/main/k9copy.cpp:248 -msgid "Copy" -msgstr "Copie" +#: ui_prefMencoder.h:486 +msgid "fourcc" +msgstr "" -#: src/main/k9copy.cpp:253 -msgid "Extract to MPEG files" -msgstr "Extraction vers fichiers MPEG" +#: ui_prefMencoder.h:487 +msgid "one pass" +msgstr "une passe" -#: src/main/k9copy.cpp:258 -msgid "Create MPEG-4" -msgstr "Encoder au format MPEG-4" +#: ui_prefMencoder.h:490 +msgid "first pass" +msgstr "première passe" -#: src/main/k9copy.cpp:267 -msgid "Eject" -msgstr "Ejecter" +#: ui_prefMencoder.h:492 +msgid "second pass" +msgstr "deuxième passe" -#: src/main/k9copy.cpp:273 -msgid "Wizard" -msgstr "Assistant" +#: ui_prefMencoder.h:494 ui_prefMencoder.h:504 +msgid "encoder" +msgstr "encodeur" -#: src/main/k9copy.cpp:280 -msgid "DVD Author" -msgstr "Création de DVD" +#: ui_prefMencoder.h:497 ui_prefMencoder.h:507 +msgid "mencoder" +msgstr "" -#: src/main/k9langselect.cpp:100 -msgid "Subtitles" -msgstr "Sous-titres" +#: ui_prefMencoder.h:498 ui_prefMencoder.h:508 +msgid "ffmpeg" +msgstr "" -#: src/main/k9main.cpp:388 -msgid "Backup in progress" -msgstr "Backup en cours" +#: ui_prefMencoder.h:500 +msgid "Video codecs" +msgstr "Codecs Vidéo" -#: src/main/k9main.cpp:524 -msgid "Open DVD" -msgstr "Ouvrir le DVD" +#: ui_prefMencoder.h:502 +msgid "options" +msgstr "options" -#: src/main/k9main.cpp:544 -msgid "Titleset %1" +#: ui_prefMencoder.h:510 +msgid "extension" msgstr "" -#: src/main/k9main.cpp:609 -msgid "chapters" -msgstr "chapitres" +#: ui_prefMencoder.h:511 +msgid "Audio codecs" +msgstr "Codecs Audio" -#: src/main/k9main.cpp:620 src/main/k9main.cpp:637 src/main/k9main.cpp:701 -#: src/main/k9main.cpp:721 -msgid "%1 MB" -msgstr "%1 Mo" +#: ui_prefMPEG4.h:377 +msgid "Encoder" +msgstr "Encodeur" -#: src/main/k9main.cpp:678 -msgid "video %1 " -msgstr "" +#: ui_prefMPEG4.h:378 +msgid "2 pass" +msgstr "2 passes" -#: src/main/k9main.cpp:690 -msgid "audio %1 " +#: ui_prefMPEG4.h:379 +msgid "Alt+2" msgstr "" -#: src/main/k9main.cpp:712 -msgid "subpicture %1 " -msgstr "Sous-titre %1 " +#: ui_prefMPEG4.h:380 ui_prefMPEG4.h:402 +msgid "Codec" +msgstr "Codec" -#: src/main/k9main.cpp:1100 -msgid "Transcoding title : %1" -msgstr "Transcodification du titre : %1" - -#: src/main/k9main.cpp:1169 -msgid "Extracting title : %1" -msgstr "Extraction du titre %1" +#: ui_prefMPEG4.h:383 +msgid "XviD" +msgstr "" -#: src/main/k9main.cpp:1351 -msgid "Open ISO Image" -msgstr "Ouvrir l'image ISO" +#: ui_prefMPEG4.h:384 +msgid "lavc MPEG4" +msgstr "" -#: src/main/k9mencodercmdgen.cpp:78 -msgid "Audio Codec" -msgstr "Codec Audio" +#: ui_prefMPEG4.h:385 +msgid "x264" +msgstr "" -#: src/main/k9mencodercmdgen.cpp:94 -msgid "Video Codec" -msgstr "Codec Vidéo" +#: ui_prefMPEG4.h:390 +msgid "720" +msgstr "" -#: src/main/k9mencodercmdgen.cpp:113 -msgid "Filters" -msgstr "Filtres" +#: ui_prefMPEG4.h:391 +msgid "&keep aspect ratio" +msgstr "Conserver les proportions" -#: src/main/k9mp4title.cpp:37 src/main/k9mp4title.cpp:110 -#: src/main/k9titlefactor.cpp:111 -msgid "Select a Title in the treeview..." -msgstr "Sélectionnez un titre dans l'arborescence..." +#: ui_prefMPEG4.h:396 +msgid "File size" +msgstr "Taille du fichier" -#: src/main/k9playbackoptions.cpp:149 -msgid "none" -msgstr "aucun" +#: ui_prefMPEG4.h:397 +msgid "Alt+S" +msgstr "" -#: src/main/k9prefmencoder.cpp:110 src/main/k9prefmencoder.cpp:114 -#: src/main/k9prefmencoder.cpp:125 src/main/k9prefmencoder.cpp:127 -msgid "new profile" -msgstr "nouveau profil" +#: ui_prefMPEG4.h:398 +msgid " MB" +msgstr " Mo" -#: src/main/k9settings.cpp:30 -msgid "Devices not detected by k9copy" -msgstr "Périphériques non détectés par k9copy" +#: ui_prefMPEG4.h:401 +msgid "Video" +msgstr "Vidéo" -#: src/main/k9settings.cpp:34 -msgid "DVD" -msgstr "DVD" +#: ui_prefMPEG4.h:405 +msgid "mp3" +msgstr "" -#: src/main/k9settings.cpp:39 -msgid "MEncoder" +#: ui_prefMPEG4.h:406 +msgid "faac" msgstr "" -#: src/main/k9settings.cpp:40 -msgid "MPEG-4 Codecs" -msgstr "Codecs MPEG-4" +#: ui_prefMPEG4.h:407 +msgid "mp2" +msgstr "" -#: src/main/k9settings.cpp:44 -msgid "MPEG-4" +#: ui_prefMPEG4.h:408 +msgid "ac3" msgstr "" -#: src/main/k9settings.cpp:51 -msgid "Title preview" -msgstr "Aperçu du Titre" +#: ui_prefMPEG4.h:409 +msgid "adpcm ima" +msgstr "" -#: src/main/k9titlefactor.cpp:122 -msgid "Shrink Factor for %1" -msgstr "Facteur de compression pour %1" +#: ui_prefMPEG4.h:413 +msgid "Gain" +msgstr "Gain" -#: src/main/kviewmpeg2.cpp:79 -msgid "Title Preview" -msgstr "Aperçu du Titre" +#: ui_prefMPEG4.h:415 +msgid "use cell cache" +msgstr "mise en cache des cellules" -#: src/xine/main.cpp:50 -msgid "wid" -msgstr "" +#: ui_prefpreview.h:293 +msgid "&Internal Player" +msgstr "Lecteur interne" -#: src/xine/main.cpp:51 -msgid "vo" +#: ui_prefpreview.h:294 +msgid "Alt+I" msgstr "" -#: src/xine/main.cpp:52 -msgid "ao" -msgstr "" +#: ui_prefpreview.h:295 +msgid "MPlayer" +msgstr "MPlayer" -#~ msgid "Input device " -#~ msgstr "Lecteur source" +#: ui_prefpreview.h:296 +msgid "Alt+M" +msgstr "" -#~ msgid "D&VD" -#~ msgstr "DVD" +#: ui_prefpreview.h:297 +msgid "Xine Player" +msgstr "" -#~ msgid "Open DVD folder" -#~ msgstr "Ouvrir le DVD" +#: ui_prefpreview.h:298 +msgid "Phonon" +msgstr "" -#, fuzzy -#~ msgid "DVD-ROM" -#~ msgstr "DVD" +#: ui_prefpreview.h:299 +msgid "Internal viewer options" +msgstr "Options du lecteur interne" -#, fuzzy -#~ msgid "DVD-RAM" -#~ msgstr "DVD" +#: ui_prefpreview.h:300 +msgid "use OpenGL" +msgstr "utiliser OpenGL" -#, fuzzy -#~ msgid "DVD-R" -#~ msgstr "DVD" +#: ui_prefpreview.h:301 ui_prefpreview.h:318 +msgid "Video output" +msgstr "Sortie vidéo" -#, fuzzy -#~ msgid "DVD-RW" -#~ msgstr "DVD" +#: ui_prefpreview.h:302 ui_prefpreview.h:326 +msgid "Audio output" +msgstr "Sortie Audio" -#, fuzzy -#~ msgid "DVD+R" -#~ msgstr "DVD" +#: ui_prefpreview.h:305 ui_prefpreview.h:321 +msgid "X11" +msgstr "" -#, fuzzy -#~ msgid "DVD+RW" -#~ msgstr "DVD" +#: ui_prefpreview.h:306 ui_prefpreview.h:322 +msgid "Xv" +msgstr "" -#, fuzzy -#~ msgid "None" -#~ msgstr "aucun" +#: ui_prefpreview.h:307 ui_prefpreview.h:323 +msgid "OpenGL" +msgstr "OpenGL" -#, fuzzy -#~ msgid "k9Copy - Burning DVD" -#~ msgstr "Gravure du DVD" +#: ui_prefpreview.h:308 ui_prefpreview.h:314 ui_prefpreview.h:324 +msgid "SDL" +msgstr "" -#~ msgid "Unable to open " -#~ msgstr "Impossible d'ouvrir " +#: ui_prefpreview.h:312 ui_prefpreview.h:329 +msgid "ALSA" +msgstr "" -#~ msgid "mb" -#~ msgstr "mo" +#: ui_prefpreview.h:313 ui_prefpreview.h:330 +msgid "OSS" +msgstr "" -#~ msgid "" -#~ "Insuffisant disk space on %1\n" -#~ "%2 mb expected." -#~ msgstr "" -#~ "Espace disque insuffisant sur %1\n" -#~ "%2 mb attendus." +#: ui_prefpreview.h:316 +msgid "MPlayer options" +msgstr "Options de MPlayer" -#~ msgid "A DVD Backup tool for KDE" -#~ msgstr "Un utilitaire de Backup de DVD pour KDE" +#: ui_prefpreview.h:317 +msgid "Xine player options" +msgstr "Options du lecteur Xine" -#, fuzzy -#~ msgid "Background color:" -#~ msgstr "Image de fond" +#: ui_processList.h:77 +msgid "Process List" +msgstr "Liste des processus" -#~ msgid "A&bort" -#~ msgstr "A&bandonner" +#: ui_processList.h:78 +msgid "Progression" +msgstr "Progression" -#, fuzzy -#~ msgid "use OpenGL for preview" -#~ msgstr "utiliser OpenGL" +#: ui_processList.h:79 +msgid "Processes" +msgstr "Processus" -#~ msgid "Label" -#~ msgstr "libellé" +#: ui_processList.h:80 +msgid "Elapsed" +msgstr "Ecoulé" -#, fuzzy -#~ msgid "Audio bitrate" -#~ msgstr "Sortie Audio" +#: ui_processList.h:82 +msgid "&Cancel" +msgstr "&Annuler" -#, fuzzy -#~ msgid " mb" -#~ msgstr "mo" +#: ui_processList.h:83 +msgid "Alt+C" +msgstr "" -#, fuzzy -#~ msgid "xvid" -#~ msgstr "vidéo" +#: ui_progress.h:171 +msgid "k9Copy" +msgstr "k9copy" -#, fuzzy -#~ msgid "RealVideo" -#~ msgstr "Vidéo" +#: ui_titlefactor.h:119 +msgid "Shrink Factors" +msgstr "Facteurs de compression" -#~ msgid "New Item" -#~ msgstr "Nouvel élément" +#: ui_titlefactor.h:120 +msgid "Shrink Factor for Title %1" +msgstr "Facteur de compression pour le Titre %1" -#, fuzzy -#~ msgid "k9Copy - Menu Preview" -#~ msgstr "Aperçu du Menu " +#: ui_titlefactor.h:121 +msgid "Change Factor" +msgstr "Modifier le facteur" -#, fuzzy -#~ msgid "processing" -#~ msgstr "traitement en cours" +#: ui_titlefactor.h:122 +msgid "0.00" +msgstr "" -#~ msgid "Create new DVD" -#~ msgstr "Créer un nouveau DVD" +#: ui_viewmpeg2.h:136 +msgid "k9Copy - Title Preview" +msgstr "Aperçu du Titre" -#~ msgid "Can't find device %1\n" -#~ msgstr "Périphérique %1 introuvable\n" diff -Nru k9copy-2.1.0/po/k9copy.pot k9copy-2.2.0/po/k9copy.pot --- k9copy-2.1.0/po/k9copy.pot 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/po/k9copy.pot 2009-02-19 22:30:17.000000000 +0100 @@ -9,7 +9,7 @@ "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?" "group_id=50231&atid=459007\n" -"POT-Creation-Date: 2008-10-12 09:38+0200\n" +"POT-Creation-Date: 2009-02-17 13:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,14 +17,13 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: lib/player/k9play.cpp:75 src/player/k9play.cpp:74 +#: lib/player/k9play.cpp:75 src/player/k9play.cpp:79 msgid "MPEG-4 Encoding cancelled" msgstr "" -#: lib/player/k9play.cpp:75 src/backup/k9execcopy.cpp:106 -#: src/backup/k9execcopy.cpp:172 src/main/k9main.cpp:1086 -#: src/main/k9main.cpp:1155 src/main/k9settings.cpp:45 -#: src/player/k9play.cpp:74 +#: lib/player/k9play.cpp:75 src/backup/k9execcopy.cpp:120 +#: src/backup/k9execcopy.cpp:309 src/main/k9settings.cpp:45 +#: src/player/k9play.cpp:79 msgid "MPEG-4 Encoding" msgstr "" @@ -32,7 +31,7 @@ msgid "A KDE 4 Application" msgstr "" -#: lib/player/main.cpp:41 main.cpp:43 src/player/main.cpp:41 +#: lib/player/main.cpp:41 main.cpp:45 src/player/main.cpp:41 #: src/xine/main.cpp:40 msgid "k9copy" msgstr "" @@ -45,28 +44,25 @@ msgid "Jean-Michel" msgstr "" -#: lib/player/main.cpp:44 main.cpp:46 src/player/main.cpp:44 +#: lib/player/main.cpp:44 main.cpp:48 src/player/main.cpp:44 #: src/xine/main.cpp:43 msgid "_: NAME OF TRANSLATORS\\nYour names" msgstr "" -#: lib/player/main.cpp:45 main.cpp:47 src/player/main.cpp:45 +#: lib/player/main.cpp:45 main.cpp:49 src/player/main.cpp:45 #: src/xine/main.cpp:44 msgid "_: EMAIL OF TRANSLATORS\\nYour emails" msgstr "" -#. i18n: file: src/main/k9mainw.ui:49 -#. i18n: ectx: property (text), widget (QLabel, lblInput) -#: lib/player/main.cpp:49 main.cpp:51 po/rc.cpp:321 src/player/main.cpp:49 -#: ui_k9mainw.h:183 rc.cpp:321 +#: lib/player/main.cpp:49 main.cpp:53 src/player/main.cpp:49 ui_k9mainw.h:183 msgid "input device" msgstr "" -#: lib/player/main.cpp:50 main.cpp:52 src/player/main.cpp:50 +#: lib/player/main.cpp:50 main.cpp:54 src/player/main.cpp:50 msgid "output device" msgstr "" -#: lib/player/main.cpp:51 main.cpp:53 src/player/main.cpp:51 +#: lib/player/main.cpp:51 main.cpp:55 src/player/main.cpp:51 msgid "title to play" msgstr "" @@ -146,2772 +142,2502 @@ msgid "save cell in a temporary file before encoding" msgstr "" -#: main.cpp:38 +#: main.cpp:40 msgid "A DVD Backup software for KDE" msgstr "" -#: main.cpp:44 +#: main.cpp:46 msgid "(C) 2007 Jean-Michel PETIT" msgstr "" -#: main.cpp:45 +#: main.cpp:47 msgid "Jean-Michel PETIT" msgstr "" -#: main.cpp:54 +#: main.cpp:56 msgid "use GTK file dialogs" msgstr "" -#: main.cpp:55 +#: main.cpp:57 msgid "the k9copy backup assistant" msgstr "" -#. i18n: file: k9copyui.rc:4 -#. i18n: ectx: Menu (file) -#: po/rc.cpp:3 rc.cpp:3 -msgid "&File" -msgstr "" - -#. i18n: file: k9copyui.rc:10 -#. i18n: ectx: Menu (Actions) -#: po/rc.cpp:6 rc.cpp:6 -msgid "A&ctions" -msgstr "" - -#. i18n: file: k9copyui.rc:27 -#. i18n: ectx: ToolBar (mainToolBar) -#: po/rc.cpp:9 rc.cpp:9 -msgid "Actions ToolBar" -msgstr "" - -#. i18n: file: src/assistant/astdestination.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDestination) -#. i18n: file: src/assistant/astdvdoption.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDVDOption) -#. i18n: file: src/assistant/astmp4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMp4) -#. i18n: file: src/assistant/astmpeg.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMpeg) -#. i18n: file: src/assistant/astsource.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astSource) -#. i18n: file: src/assistant/aststreams.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astStreams) -#. i18n: file: src/assistant/asttitles.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astTitles) -#. i18n: file: src/mplayer/phonon.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, phonon) -#. i18n: file: src/assistant/astdestination.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDestination) -#. i18n: file: src/assistant/astdvdoption.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astDVDOption) -#. i18n: file: src/assistant/astmp4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMp4) -#. i18n: file: src/assistant/astmpeg.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astMpeg) -#. i18n: file: src/assistant/astsource.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astSource) -#. i18n: file: src/assistant/aststreams.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astStreams) -#. i18n: file: src/assistant/asttitles.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, astTitles) -#. i18n: file: src/mplayer/phonon.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, phonon) -#: po/rc.cpp:12 po/rc.cpp:33 po/rc.cpp:45 po/rc.cpp:51 po/rc.cpp:57 -#: po/rc.cpp:69 po/rc.cpp:78 po/rc.cpp:758 ui_astdestination.h:168 -#: ui_astdvdoption.h:88 ui_astmp4.h:72 ui_astmpeg.h:72 ui_astsource.h:113 -#: ui_aststreams.h:53 ui_asttitles.h:69 ui_phonon.h:74 rc.cpp:12 rc.cpp:33 -#: rc.cpp:45 rc.cpp:51 rc.cpp:57 rc.cpp:69 rc.cpp:78 rc.cpp:758 -msgid "Form" +#: po/rc.cpp:1 rc.cpp:1 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:25 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVD) -#: po/rc.cpp:15 src/import/k9importfiles.cpp:162 src/main/k9settings.cpp:35 -#: ui_astdestination.h:170 rc.cpp:15 -msgid "DVD Backup" +#: po/rc.cpp:2 rc.cpp:2 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:56 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDDisc) -#: po/rc.cpp:18 ui_astdestination.h:172 rc.cpp:18 -msgid "to Disc" +#: src/assistant/k9assistant.cpp:43 +msgid "DVD backup assistant" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:78 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDFolder) -#: po/rc.cpp:21 ui_astdestination.h:173 rc.cpp:21 -msgid "to Folder" +#: src/assistant/k9assistant.cpp:47 +msgid "source" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:94 -#. i18n: ectx: property (text), widget (QRadioButton, rbDVDIso) -#: po/rc.cpp:24 ui_astdestination.h:174 rc.cpp:24 -msgid "to Iso image" +#: src/assistant/k9assistant.cpp:48 +msgid "Select the source of the backup" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:113 -#. i18n: ectx: property (text), widget (QRadioButton, rbAvi) -#: po/rc.cpp:27 ui_astdestination.h:175 rc.cpp:27 -msgid "Rip and encode DVD" +#: src/assistant/k9assistant.cpp:54 +msgid "destination" msgstr "" -#. i18n: file: src/assistant/astdestination.ui:132 -#. i18n: ectx: property (text), widget (QRadioButton, rbMpeg) -#: po/rc.cpp:30 ui_astdestination.h:176 rc.cpp:30 -msgid "Rip DVD without encoding" +#: src/assistant/k9assistant.cpp:55 +msgid "Select the destination of the backup" msgstr "" -#. i18n: file: src/assistant/astdvdoption.ui:25 -#. i18n: ectx: property (text), widget (QRadioButton, rbMenu) -#: po/rc.cpp:36 ui_astdvdoption.h:90 rc.cpp:36 -msgid "Copy original menus" +#: src/assistant/k9assistant.cpp:60 ui_asttitles.h:72 +msgid "titles" msgstr "" -#. i18n: file: src/assistant/astdvdoption.ui:32 -#. i18n: ectx: property (text), widget (QRadioButton, radioButton_2) -#: po/rc.cpp:39 ui_astdvdoption.h:91 rc.cpp:39 -msgid "Don't copy menus." +#: src/assistant/k9assistant.cpp:61 +msgid "Select the titles you want to copy" msgstr "" -#. i18n: file: src/assistant/astdvdoption.ui:39 -#. i18n: ectx: property (title), widget (QGroupBox, gbTitles) -#: po/rc.cpp:42 ui_astdvdoption.h:92 rc.cpp:42 -msgid "Drag items to set title playing sequence" +#: src/assistant/k9assistant.cpp:68 +msgid "streams" msgstr "" -#. i18n: file: src/assistant/astmp4.ui:25 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:48 ui_astmp4.h:73 rc.cpp:48 -msgid "Encoding options for title " +#: src/assistant/k9assistant.cpp:69 +msgid "Select the streams you want to keep" msgstr "" -#. i18n: file: src/assistant/astmpeg.ui:25 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:54 ui_astmpeg.h:73 rc.cpp:54 -msgid "Select options for title" +#: src/assistant/k9assistant.cpp:75 +msgid "mp4" msgstr "" -#. i18n: file: src/assistant/astsource.ui:31 -#. i18n: ectx: property (text), widget (QRadioButton, rbDrive) -#: po/rc.cpp:60 ui_astsource.h:115 rc.cpp:60 -msgid "DVD Drive" +#: src/assistant/k9assistant.cpp:76 +msgid "Set mp4 options for each title" msgstr "" -#. i18n: file: src/assistant/astsource.ui:50 -#. i18n: ectx: property (text), widget (QRadioButton, rbFolder) -#: po/rc.cpp:63 src/import/k9import.cpp:88 src/main/k9main.cpp:1259 -#: ui_astsource.h:116 rc.cpp:63 -msgid "Folder" +#: src/assistant/k9assistant.cpp:82 +msgid "DVDOption" msgstr "" -#. i18n: file: src/assistant/astsource.ui:66 -#. i18n: ectx: property (text), widget (QRadioButton, rbIso) -#: po/rc.cpp:66 src/import/k9import.cpp:87 src/main/k9main.cpp:458 -#: src/main/k9main.cpp:1258 ui_astsource.h:117 rc.cpp:66 -msgid "ISO Image" +#: src/assistant/k9assistant.cpp:83 +msgid "Set DVD playback options" msgstr "" -#. i18n: file: src/assistant/aststreams.ui:20 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#: po/rc.cpp:72 ui_aststreams.h:54 rc.cpp:72 -msgid "Selected titles" +#: src/assistant/k9assistant.cpp:89 +msgid "mpeg" msgstr "" -#. i18n: file: src/assistant/aststreams.ui:25 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#. i18n: file: src/main/k9mainw.ui:173 -#. i18n: ectx: property (text), item, widget (KComboBox, cbBurnSpeed) -#. i18n: file: src/main/prefDVD.ui:184 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#. i18n: file: src/assistant/aststreams.ui:25 -#. i18n: ectx: property (text), widget (QTreeWidget, lstreams) -#. i18n: file: src/main/k9mainw.ui:173 -#. i18n: ectx: property (text), item, widget (KComboBox, cbBurnSpeed) -#. i18n: file: src/main/prefDVD.ui:184 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:75 po/rc.cpp:342 po/rc.cpp:492 src/backup/k9execcopy.cpp:86 -#: src/core/k9burndvd.cpp:176 src/core/k9burndvd.cpp:284 -#: src/import/k9import.cpp:341 src/main/k9main.cpp:1342 -#: src/main/k9playbackoptions.cpp:147 ui_aststreams.h:55 ui_k9mainw.h:200 -#: ui_prefDVD.h:225 rc.cpp:75 rc.cpp:342 rc.cpp:492 -msgid "default" +#: src/assistant/k9assistant.cpp:90 +msgid "Set mpeg options for each title" msgstr "" -#. i18n: file: src/assistant/asttitles.ui:37 -#. i18n: ectx: property (text), widget (QTreeWidget, twSource) -#: po/rc.cpp:81 src/assistant/k9assistant.cpp:60 ui_asttitles.h:70 rc.cpp:81 -msgid "titles" +#: src/assistant/k9assistant.cpp:109 src/assistant/k9assistant.cpp:207 +#: src/import/k9importfiles.cpp:200 src/main/k9copy.cpp:343 +#: src/main/k9settings.cpp:23 +msgid "Settings" msgstr "" -#. i18n: file: src/assistant/asttitles.ui:42 -#. i18n: ectx: property (text), widget (QTreeWidget, twSource) -#: po/rc.cpp:84 ui_asttitles.h:71 rc.cpp:84 -msgid "size" +#: src/assistant/k9assistant.cpp:110 +msgid "k9copy settings" msgstr "" -#. i18n: file: src/backup/backupdlg.ui:41 -#. i18n: ectx: property (windowTitle), widget (QWidget, backupDlg) -#: po/rc.cpp:87 src/backup/k9backupdlg.cpp:41 src/backup/k9dvdauthor.cpp:430 -#: ui_backupdlg.h:241 rc.cpp:87 -msgid "Backup progression" +#: src/assistant/k9assistant.cpp:147 +msgid "The destination of the copy isn't valid" msgstr "" -#. i18n: file: src/backup/backupdlg.ui:80 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:90 ui_backupdlg.h:242 rc.cpp:90 -msgid "

DVD Backup

" +#: src/assistant/k9assistant.cpp:164 +msgid "You must select at least on title !" msgstr "" -#. i18n: file: src/backup/backupdlg.ui:106 -#. i18n: ectx: property (text), widget (QLabel, lblStep) -#: po/rc.cpp:93 ui_backupdlg.h:243 rc.cpp:93 -msgid "Current step" +#: src/assistant/k9assistant.cpp:202 +msgid "cannot continue" msgstr "" -#. i18n: file: src/backup/backupdlg.ui:147 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#. i18n: file: src/backup/mp4dlg.ui:146 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/core/progress.ui:221 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/backup/backupdlg.ui:147 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#. i18n: file: src/backup/mp4dlg.ui:146 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/core/progress.ui:221 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:96 po/rc.cpp:111 po/rc.cpp:144 ui_backupdlg.h:244 ui_mp4dlg.h:222 -#: ui_progress.h:173 rc.cpp:96 rc.cpp:111 rc.cpp:144 -msgid "Elapsed Time" +#: src/assistant/k9aststreams.cpp:53 +msgid "%4 - %1 %2 %3 ch" msgstr "" -#. i18n: file: src/backup/backupdlg.ui:166 -#. i18n: ectx: property (text), widget (QLabel, lblTime) -#. i18n: file: src/import/chapterEdit.ui:118 -#. i18n: ectx: property (text), widget (QLabel, lPosition) -#. i18n: file: src/import/import.ui:101 -#. i18n: ectx: property (text), widget (QLabel, lTotal) -#. i18n: file: src/import/newTitle.ui:47 -#. i18n: ectx: property (text), widget (QLabel, lTotalTime) -#. i18n: file: src/backup/backupdlg.ui:166 -#. i18n: ectx: property (text), widget (QLabel, lblTime) -#. i18n: file: src/import/chapterEdit.ui:118 -#. i18n: ectx: property (text), widget (QLabel, lPosition) -#. i18n: file: src/import/import.ui:101 -#. i18n: ectx: property (text), widget (QLabel, lTotal) -#. i18n: file: src/import/newTitle.ui:47 -#. i18n: ectx: property (text), widget (QLabel, lTotalTime) -#: po/rc.cpp:99 po/rc.cpp:150 po/rc.cpp:207 po/rc.cpp:258 ui_backupdlg.h:245 -#: ui_chapterEdit.h:220 ui_import.h:139 ui_newTitle.h:194 rc.cpp:99 rc.cpp:150 -#: rc.cpp:207 rc.cpp:258 -msgid "--:--:--" +#: src/assistant/k9aststreams.cpp:64 +msgid "%3 - %1 %2" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MP4Dlg) -#. i18n: file: src/backup/mp4dlg.ui:37 -#. i18n: ectx: property (text), widget (QLabel, lblTitle) -#. i18n: file: src/backup/mp4dlg.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MP4Dlg) -#. i18n: file: src/backup/mp4dlg.ui:37 -#. i18n: ectx: property (text), widget (QLabel, lblTitle) -#: po/rc.cpp:102 po/rc.cpp:105 src/backup/k9execcopy.cpp:163 -#: src/backup/k9execcopy.cpp:219 src/main/k9main.cpp:1144 -#: src/main/k9main.cpp:1202 ui_mp4dlg.h:215 ui_mp4dlg.h:216 rc.cpp:102 -#: rc.cpp:105 -msgid "Encoding" +#: src/assistant/k9asttitles.cpp:254 src/backup/k9mp4enc.cpp:262 +#: src/backup/k9mp4enc.cpp:265 src/backup/k9mp4enc.cpp:323 +#: src/backup/k9mp4enc.cpp:735 src/main/k9main.cpp:584 src/main/k9main.cpp:700 +#: src/main/k9main.cpp:717 src/main/k9mp4title.cpp:63 +#: src/main/k9prefdvd.cpp:38 src/main/k9prefmpeg4.cpp:37 +msgid "MB" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:133 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:108 src/import/k9newdvd.cpp:443 ui_mp4dlg.h:221 rc.cpp:108 -msgid "fps" +#: src/assistant/k9asttitles.cpp:276 src/assistant/k9asttitles.cpp:286 +#: src/import/k9import.cpp:179 src/import/k9import.cpp:194 +#: src/import/k9newtitle.cpp:151 src/import/k9newtitle.cpp:173 +#: src/main/k9main.cpp:650 src/main/k9main.cpp:665 +msgid "chapter %1" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:159 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/prefAuthor.ui:68 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#. i18n: file: src/main/prefMPEG4.ui:341 -#. i18n: ectx: property (text), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefMPEG4.ui:448 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_5) -#. i18n: file: src/backup/mp4dlg.ui:159 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/prefAuthor.ui:68 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#. i18n: file: src/main/prefMPEG4.ui:341 -#. i18n: ectx: property (text), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefMPEG4.ui:448 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_5) -#: po/rc.cpp:114 po/rc.cpp:414 po/rc.cpp:603 po/rc.cpp:630 ui_mp4dlg.h:223 -#: ui_prefAuthor.h:205 ui_prefMPEG4.h:381 ui_prefMPEG4.h:393 rc.cpp:114 -#: rc.cpp:414 rc.cpp:603 rc.cpp:630 -msgid "Bitrate" +#: src/assistant/k9asttitles.cpp:280 src/assistant/k9asttitles.cpp:290 +#: src/main/k9main.cpp:654 src/main/k9main.cpp:671 src/main/k9main.cpp:735 +#: src/main/k9main.cpp:755 +msgid "%1 MB" msgstr "" -#. i18n: file: src/backup/mp4dlg.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/k9mainw.ui:218 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#. i18n: file: src/backup/mp4dlg.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/k9mainw.ui:218 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:117 po/rc.cpp:351 ui_k9mainw.h:204 ui_mp4dlg.h:224 rc.cpp:117 -#: rc.cpp:351 -msgid "Size" +#: src/backup/k9backupdlg.cpp:41 src/backup/k9dvdauthor.cpp:430 +#: ui_backupdlg.h:241 +msgid "Backup progression" msgstr "" -#. i18n: file: src/core/dvdprogress.ui:35 -#. i18n: ectx: property (windowTitle), widget (QDialog, DVDProgress) -#: po/rc.cpp:120 src/core/k9dvdprogress.cpp:29 ui_dvdprogress.h:116 rc.cpp:120 -msgid "DVD Analyze" +#: src/backup/k9dvdauthor.cpp:147 src/backup/k9dvdauthor.cpp:392 +msgid "'%1' not selected" msgstr "" -#. i18n: file: src/core/processList.ui:16 -#. i18n: ectx: property (caption), widget (QWidget) -#. i18n: file: src/import/processList.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, processList) -#. i18n: file: src/core/processList.ui:16 -#. i18n: ectx: property (caption), widget (QWidget) -#. i18n: file: src/import/processList.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, processList) -#: po/rc.cpp:123 po/rc.cpp:276 ui_processList.h:77 rc.cpp:123 rc.cpp:276 -msgid "Process List" +#: src/backup/k9dvdauthor.cpp:148 src/backup/k9dvdauthor.cpp:393 +#: src/backup/k9dvdauthor.cpp:416 src/backup/k9dvdauthor.cpp:470 +#: src/backup/k9dvdauthor.cpp:479 src/backup/k9dvdauthor.cpp:482 +#: src/core/k9burndvd.cpp:249 src/core/k9burndvd.cpp:333 +#: src/import/k9newdvd.cpp:129 +msgid "authoring" msgstr "" -#. i18n: file: src/core/processList.ui:25 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:31 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/core/processList.ui:25 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:31 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:126 po/rc.cpp:282 ui_processList.h:79 rc.cpp:126 rc.cpp:282 -msgid "Processes" +#: src/backup/k9dvdauthor.cpp:416 src/backup/k9execcopy.cpp:173 +#: src/backup/k9mp4enc.cpp:136 src/backup/k9mp4enc.cpp:146 +#: src/core/k9burndvd.cpp:234 src/core/k9burndvd.cpp:321 +#: src/mplayer/k9mplayer.cpp:157 src/mplayer/k9xine.cpp:143 +msgid "Unable to run %1" msgstr "" -#. i18n: file: src/core/processList.ui:36 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:36 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/core/processList.ui:36 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/processList.ui:36 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:129 po/rc.cpp:285 ui_processList.h:80 rc.cpp:129 rc.cpp:285 -msgid "Elapsed" +#: src/backup/k9dvdauthor.cpp:429 src/backup/k9dvdauthor.cpp:510 +#: src/backup/k9dvdauthor.cpp:548 src/import/k9newdvd.cpp:150 +#: src/main/k9settings.cpp:56 src/main/k9settings.cpp:57 +msgid "Authoring" msgstr "" -#. i18n: file: src/core/processList.ui:47 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/import.ui:62 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#. i18n: file: src/import/processList.ui:41 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/main/k9mainw.ui:80 -#. i18n: ectx: property (text), widget (QToolButton, binputOpenDir) -#. i18n: file: src/main/k9mainw.ui:90 -#. i18n: ectx: property (text), widget (QToolButton, binputOpen) -#. i18n: file: src/mplayer/phonon.ui:43 -#. i18n: ectx: property (text), widget (QToolButton, bStop) -#. i18n: file: src/mplayer/phonon.ui:56 -#. i18n: ectx: property (text), widget (QToolButton, bPlay) -#. i18n: file: src/core/processList.ui:47 -#. i18n: ectx: property (text), widget (QListView) -#. i18n: file: src/import/import.ui:62 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#. i18n: file: src/import/processList.ui:41 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#. i18n: file: src/main/k9mainw.ui:80 -#. i18n: ectx: property (text), widget (QToolButton, binputOpenDir) -#. i18n: file: src/main/k9mainw.ui:90 -#. i18n: ectx: property (text), widget (QToolButton, binputOpen) -#. i18n: file: src/mplayer/phonon.ui:43 -#. i18n: ectx: property (text), widget (QToolButton, bStop) -#. i18n: file: src/mplayer/phonon.ui:56 -#. i18n: ectx: property (text), widget (QToolButton, bPlay) -#: po/rc.cpp:132 po/rc.cpp:198 po/rc.cpp:288 po/rc.cpp:327 po/rc.cpp:333 -#: po/rc.cpp:761 po/rc.cpp:764 ui_import.h:133 ui_k9mainw.h:189 -#: ui_k9mainw.h:195 ui_phonon.h:75 ui_phonon.h:76 ui_processList.h:81 -#: rc.cpp:132 rc.cpp:198 rc.cpp:288 rc.cpp:327 rc.cpp:333 rc.cpp:761 -#: rc.cpp:764 -msgid "..." +#: src/backup/k9dvdauthor.cpp:470 +msgid "Dvdauthor error :\n" msgstr "" -#. i18n: file: src/core/processList.ui:73 -#. i18n: ectx: property (text), widget (KPushButton) -#. i18n: file: src/import/processList.ui:55 -#. i18n: ectx: property (text), widget (KPushButton, bCancel) -#. i18n: file: src/core/processList.ui:73 -#. i18n: ectx: property (text), widget (KPushButton) -#. i18n: file: src/import/processList.ui:55 -#. i18n: ectx: property (text), widget (KPushButton, bCancel) -#: po/rc.cpp:135 po/rc.cpp:291 ui_processList.h:82 rc.cpp:135 rc.cpp:291 -msgid "&Cancel" +#: src/backup/k9dvdauthor.cpp:479 +msgid "Authoring cancelled" msgstr "" -#. i18n: file: src/core/processList.ui:76 -#. i18n: ectx: property (accel), widget (KPushButton) -#. i18n: file: src/import/processList.ui:58 -#. i18n: ectx: property (shortcut), widget (KPushButton, bCancel) -#. i18n: file: src/core/processList.ui:76 -#. i18n: ectx: property (accel), widget (KPushButton) -#. i18n: file: src/import/processList.ui:58 -#. i18n: ectx: property (shortcut), widget (KPushButton, bCancel) -#: po/rc.cpp:138 po/rc.cpp:294 ui_processList.h:83 rc.cpp:138 rc.cpp:294 -msgid "Alt+C" +#: src/backup/k9dvdauthor.cpp:482 src/import/k9newdvd.cpp:143 +msgid "An error occured while running DVDAuthor:\n" msgstr "" -#. i18n: file: src/core/progress.ui:31 -#. i18n: ectx: property (windowTitle), widget (QWidget, Progress) -#: po/rc.cpp:141 ui_progress.h:171 rc.cpp:141 -msgid "k9Copy" +#: src/backup/k9dvdauthor.cpp:549 +msgid "Fixing VOBUS" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:20 -#. i18n: ectx: property (windowTitle), widget (QWidget, chapterEdit) -#: po/rc.cpp:147 src/import/k9importfiles.cpp:96 ui_chapterEdit.h:219 -#: rc.cpp:147 -msgid "Chapter properties" +#: src/backup/k9dvdbackup.cpp:150 src/backup/k9dvdbackup.cpp:164 +#: src/backup/k9dvdbackup.cpp:526 src/backup/k9dvdbackup.cpp:612 +msgid "DVD backup cancelled" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:130 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:153 ui_chapterEdit.h:221 rc.cpp:153 -msgid "video" +#: src/backup/k9dvdbackup.cpp:177 +msgid "unable to open VIDEO_TS.IFO" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:155 -#. i18n: ectx: property (filter), widget (KUrlRequester, urFile) -#: po/rc.cpp:156 ui_chapterEdit.h:222 rc.cpp:156 -msgid "" -"*.avi\n" -"*.mpeg\n" -"*.mpg\n" -"*.*" +#: src/backup/k9dvdbackup.cpp:199 src/backup/k9dvdbackup.cpp:380 +#: src/backup/k9dvdbackup.cpp:450 +msgid "Unable to open file " msgstr "" -#. i18n: file: src/import/chapterEdit.ui:162 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:162 ui_chapterEdit.h:226 rc.cpp:162 -msgid "start" +#: src/backup/k9dvdbackup.cpp:278 +msgid "Unable to open titleset %1" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:178 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twstart) -#. i18n: file: src/import/chapterEdit.ui:253 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twend) -#. i18n: file: src/import/newTitle.ui:113 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twLength) -#. i18n: file: src/import/chapterEdit.ui:178 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twstart) -#. i18n: file: src/import/chapterEdit.ui:253 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twend) -#. i18n: file: src/import/newTitle.ui:113 -#. i18n: ectx: property (displayFormat), widget (QTimeEdit, twLength) -#: po/rc.cpp:165 po/rc.cpp:177 po/rc.cpp:267 ui_chapterEdit.h:227 -#: ui_chapterEdit.h:231 ui_newTitle.h:198 rc.cpp:165 rc.cpp:177 rc.cpp:267 -msgid "HH:mm:ss" +#: src/backup/k9dvdbackup.cpp:284 src/backup/k9dvdbackup.cpp:584 +msgid "Extracting titleset %1" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:191 -#. i18n: ectx: property (text), widget (KPushButton, bStart) -#. i18n: file: src/import/chapterEdit.ui:266 -#. i18n: ectx: property (text), widget (KPushButton, bEnd) -#. i18n: file: src/import/chapterEdit.ui:191 -#. i18n: ectx: property (text), widget (KPushButton, bStart) -#. i18n: file: src/import/chapterEdit.ui:266 -#. i18n: ectx: property (text), widget (KPushButton, bEnd) -#: po/rc.cpp:168 po/rc.cpp:180 ui_chapterEdit.h:228 ui_chapterEdit.h:232 -#: rc.cpp:168 rc.cpp:180 -msgid "set Current Frame" +#: src/backup/k9dvdbackup.cpp:457 +msgid "Unable to open menu for titleset %1" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:214 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakStart) -#. i18n: file: src/import/chapterEdit.ui:273 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakEnd) -#. i18n: file: src/import/chapterEdit.ui:214 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakStart) -#. i18n: file: src/import/chapterEdit.ui:273 -#. i18n: ectx: property (text), widget (QCheckBox, ckBreakEnd) -#: po/rc.cpp:171 po/rc.cpp:183 ui_chapterEdit.h:229 ui_chapterEdit.h:233 -#: rc.cpp:171 rc.cpp:183 -msgid "break continuity" +#: src/backup/k9dvdbackup.cpp:483 +msgid "Extracting menu for titleset %1" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:237 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:174 ui_chapterEdit.h:230 rc.cpp:174 -msgid "end" +#: src/backup/k9dvdbackup.cpp:576 +msgid "Unable to open ifo file for titleset %1" msgstr "" -#. i18n: file: src/import/chapterEdit.ui:302 -#. i18n: ectx: property (text), widget (QPushButton, bTitleButton) -#: po/rc.cpp:186 ui_chapterEdit.h:234 rc.cpp:186 -msgid "set Title button" +#: src/backup/k9dvdbackup.cpp:588 src/backup/k9dvdbackup.cpp:1720 +msgid "Unable to open DVD" msgstr "" -#. i18n: file: src/import/import.ui:14 -#. i18n: ectx: property (windowTitle), widget (QWidget, import) -#: po/rc.cpp:189 src/import/k9import.cpp:36 ui_import.h:130 rc.cpp:189 -msgid "import" +#: src/backup/k9dvdbackup.cpp:598 +msgid "Unable to open vobs for titleset %1" msgstr "" -#. i18n: file: src/import/import.ui:26 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/configDlg.ui:113 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefDVD.ui:19 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -#. i18n: file: src/import/import.ui:26 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/configDlg.ui:113 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefDVD.ui:19 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -#: po/rc.cpp:192 po/rc.cpp:309 po/rc.cpp:438 ui_configDlg.h:127 -#: ui_import.h:131 ui_prefDVD.h:205 rc.cpp:192 rc.cpp:309 rc.cpp:438 -msgid "Output" +#: src/backup/k9dvdbackup.cpp:1407 +msgid "Updating vob %1" msgstr "" -#. i18n: file: src/import/import.ui:57 -#. i18n: ectx: property (text), widget (QTreeWidget, lvDVD) -#: po/rc.cpp:195 ui_import.h:132 rc.cpp:195 -msgid "Video files" +#: src/backup/k9dvdbackup.cpp:1424 +msgid "DVD backup canceled" msgstr "" -#. i18n: file: src/import/import.ui:82 -#. i18n: ectx: property (text), item, widget (QComboBox, cbFormat) -#: po/rc.cpp:201 ui_import.h:136 rc.cpp:201 -msgid "PAL" +#: src/backup/k9execcopy.cpp:32 src/core/k9burndvd.cpp:177 +#: src/core/k9burndvd.cpp:290 src/import/k9import.cpp:321 +#: src/main/k9main.cpp:1388 src/main/k9playbackoptions.cpp:147 +#: ui_aststreams.h:55 ui_k9mainw.h:200 ui_prefDVD.h:232 +msgid "default" msgstr "" -#. i18n: file: src/import/import.ui:87 -#. i18n: ectx: property (text), item, widget (QComboBox, cbFormat) -#: po/rc.cpp:204 ui_import.h:137 rc.cpp:204 -msgid "NTSC" +#: src/backup/k9execcopy.cpp:40 src/backup/k9execcopy.cpp:120 +#: src/backup/k9execcopy.cpp:309 src/backup/k9execcopy.cpp:365 +msgid "DVD is not opened" msgstr "" -#. i18n: file: src/import/menuEdit.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, menuEdit) -#: po/rc.cpp:210 ui_menuEdit.h:206 rc.cpp:210 -msgid "Edit Menu" +#: src/backup/k9execcopy.cpp:40 src/backup/k9execcopy.cpp:64 +#: src/backup/k9execcopy.cpp:110 +msgid "DVD Copy" msgstr "" -#. i18n: file: src/import/menuEdit.ui:37 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:213 ui_menuEdit.h:207 rc.cpp:213 -msgid "Text" +#: src/backup/k9execcopy.cpp:64 +msgid "" +"Insufficient disk space on %1\n" +"%2 mb expected." msgstr "" -#. i18n: file: src/import/menuEdit.ui:53 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:216 ui_menuEdit.h:208 rc.cpp:216 -msgid "Background picture" +#: src/backup/k9execcopy.cpp:110 src/backup/k9execcopy.cpp:356 +#: src/backup/k9execcopy.cpp:416 +msgid "Selected titles have been successfully extracted" msgstr "" -#. i18n: file: src/import/menuEdit.ui:85 -#. i18n: ectx: property (text), widget (KPushButton, bFont) -#. i18n: file: src/main/prefAuthor.ui:175 -#. i18n: ectx: property (text), widget (KPushButton, bButtonFont) -#. i18n: file: src/import/menuEdit.ui:85 -#. i18n: ectx: property (text), widget (KPushButton, bFont) -#. i18n: file: src/main/prefAuthor.ui:175 -#. i18n: ectx: property (text), widget (KPushButton, bButtonFont) -#: po/rc.cpp:219 po/rc.cpp:426 ui_menuEdit.h:210 ui_prefAuthor.h:209 -#: rc.cpp:219 rc.cpp:426 -msgid "Font" +#: src/backup/k9execcopy.cpp:138 src/backup/k9execcopy.cpp:327 +#: src/backup/k9execcopy.cpp:383 src/backup/k9mp4enc.cpp:252 +msgid "Save file to disk" msgstr "" -#. i18n: file: src/import/menuEdit.ui:99 -#. i18n: ectx: property (text), item, widget (QComboBox, cbPosTitle) -#: po/rc.cpp:222 ui_menuEdit.h:213 rc.cpp:222 -msgid "Bottom" +#: src/backup/k9execcopy.cpp:173 src/backup/k9mp4enc.cpp:122 +#: src/backup/k9mp4enc.cpp:130 src/backup/k9mp4enc.cpp:136 +#: src/backup/k9mp4enc.cpp:146 src/backup/k9mp4enc.cpp:415 +msgid "Encoding error" msgstr "" -#. i18n: file: src/import/menuEdit.ui:104 -#. i18n: ectx: property (text), item, widget (QComboBox, cbPosTitle) -#: po/rc.cpp:225 ui_menuEdit.h:214 rc.cpp:225 -msgid "Right" +#: src/backup/k9execcopy.cpp:194 +msgid "Selected titles have been successfully encoded" msgstr "" -#. i18n: file: src/import/menuEdit.ui:171 -#. i18n: ectx: property (text), widget (QLabel, lTitle) -#: po/rc.cpp:228 src/import/k9import.cpp:69 src/import/k9menuedit.cpp:284 -#: ui_menuEdit.h:218 rc.cpp:228 -msgid "Root Menu" +#: src/backup/k9execcopy.cpp:194 src/backup/k9execcopy.cpp:356 +#: src/backup/k9execcopy.cpp:416 ui_mp4dlg.h:240 ui_mp4dlg.h:241 +msgid "Encoding" msgstr "" -#. i18n: file: src/import/menuEdit.ui:181 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:231 ui_menuEdit.h:219 rc.cpp:231 -msgid "At start" +#: src/backup/k9execcopy.cpp:288 +msgid "Muxing Matroska file" msgstr "" -#. i18n: file: src/import/menuEdit.ui:192 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#: po/rc.cpp:234 ui_menuEdit.h:222 rc.cpp:234 -msgid "Play menu" +#: src/backup/k9execcopy.cpp:301 +msgid "An error occured while running mkvmerge" msgstr "" -#. i18n: file: src/import/menuEdit.ui:197 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#. i18n: file: src/import/menuEdit.ui:226 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#. i18n: file: src/import/menuEdit.ui:197 -#. i18n: ectx: property (text), item, widget (QComboBox, cbStart) -#. i18n: file: src/import/menuEdit.ui:226 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:237 po/rc.cpp:249 ui_menuEdit.h:223 ui_menuEdit.h:230 rc.cpp:237 -#: rc.cpp:249 -msgid "Play title 1" +#: src/backup/k9execcopy.cpp:301 +msgid "Muxing Matroska" msgstr "" -#. i18n: file: src/import/menuEdit.ui:205 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_2) -#: po/rc.cpp:240 ui_menuEdit.h:225 rc.cpp:240 -msgid "At End" +#: src/backup/k9execcopy.cpp:365 +msgid "Audio Extraction" msgstr "" -#. i18n: file: src/import/menuEdit.ui:216 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:243 ui_menuEdit.h:228 rc.cpp:243 -msgid "Play root menu" +#: src/backup/k9mp4dlg.cpp:27 +msgid "transcoding" msgstr "" -#. i18n: file: src/import/menuEdit.ui:221 -#. i18n: ectx: property (text), item, widget (QComboBox, cbEnd) -#: po/rc.cpp:246 ui_menuEdit.h:229 rc.cpp:246 -msgid "Play title menu" +#: src/backup/k9mp4enc.cpp:122 +msgid "Audio extraction can only be done with ffmpeg" msgstr "" -#. i18n: file: src/import/newTitle.ui:14 -#. i18n: ectx: property (windowTitle), widget (QWidget, newTitle) -#: po/rc.cpp:252 src/import/k9newtitle.cpp:89 ui_newTitle.h:192 rc.cpp:252 -msgid "Add title" +#: src/backup/k9mp4enc.cpp:130 +msgid "Matroska encoding can only be done with ffmpeg" msgstr "" -#. i18n: file: src/import/newTitle.ui:28 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:255 ui_newTitle.h:193 rc.cpp:255 -msgid "Video file" +#: src/backup/k9mp4enc.cpp:466 src/backup/k9mp4enc.cpp:529 +#: src/backup/k9mp4enc.cpp:531 src/backup/k9mp4enc.cpp:638 +#: src/backup/k9mp4enc.cpp:640 src/import/k9newdvd.cpp:274 +msgid "Encoding %1" msgstr "" -#. i18n: file: src/import/newTitle.ui:71 -#. i18n: ectx: property (text), widget (QRadioButton, rbNumber) -#: po/rc.cpp:261 ui_newTitle.h:196 rc.cpp:261 -msgid "number of chapters" +#: src/backup/k9mp4enc.cpp:529 src/backup/k9mp4enc.cpp:638 +msgid "pass %1" msgstr "" -#. i18n: file: src/import/newTitle.ui:97 -#. i18n: ectx: property (text), widget (QRadioButton, rbLength) -#: po/rc.cpp:264 ui_newTitle.h:197 rc.cpp:264 -msgid "chapter length" +#: src/backup/k9mp4enc.cpp:824 +msgid "audio" msgstr "" -#. i18n: file: src/import/newTitle.ui:136 -#. i18n: ectx: property (text), widget (QCheckBox, ckReencode) -#: po/rc.cpp:270 ui_newTitle.h:199 rc.cpp:270 -msgid "Do not reencode" +#: src/backup/k9mp4enc.cpp:824 src/backup/k9mp4enc.cpp:842 +msgid "An error occured while encoding the %1 stream" msgstr "" -#. i18n: file: src/import/newTitle.ui:187 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/main/configDlg.ui:129 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/import/newTitle.ui:187 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#. i18n: file: src/main/configDlg.ui:129 -#. i18n: ectx: property (text), widget (KPushButton, bAdd) -#: po/rc.cpp:273 po/rc.cpp:312 ui_configDlg.h:128 ui_newTitle.h:200 rc.cpp:273 -#: rc.cpp:312 -msgid "Add" +#: src/backup/k9mp4enc.cpp:842 ui_chapterEdit.h:221 +msgid "video" msgstr "" -#. i18n: file: src/import/processList.ui:26 -#. i18n: ectx: property (text), widget (QTreeWidget, lProcess) -#: po/rc.cpp:279 ui_processList.h:78 rc.cpp:279 -msgid "Progression" +#: src/core/k9burndvd.cpp:188 src/core/k9burndvd.cpp:189 +#: src/core/k9burndvd.cpp:267 src/core/k9burndvd.cpp:268 +#: src/core/k9burndvd.cpp:363 +msgid "Burning DVD" msgstr "" -#. i18n: file: src/main/configDlg.ui:20 -#. i18n: ectx: property (windowTitle), widget (QWidget, configDlg) -#: po/rc.cpp:297 src/main/k9settings.cpp:29 src/main/kconfigdlg.cpp:35 -#: ui_configDlg.h:123 rc.cpp:297 -msgid "Devices" +#: src/core/k9burndvd.cpp:200 src/core/k9burndvd.cpp:296 +#: src/import/k9import.cpp:295 src/main/k9main.cpp:371 +msgid "Save image to disk" msgstr "" -#. i18n: file: src/main/configDlg.ui:98 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#: po/rc.cpp:300 ui_configDlg.h:124 rc.cpp:300 -msgid "device" +#: src/core/k9burndvd.cpp:225 src/core/k9burndvd.cpp:314 +msgid "Insert a recordable DVD" msgstr "" -#. i18n: file: src/main/configDlg.ui:103 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefMencoder.ui:108 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#. i18n: file: src/main/prefMencoder.ui:360 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/configDlg.ui:103 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#. i18n: file: src/main/prefMencoder.ui:108 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#. i18n: file: src/main/prefMencoder.ui:360 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:303 po/rc.cpp:525 po/rc.cpp:543 ui_configDlg.h:125 -#: ui_prefMencoder.h:421 ui_prefMencoder.h:431 rc.cpp:303 rc.cpp:525 -#: rc.cpp:543 -msgid "label" +#: src/core/k9burndvd.cpp:225 src/core/k9burndvd.cpp:234 +#: src/core/k9burndvd.cpp:240 src/core/k9burndvd.cpp:315 +#: src/core/k9burndvd.cpp:321 src/core/k9burndvd.cpp:327 +msgid "DVD burning" msgstr "" -#. i18n: file: src/main/configDlg.ui:108 -#. i18n: ectx: property (text), widget (QTableWidget, tblDevices) -#: po/rc.cpp:306 ui_configDlg.h:126 rc.cpp:306 -msgid "Input" +#: src/core/k9burndvd.cpp:234 src/core/k9burndvd.cpp:321 +msgid "Error burning DVD :\n" msgstr "" -#. i18n: file: src/main/configDlg.ui:148 -#. i18n: ectx: property (text), widget (KPushButton, bRemove) -#: po/rc.cpp:315 ui_configDlg.h:130 rc.cpp:315 -msgid "Remove" +#: src/core/k9burndvd.cpp:240 src/core/k9burndvd.cpp:327 +msgid "DVD Burning finished" msgstr "" -#. i18n: file: src/main/k9mainw.ui:25 -#. i18n: ectx: property (windowTitle), widget (QWidget, MainDlg) -#: po/rc.cpp:318 ui_k9mainw.h:182 rc.cpp:318 -msgid "MainDlg" +#: src/core/k9burndvd.cpp:248 src/core/k9burndvd.cpp:332 +msgid "An error occured while Burning DVD" msgstr "" -#. i18n: file: src/main/k9mainw.ui:77 -#. i18n: ectx: property (toolTip), widget (QToolButton, binputOpenDir) -#: po/rc.cpp:324 ui_k9mainw.h:186 rc.cpp:324 -msgid "Open a folder" +#: src/core/k9burndvd.cpp:248 src/core/k9burndvd.cpp:332 +msgid "Insert an other DVD" msgstr "" -#. i18n: file: src/main/k9mainw.ui:87 -#. i18n: ectx: property (toolTip), widget (QToolButton, binputOpen) -#: po/rc.cpp:330 ui_k9mainw.h:192 rc.cpp:330 -msgid "Open an iso image" +#: src/core/k9burndvd.cpp:364 +msgid "Current write speed :%1 x" msgstr "" -#. i18n: file: src/main/k9mainw.ui:121 -#. i18n: ectx: property (text), widget (QLabel, lblInput_2) -#: po/rc.cpp:336 ui_k9mainw.h:196 rc.cpp:336 -msgid "Output device " +#: src/core/k9dialogs.cpp:125 +msgid "select a directory" msgstr "" -#. i18n: file: src/main/k9mainw.ui:153 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_3) -#: po/rc.cpp:339 ui_k9mainw.h:197 rc.cpp:339 -msgid "@" +#: src/core/k9dvd.cpp:133 +msgid "for visually impaired" msgstr "" -#. i18n: file: src/main/k9mainw.ui:187 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/main/prefMPEG4.ui:266 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/k9mainw.ui:187 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#. i18n: file: src/main/prefMPEG4.ui:266 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:345 po/rc.cpp:591 ui_k9mainw.h:202 ui_prefMPEG4.h:376 rc.cpp:345 -#: rc.cpp:591 -msgid "X" +#: src/core/k9dvd.cpp:134 +msgid "director's comments" msgstr "" -#. i18n: file: src/main/k9mainw.ui:213 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:348 ui_k9mainw.h:203 rc.cpp:348 -msgid "Title" +#: src/core/k9dvd.cpp:135 +msgid "alternate director's comments" msgstr "" -#. i18n: file: src/main/k9mainw.ui:223 -#. i18n: ectx: property (text), widget (QTreeWidget, listView1) -#: po/rc.cpp:354 ui_k9mainw.h:205 rc.cpp:354 -msgid "Content" +#: src/core/k9dvd.cpp:139 +msgid "Large" msgstr "" -#. i18n: file: src/main/langselectw.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, langSelect) -#: po/rc.cpp:357 src/main/k9copy.cpp:158 ui_langselectw.h:61 rc.cpp:357 -msgid "Selection" +#: src/core/k9dvd.cpp:140 +msgid "Children" msgstr "" -#. i18n: file: src/main/langselectw.ui:47 -#. i18n: ectx: property (text), widget (QTreeWidget, lvLanguages) -#: po/rc.cpp:360 ui_langselectw.h:62 rc.cpp:360 -msgid "Languages" +#: src/core/k9dvd.cpp:141 src/core/k9dvd.cpp:147 src/core/k9dvd.cpp:148 +#: src/core/k9dvd.cpp:149 +msgid "reserved" msgstr "" -#. i18n: file: src/main/mencoderCmdGen.ui:13 -#. i18n: ectx: property (windowTitle), widget (QDialog, mencoderCmdGen) -#: po/rc.cpp:363 src/main/k9mencodercmdgen.cpp:63 ui_mencoderCmdGen.h:108 -#: rc.cpp:363 -msgid "MEncoder options" +#: src/core/k9dvd.cpp:142 +msgid "Normal captions" msgstr "" -#. i18n: file: src/main/mencoderCmdGen.ui:23 -#. i18n: ectx: property (text), widget (QTreeWidget, listView) -#: po/rc.cpp:366 ui_mencoderCmdGen.h:109 rc.cpp:366 -msgid "1" +#: src/core/k9dvd.cpp:143 +msgid "Large captions" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, PlaybackOptionsw) -#: po/rc.cpp:369 src/main/k9copy.cpp:149 ui_playbackoptionsw.h:226 rc.cpp:369 -msgid "DVD playback options" +#: src/core/k9dvd.cpp:144 +msgid "Children captions" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:34 -#. i18n: ectx: property (text), widget (QCheckBox, ckMenu) -#: po/rc.cpp:372 ui_playbackoptionsw.h:227 rc.cpp:372 -msgid "&Keep original menus" +#: src/core/k9dvd.cpp:146 +msgid "Forced" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:37 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMenu) -#. i18n: file: src/main/prefMPEG4.ui:171 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMp4AspectRatio) -#. i18n: file: src/main/playbackoptionsw.ui:37 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMenu) -#. i18n: file: src/main/prefMPEG4.ui:171 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMp4AspectRatio) -#: po/rc.cpp:375 po/rc.cpp:588 ui_playbackoptionsw.h:228 ui_prefMPEG4.h:374 -#: rc.cpp:375 rc.cpp:588 -msgid "Alt+K" +#: src/core/k9dvd.cpp:150 +msgid "Director's comments" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:184 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#: po/rc.cpp:378 ui_playbackoptionsw.h:231 rc.cpp:378 -msgid "Selected Titles" +#: src/core/k9dvd.cpp:151 +msgid "Large director's comments" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:245 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:381 ui_playbackoptionsw.h:232 rc.cpp:381 -msgid "Default language" +#: src/core/k9dvd.cpp:152 +msgid "Director's comments for children" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:271 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#: po/rc.cpp:384 ui_playbackoptionsw.h:233 rc.cpp:384 -msgid "Subtitle" +#: src/core/k9dvd.cpp:202 +msgid "Couldn't open %1 for title\n" msgstr "" -#. i18n: file: src/main/playbackoptionsw.ui:297 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#. i18n: file: src/main/prefAuthor.ui:19 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox1) -#. i18n: file: src/main/prefMPEG4.ui:397 -#. i18n: ectx: attribute (title), widget (QWidget, tabAudio) -#. i18n: file: src/mplayer/mplayer.ui:25 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#. i18n: file: src/main/playbackoptionsw.ui:297 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#. i18n: file: src/main/prefAuthor.ui:19 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox1) -#. i18n: file: src/main/prefMPEG4.ui:397 -#. i18n: ectx: attribute (title), widget (QWidget, tabAudio) -#. i18n: file: src/mplayer/mplayer.ui:25 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:387 po/rc.cpp:393 po/rc.cpp:609 po/rc.cpp:746 -#: src/main/k9langselect.cpp:89 ui_mplayer.h:240 ui_playbackoptionsw.h:234 -#: ui_prefAuthor.h:192 ui_prefMPEG4.h:396 rc.cpp:387 rc.cpp:393 rc.cpp:609 -#: rc.cpp:746 -msgid "Audio" +#: src/core/k9dvd.cpp:204 src/core/k9dvd.cpp:212 src/core/k9dvd.cpp:220 +#: src/core/k9dvd.cpp:382 src/main/k9main.cpp:561 +msgid "unknown" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefAuthor) -#: po/rc.cpp:390 ui_prefAuthor.h:191 rc.cpp:390 -msgid "Authoring options" +#: src/core/k9dvd.cpp:210 +msgid "Couldn't seek in %1 for title\n" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:26 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioFormat) -#: po/rc.cpp:396 ui_prefAuthor.h:195 rc.cpp:396 -msgid "AC3" +#: src/core/k9dvd.cpp:237 +msgid "Not Specified" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:31 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioFormat) -#: po/rc.cpp:399 ui_prefAuthor.h:196 rc.cpp:399 -msgid "MP2" +#: src/core/k9dvd.cpp:237 +msgid "Afar" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:40 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:402 ui_prefAuthor.h:200 rc.cpp:402 -msgid "128" +#: src/core/k9dvd.cpp:237 +msgid "Abkhazian" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:45 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:405 ui_prefAuthor.h:201 rc.cpp:405 -msgid "192" +#: src/core/k9dvd.cpp:237 +msgid "Afrikaans" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:50 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAudioBitrate) -#: po/rc.cpp:408 ui_prefAuthor.h:202 rc.cpp:408 -msgid "320" +#: src/core/k9dvd.cpp:237 +msgid "Amharic" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:58 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:411 ui_prefAuthor.h:204 rc.cpp:411 -msgid "Format" +#: src/core/k9dvd.cpp:238 +msgid "Arabic" +msgstr "" + +#: src/core/k9dvd.cpp:238 +msgid "Assamese" +msgstr "" + +#: src/core/k9dvd.cpp:238 +msgid "Aymara" +msgstr "" + +#: src/core/k9dvd.cpp:238 +msgid "Azerbaijani" +msgstr "" + +#: src/core/k9dvd.cpp:238 +msgid "Bashkir" +msgstr "" + +#: src/core/k9dvd.cpp:239 +msgid "Byelorussian" +msgstr "" + +#: src/core/k9dvd.cpp:239 +msgid "Bulgarian" +msgstr "" + +#: src/core/k9dvd.cpp:239 +msgid "Bihari" +msgstr "" + +#: src/core/k9dvd.cpp:239 +msgid "Bislama" +msgstr "" + +#: src/core/k9dvd.cpp:239 +msgid "Bengali; Bangla" +msgstr "" + +#: src/core/k9dvd.cpp:240 +msgid "Tibetan" +msgstr "" + +#: src/core/k9dvd.cpp:240 +msgid "Breton" +msgstr "" + +#: src/core/k9dvd.cpp:240 +msgid "Catalan" +msgstr "" + +#: src/core/k9dvd.cpp:240 +msgid "Corsican" +msgstr "" + +#: src/core/k9dvd.cpp:240 +msgid "Czech" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "Welsh" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "Dansk" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "Deutsch" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "Bhutani" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "Greek" +msgstr "" + +#: src/core/k9dvd.cpp:241 +msgid "English" +msgstr "" + +#: src/core/k9dvd.cpp:242 +msgid "Esperanto" +msgstr "" + +#: src/core/k9dvd.cpp:242 +msgid "Espanol" +msgstr "" + +#: src/core/k9dvd.cpp:242 +msgid "Estonian" +msgstr "" + +#: src/core/k9dvd.cpp:242 +msgid "Basque" +msgstr "" + +#: src/core/k9dvd.cpp:242 +msgid "Persian" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Suomi" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Fiji" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Faroese" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Francais" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Frisian" +msgstr "" + +#: src/core/k9dvd.cpp:243 +msgid "Gaelic" +msgstr "" + +#: src/core/k9dvd.cpp:244 +msgid "Scots Gaelic" +msgstr "" + +#: src/core/k9dvd.cpp:244 +msgid "Galician" +msgstr "" + +#: src/core/k9dvd.cpp:244 +msgid "Guarani" +msgstr "" + +#: src/core/k9dvd.cpp:244 +msgid "Gujarati" +msgstr "" + +#: src/core/k9dvd.cpp:244 +msgid "Hausa" +msgstr "" + +#: src/core/k9dvd.cpp:245 src/core/k9dvd.cpp:247 +msgid "Hebrew" +msgstr "" + +#: src/core/k9dvd.cpp:245 +msgid "Hindi" +msgstr "" + +#: src/core/k9dvd.cpp:245 +msgid "Hrvatski" +msgstr "" + +#: src/core/k9dvd.cpp:245 +msgid "Magyar" +msgstr "" + +#: src/core/k9dvd.cpp:245 +msgid "Armenian" +msgstr "" + +#: src/core/k9dvd.cpp:246 +msgid "Interlingua" +msgstr "" + +#: src/core/k9dvd.cpp:246 +msgid "Indonesian" +msgstr "" + +#: src/core/k9dvd.cpp:246 +msgid "Interlingue" +msgstr "" + +#: src/core/k9dvd.cpp:246 +msgid "Inupiak" +msgstr "" + +#: src/core/k9dvd.cpp:247 +msgid "Islenska" +msgstr "" + +#: src/core/k9dvd.cpp:247 +msgid "Italiano" +msgstr "" + +#: src/core/k9dvd.cpp:247 +msgid "Inuktitut" +msgstr "" + +#: src/core/k9dvd.cpp:247 +msgid "Japanese" +msgstr "" + +#: src/core/k9dvd.cpp:248 src/core/k9dvd.cpp:263 +msgid "Yiddish" +msgstr "" + +#: src/core/k9dvd.cpp:248 +msgid "Javanese" +msgstr "" + +#: src/core/k9dvd.cpp:248 +msgid "Georgian" +msgstr "" + +#: src/core/k9dvd.cpp:248 +msgid "Kazakh" +msgstr "" + +#: src/core/k9dvd.cpp:248 +msgid "Greenlandic" +msgstr "" + +#: src/core/k9dvd.cpp:249 +msgid "Cambodian" +msgstr "" + +#: src/core/k9dvd.cpp:249 +msgid "Kannada" +msgstr "" + +#: src/core/k9dvd.cpp:249 +msgid "Korean" +msgstr "" + +#: src/core/k9dvd.cpp:249 +msgid "Kashmiri" +msgstr "" + +#: src/core/k9dvd.cpp:249 +msgid "Kurdish" +msgstr "" + +#: src/core/k9dvd.cpp:250 +msgid "Kirghiz" +msgstr "" + +#: src/core/k9dvd.cpp:250 +msgid "Latin" +msgstr "" + +#: src/core/k9dvd.cpp:250 +msgid "Lingala" +msgstr "" + +#: src/core/k9dvd.cpp:250 +msgid "Laothian" +msgstr "" + +#: src/core/k9dvd.cpp:250 +msgid "Lithuanian" +msgstr "" + +#: src/core/k9dvd.cpp:251 +msgid "Latvian, Lettish" +msgstr "" + +#: src/core/k9dvd.cpp:251 +msgid "Malagasy" +msgstr "" + +#: src/core/k9dvd.cpp:251 +msgid "Maori" +msgstr "" + +#: src/core/k9dvd.cpp:251 +msgid "Macedonian" +msgstr "" + +#: src/core/k9dvd.cpp:251 +msgid "Malayalam" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Mongolian" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Moldavian" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Marathi" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Malay" +msgstr "" + +#: src/core/k9dvd.cpp:252 +msgid "Maltese" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Burmese" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nauru" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nepali" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Nederlands" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Norsk" +msgstr "" + +#: src/core/k9dvd.cpp:253 +msgid "Occitan" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Oromo" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Oriya" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Punjabi" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Polish" +msgstr "" + +#: src/core/k9dvd.cpp:254 +msgid "Pashto, Pushto" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Portugues" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Quechua" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Rhaeto-Romance" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Kirundi" +msgstr "" + +#: src/core/k9dvd.cpp:255 +msgid "Romanian" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Russian" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Kinyarwanda" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sanskrit" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sindhi" +msgstr "" + +#: src/core/k9dvd.cpp:256 +msgid "Sangho" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Serbo-Croatian" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Sinhalese" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Slovak" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Slovenian" +msgstr "" + +#: src/core/k9dvd.cpp:257 +msgid "Samoan" +msgstr "" + +#: src/core/k9dvd.cpp:258 +msgid "Shona" +msgstr "" + +#: src/core/k9dvd.cpp:258 +msgid "Somali" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:113 -#. i18n: ectx: property (title), widget (Q3GroupBox, groupBox2) -#: po/rc.cpp:417 ui_prefAuthor.h:206 rc.cpp:417 -msgid "Buttons" +#: src/core/k9dvd.cpp:258 +msgid "Albanian" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:119 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefMPEG4.ui:111 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#. i18n: file: src/main/prefAuthor.ui:119 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefMPEG4.ui:111 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#: po/rc.cpp:420 po/rc.cpp:576 ui_prefAuthor.h:207 ui_prefMPEG4.h:369 -#: rc.cpp:420 rc.cpp:576 -msgid "Width" +#: src/core/k9dvd.cpp:258 +msgid "Serbian" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:145 -#. i18n: ectx: property (text), widget (QLabel, textLabel5) -#. i18n: file: src/main/prefMPEG4.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2_2) -#. i18n: file: src/main/prefAuthor.ui:145 -#. i18n: ectx: property (text), widget (QLabel, textLabel5) -#. i18n: file: src/main/prefMPEG4.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2_2) -#: po/rc.cpp:423 po/rc.cpp:579 ui_prefAuthor.h:208 ui_prefMPEG4.h:370 -#: rc.cpp:423 rc.cpp:579 -msgid "Height" +#: src/core/k9dvd.cpp:258 +msgid "Siswati" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:182 -#. i18n: ectx: property (text), widget (QLabel, textLabel6) -#: po/rc.cpp:429 ui_prefAuthor.h:210 rc.cpp:429 -msgid "Hilite color" +#: src/core/k9dvd.cpp:259 +msgid "Sesotho" msgstr "" -#. i18n: file: src/main/prefAuthor.ui:199 -#. i18n: ectx: property (text), widget (QLabel, textLabel6_2) -#: po/rc.cpp:432 ui_prefAuthor.h:212 rc.cpp:432 -msgid "Text color" +#: src/core/k9dvd.cpp:259 +msgid "Sundanese" msgstr "" -#. i18n: file: src/main/prefDVD.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefDVD) -#: po/rc.cpp:435 ui_prefDVD.h:204 rc.cpp:435 -msgid "prefDVD" +#: src/core/k9dvd.cpp:259 +msgid "Svenska" msgstr "" -#. i18n: file: src/main/prefDVD.ui:31 -#. i18n: ectx: property (text), widget (QLabel, lblworkDir) -#: po/rc.cpp:441 ui_prefDVD.h:206 rc.cpp:441 -msgid "Output directory" +#: src/core/k9dvd.cpp:259 +msgid "Swahili" msgstr "" -#. i18n: file: src/main/prefDVD.ui:51 -#. i18n: ectx: property (text), widget (QCheckBox, ckDelTmpFiles) -#: po/rc.cpp:444 ui_prefDVD.h:207 rc.cpp:444 -msgid "Clear output directory on exit" +#: src/core/k9dvd.cpp:259 +msgid "Tamil" msgstr "" -#. i18n: file: src/main/prefDVD.ui:54 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDelTmpFiles) -#: po/rc.cpp:447 ui_prefDVD.h:208 rc.cpp:447 -msgid "Alt+Y" +#: src/core/k9dvd.cpp:260 +msgid "Telugu" msgstr "" -#. i18n: file: src/main/prefDVD.ui:61 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:450 ui_prefDVD.h:209 rc.cpp:450 -msgid "DVD size" +#: src/core/k9dvd.cpp:260 +msgid "Tajik" msgstr "" -#. i18n: file: src/main/prefDVD.ui:96 -#. i18n: ectx: property (text), widget (QCheckBox, ckMpegChapter) -#: po/rc.cpp:453 ui_prefDVD.h:210 rc.cpp:453 -msgid "one file/chapter (MPEG extraction)" +#: src/core/k9dvd.cpp:260 +msgid "Thai" msgstr "" -#. i18n: file: src/main/prefDVD.ui:99 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMpegChapter) -#. i18n: file: src/main/prefDVD.ui:109 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDvdAuthor) -#. i18n: file: src/main/prefDVD.ui:99 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckMpegChapter) -#. i18n: file: src/main/prefDVD.ui:109 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckDvdAuthor) -#: po/rc.cpp:456 po/rc.cpp:462 ui_prefDVD.h:211 ui_prefDVD.h:213 rc.cpp:456 -#: rc.cpp:462 -msgid "Alt+D" +#: src/core/k9dvd.cpp:260 +msgid "Tigrinya" msgstr "" -#. i18n: file: src/main/prefDVD.ui:106 -#. i18n: ectx: property (text), widget (QCheckBox, ckDvdAuthor) -#: po/rc.cpp:459 ui_prefDVD.h:212 rc.cpp:459 -msgid "use dvdAuthor for copy without menus" +#: src/core/k9dvd.cpp:260 +msgid "Turkmen" msgstr "" -#. i18n: file: src/main/prefDVD.ui:119 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox_2) -#: po/rc.cpp:465 ui_prefDVD.h:214 rc.cpp:465 -msgid "Burning" +#: src/core/k9dvd.cpp:260 +msgid "Tagalog" msgstr "" -#. i18n: file: src/main/prefDVD.ui:125 -#. i18n: ectx: property (text), widget (QCheckBox, ckK3b) -#: po/rc.cpp:468 ui_prefDVD.h:215 rc.cpp:468 -msgid "Burn with k3b" +#: src/core/k9dvd.cpp:261 +msgid "Setswana" msgstr "" -#. i18n: file: src/main/prefDVD.ui:128 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckK3b) -#. i18n: file: src/main/prefMPEG4.ui:344 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbBitrate) -#. i18n: file: src/main/prefDVD.ui:128 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckK3b) -#. i18n: file: src/main/prefMPEG4.ui:344 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbBitrate) -#: po/rc.cpp:471 po/rc.cpp:606 ui_prefDVD.h:216 ui_prefMPEG4.h:382 rc.cpp:471 -#: rc.cpp:606 -msgid "Alt+B" +#: src/core/k9dvd.cpp:261 +msgid "Tonga" msgstr "" -#. i18n: file: src/main/prefDVD.ui:141 -#. i18n: ectx: property (text), widget (QCheckBox, ckAutoBurn) -#: po/rc.cpp:474 ui_prefDVD.h:217 rc.cpp:474 -msgid "Auto burn" +#: src/core/k9dvd.cpp:261 +msgid "Turkish" msgstr "" -#. i18n: file: src/main/prefDVD.ui:144 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckAutoBurn) -#: po/rc.cpp:477 ui_prefDVD.h:218 rc.cpp:477 -msgid "Alt+T" +#: src/core/k9dvd.cpp:261 +msgid "Tsonga" msgstr "" -#. i18n: file: src/main/prefDVD.ui:154 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox_3) -#: po/rc.cpp:480 ui_prefDVD.h:219 rc.cpp:480 -msgid "Performances" +#: src/core/k9dvd.cpp:261 +msgid "Tatar" msgstr "" -#. i18n: file: src/main/prefDVD.ui:160 -#. i18n: ectx: property (text), widget (QCheckBox, ckQuickScan) -#: po/rc.cpp:483 ui_prefDVD.h:220 rc.cpp:483 -msgid "Quick scan" +#: src/core/k9dvd.cpp:261 +msgid "Twi" msgstr "" -#. i18n: file: src/main/prefDVD.ui:163 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ckQuickScan) -#: po/rc.cpp:486 ui_prefDVD.h:221 rc.cpp:486 -msgid "Alt+Q" +#: src/core/k9dvd.cpp:262 +msgid "Uighur" msgstr "" -#. i18n: file: src/main/prefDVD.ui:176 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:489 ui_prefDVD.h:222 rc.cpp:489 -msgid "DVD read ahead" +#: src/core/k9dvd.cpp:262 +msgid "Ukrainian" msgstr "" -#. i18n: file: src/main/prefDVD.ui:189 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:495 ui_prefDVD.h:226 rc.cpp:495 -msgid "skip bad sectors (slow)" +#: src/core/k9dvd.cpp:262 +msgid "Urdu" msgstr "" -#. i18n: file: src/main/prefDVD.ui:194 -#. i18n: ectx: property (text), item, widget (QComboBox, cbReadAhead) -#: po/rc.cpp:498 ui_prefDVD.h:227 rc.cpp:498 -msgid "skip bad sectors (faster)" +#: src/core/k9dvd.cpp:262 +msgid "Uzbek" msgstr "" -#. i18n: file: src/main/prefDVD.ui:208 -#. i18n: ectx: property (text), widget (QLabel, label_2) -#: po/rc.cpp:501 ui_prefDVD.h:229 rc.cpp:501 -msgid "" -"this option can improve reading of DVD having bad sectors.\n" -"It will require root privileges when opening the DVD." +#: src/core/k9dvd.cpp:262 +msgid "Vietnamese" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMencoder) -#. i18n: file: src/main/prefMPEG4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMPEG4) -#. i18n: file: src/main/prefpreview.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefPreview) -#. i18n: file: src/main/prefMencoder.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMencoder) -#. i18n: file: src/main/prefMPEG4.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefMPEG4) -#. i18n: file: src/main/prefpreview.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, prefPreview) -#: po/rc.cpp:505 po/rc.cpp:552 po/rc.cpp:639 ui_prefMencoder.h:409 -#: ui_prefMPEG4.h:358 ui_prefpreview.h:291 rc.cpp:505 rc.cpp:552 rc.cpp:639 -msgid "Form1" +#: src/core/k9dvd.cpp:263 +msgid "Volapuk" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:37 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:508 ui_prefMencoder.h:410 rc.cpp:508 -msgid "" -"$PASS\n" -"$WIDTH\n" -"$HEIGHT\n" -"$VIDBR\n" -"$AUDBR" +#: src/core/k9dvd.cpp:263 +msgid "Wolof" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Xhosa" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Yoruba" +msgstr "" + +#: src/core/k9dvd.cpp:263 +msgid "Zhuang" +msgstr "" + +#: src/core/k9dvd.cpp:264 +msgid "Chinese" +msgstr "" + +#: src/core/k9dvd.cpp:264 +msgid "Zulu" +msgstr "" + +#: src/core/k9dvd.cpp:264 src/core/k9dvd.cpp:266 src/core/k9dvd.cpp:488 +msgid "Unknown" +msgstr "" + +#: src/core/k9dvd.cpp:356 +msgid "Can't open disc %1!\n" +msgstr "" + +#: src/core/k9dvd.cpp:368 +msgid "Can't open main ifo!\n" +msgstr "" + +#: src/core/k9dvd.cpp:410 src/core/k9dvd.cpp:700 +msgid "Title %1" +msgstr "" + +#: src/core/k9dvd.cpp:753 +msgid "reading title" +msgstr "" + +#: src/core/k9dvd.cpp:870 +msgid "Error opening vobs for title %1\n" +msgstr "" + +#: src/core/k9dvd.cpp:881 +msgid "ERROR reading block %1\n" +msgstr "" + +#: src/core/k9dvdprogress.cpp:29 ui_dvdprogress.h:116 +msgid "DVD Analyze" +msgstr "" + +#: src/core/k9process.cpp:139 src/core/k9tools.cpp:34 +#: src/import/k9menu.cpp:165 +msgid "Error starting program %1" +msgstr "" + +#: src/core/k9process.cpp:139 src/core/k9tools.cpp:34 src/core/k9tools.cpp:56 +#: src/import/k9menu.cpp:165 +msgid "Running program" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:57 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_2) -#: po/rc.cpp:515 ui_prefMencoder.h:415 rc.cpp:515 +#: src/core/k9tools.cpp:47 +msgid "Enter the root password" +msgstr "" + +#: src/core/k9tools.cpp:56 +msgid "The root password is not valid" +msgstr "" + +#: src/devices/k9cddrive.cpp:214 msgid "" -"pass number\n" -"video width\n" -"video height\n" -"video bitrate\n" -"audio bitrate" +"The root password is needed to change the read ahead property of the dvd " +"drive" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:70 -#. i18n: ectx: attribute (title), widget (QWidget, tab) -#: po/rc.cpp:522 ui_prefMencoder.h:430 rc.cpp:522 -msgid "Video codecs" +#: src/import/k9avidecode.cpp:40 src/import/k9avidecode.cpp:44 +#: src/import/k9avidecode.cpp:49 src/vamps/k9ffmpeg.cpp:33 +#: src/vamps/k9ffmpeg.cpp:37 src/vamps/k9ffmpeg.cpp:46 +msgid "Cannot open then library %1" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:121 -#. i18n: ectx: property (text), widget (QLabel, textLabel2_3) -#: po/rc.cpp:528 ui_prefMencoder.h:422 rc.cpp:528 -msgid "fourcc" +#: src/import/k9avidecode.cpp:113 +msgid "Couldn't open the file %1" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:131 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_3) -#: po/rc.cpp:531 ui_prefMencoder.h:423 rc.cpp:531 -msgid "first pass" +#: src/import/k9avidecode.cpp:118 +msgid "Couldn't find stream information" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:233 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:534 ui_prefMencoder.h:426 rc.cpp:534 -msgid "one pass" +#: src/import/k9avidecode.cpp:131 +msgid "The file doesn't contain any video stream" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:301 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_3_2) -#: po/rc.cpp:537 ui_prefMencoder.h:429 rc.cpp:537 -msgid "second pass" +#: src/import/k9avidecode.cpp:142 +msgid "Unsupported codec" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:322 -#. i18n: ectx: attribute (title), widget (QWidget, tab) -#: po/rc.cpp:540 ui_prefMencoder.h:434 rc.cpp:540 -msgid "Audio codecs" +#: src/import/k9avidecode.cpp:147 +msgid "Could'nt open the codec" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:427 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2_2_2) -#: po/rc.cpp:546 ui_prefMencoder.h:433 rc.cpp:546 -msgid "options" +#: src/import/k9avidecode.cpp:158 +msgid "Unable to allocate memory for frames" msgstr "" -#. i18n: file: src/main/prefMencoder.ui:453 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:549 ui_prefMencoder.h:435 rc.cpp:549 -msgid "Available variables" +#: src/import/k9import.cpp:36 ui_import.h:130 +msgid "import" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:57 -#. i18n: ectx: attribute (title), widget (QWidget, tabVideo) -#: po/rc.cpp:555 ui_prefMPEG4.h:383 rc.cpp:555 -msgid "Video" +#: src/import/k9import.cpp:69 src/import/k9menuedit.cpp:283 ui_menuEdit.h:218 +msgid "Root Menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:63 -#. i18n: ectx: property (text), widget (QCheckBox, ck2passes) -#: po/rc.cpp:558 ui_prefMPEG4.h:360 rc.cpp:558 -msgid "2 pass" +#: src/import/k9import.cpp:87 src/main/k9main.cpp:492 src/main/k9main.cpp:1303 +#: ui_astsource.h:117 +msgid "ISO Image" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:66 -#. i18n: ectx: property (shortcut), widget (QCheckBox, ck2passes) -#: po/rc.cpp:561 ui_prefMPEG4.h:361 rc.cpp:561 -msgid "Alt+2" +#: src/import/k9import.cpp:88 src/main/k9main.cpp:1304 ui_astsource.h:116 +msgid "Folder" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:73 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4) -#. i18n: file: src/main/prefMPEG4.ui:403 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4_2) -#. i18n: file: src/main/prefMPEG4.ui:73 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4) -#. i18n: file: src/main/prefMPEG4.ui:403 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_4_2) -#: po/rc.cpp:564 po/rc.cpp:612 ui_prefMPEG4.h:362 ui_prefMPEG4.h:384 -#: rc.cpp:564 rc.cpp:612 -msgid "Codec" +#: src/import/k9import.cpp:239 src/import/k9import.cpp:254 +msgid "remove" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:93 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:567 ui_prefMPEG4.h:365 rc.cpp:567 -msgid "XviD" +#: src/import/k9import.cpp:242 +msgid "add chapter" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:98 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:570 ui_prefMPEG4.h:366 rc.cpp:570 -msgid "lavc MPEG4" +#: src/import/k9importfiles.cpp:88 +msgid "Add Title" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:103 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4Codec) -#: po/rc.cpp:573 ui_prefMPEG4.h:367 rc.cpp:573 -msgid "x264" +#: src/import/k9importfiles.cpp:96 ui_chapterEdit.h:219 +msgid "Chapter properties" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:152 -#. i18n: ectx: property (text), widget (QLineEdit, leMp4Width) -#: po/rc.cpp:582 ui_prefMPEG4.h:372 rc.cpp:582 -msgid "640" +#: src/import/k9importfiles.cpp:109 +msgid "Edit menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:168 -#. i18n: ectx: property (text), widget (QCheckBox, ckMp4AspectRatio) -#: po/rc.cpp:585 ui_prefMPEG4.h:373 rc.cpp:585 -msgid "&keep aspect ratio" +#: src/import/k9importfiles.cpp:158 +msgid "Create DVD" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:297 -#. i18n: ectx: property (text), widget (QRadioButton, rbSize) -#: po/rc.cpp:594 ui_prefMPEG4.h:378 rc.cpp:594 -msgid "File size" +#: src/import/k9importfiles.cpp:162 src/main/k9settings.cpp:35 +#: ui_astdestination.h:183 +msgid "DVD Backup" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:300 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbSize) -#: po/rc.cpp:597 ui_prefMPEG4.h:379 rc.cpp:597 -msgid "Alt+S" +#: src/import/k9menuedit.cpp:242 +msgid "Title %1 Menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:322 -#. i18n: ectx: property (suffix), widget (QSpinBox, sbMp4Size) -#: po/rc.cpp:600 ui_prefMPEG4.h:380 rc.cpp:600 -msgid " MB" +#: src/import/k9menuedit.cpp:251 src/import/k9menuedit.cpp:288 +msgid "Play Menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:420 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:615 ui_prefMPEG4.h:387 rc.cpp:615 -msgid "mp3" +#: src/import/k9menuedit.cpp:253 +msgid "Play Title" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:425 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:618 ui_prefMPEG4.h:388 rc.cpp:618 -msgid "faac" +#: src/import/k9menuedit.cpp:259 +msgid "Play Root Menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:430 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:621 ui_prefMPEG4.h:389 rc.cpp:621 -msgid "mp2" +#: src/import/k9menuedit.cpp:261 +msgid "Play Title Menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:435 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:624 ui_prefMPEG4.h:390 rc.cpp:624 -msgid "ac3" +#: src/import/k9menuedit.cpp:266 src/import/k9menuedit.cpp:292 +msgid "Play Title %1" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:440 -#. i18n: ectx: property (text), item, widget (QComboBox, cbMp4AudioCodec) -#: po/rc.cpp:627 ui_prefMPEG4.h:391 rc.cpp:627 -msgid "adpcm ima" +#: src/import/k9newdvd.cpp:96 +msgid "Creating root menu" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:512 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:633 ui_prefMPEG4.h:395 rc.cpp:633 -msgid "Gain" +#: src/import/k9newdvd.cpp:141 +msgid "The dvd authoring was canceled" msgstr "" -#. i18n: file: src/main/prefMPEG4.ui:542 -#. i18n: ectx: property (text), widget (QCheckBox, ckUseCache) -#: po/rc.cpp:636 ui_prefMPEG4.h:397 rc.cpp:636 -msgid "use cell cache" +#: src/import/k9newdvd.cpp:167 +msgid "Creating menu for title %1" msgstr "" -#. i18n: file: src/main/prefpreview.ui:36 -#. i18n: ectx: property (text), widget (QRadioButton, rbInternal) -#: po/rc.cpp:642 ui_prefpreview.h:293 rc.cpp:642 -msgid "&Internal Player" +#: src/import/k9newdvd.cpp:442 ui_mp4dlg.h:246 +msgid "fps" msgstr "" -#. i18n: file: src/main/prefpreview.ui:39 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbInternal) -#: po/rc.cpp:645 ui_prefpreview.h:294 rc.cpp:645 -msgid "Alt+I" +#: src/import/k9newdvd.cpp:479 src/import/k9newtitle.cpp:97 +msgid "title %1" msgstr "" -#. i18n: file: src/main/prefpreview.ui:46 -#. i18n: ectx: property (text), widget (QRadioButton, rbMplayer) -#: po/rc.cpp:648 ui_prefpreview.h:295 rc.cpp:648 -msgid "MPlayer" +#: src/import/k9newtitle.cpp:89 ui_newTitle.h:192 +msgid "Add title" msgstr "" -#. i18n: file: src/main/prefpreview.ui:49 -#. i18n: ectx: property (shortcut), widget (QRadioButton, rbMplayer) -#: po/rc.cpp:651 ui_prefpreview.h:296 rc.cpp:651 -msgid "Alt+M" +#: src/main/k9copy.cpp:56 src/main/k9main.cpp:385 src/main/k9main.cpp:604 +#: src/main/k9main.cpp:1184 src/main/k9main.cpp:1186 src/main/k9main.cpp:1249 +msgid "Ready" msgstr "" -#. i18n: file: src/main/prefpreview.ui:56 -#. i18n: ectx: property (text), widget (QRadioButton, rbXine) -#: po/rc.cpp:654 ui_prefpreview.h:297 rc.cpp:654 -msgid "Xine Player" +#: src/main/k9copy.cpp:115 +msgid "Shrink Factor" msgstr "" -#. i18n: file: src/main/prefpreview.ui:63 -#. i18n: ectx: property (text), widget (QRadioButton, rbPhonon) -#: po/rc.cpp:657 ui_prefpreview.h:298 rc.cpp:657 -msgid "Phonon" +#: src/main/k9copy.cpp:126 +msgid "MPEG4 Encoding Options" msgstr "" -#. i18n: file: src/main/prefpreview.ui:127 -#. i18n: ectx: property (text), widget (QLabel, textLabel1) -#: po/rc.cpp:660 ui_prefpreview.h:299 rc.cpp:660 -msgid "Internal viewer options" +#: src/main/k9copy.cpp:148 ui_playbackoptionsw.h:226 +msgid "DVD playback options" msgstr "" -#. i18n: file: src/main/prefpreview.ui:137 -#. i18n: ectx: property (text), widget (QCheckBox, ckUseGL) -#: po/rc.cpp:663 ui_prefpreview.h:300 rc.cpp:663 -msgid "use OpenGL" +#: src/main/k9copy.cpp:157 ui_langselectw.h:61 +msgid "Selection" msgstr "" -#. i18n: file: src/main/prefpreview.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefpreview.ui:320 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#. i18n: file: src/main/prefpreview.ui:172 -#. i18n: ectx: property (text), widget (QLabel, textLabel3) -#. i18n: file: src/main/prefpreview.ui:320 -#. i18n: ectx: property (text), widget (QLabel, textLabel3_2) -#: po/rc.cpp:666 po/rc.cpp:699 ui_prefpreview.h:301 ui_prefpreview.h:318 -#: rc.cpp:666 rc.cpp:699 -msgid "Video output" +#: src/main/k9copy.cpp:175 src/main/k9settings.cpp:50 +#: src/mplayer/k9mplayer.cpp:157 src/mplayer/k9xine.cpp:143 ui_mplayer.h:239 +msgid "Preview" msgstr "" -#. i18n: file: src/main/prefpreview.ui:188 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#. i18n: file: src/main/prefpreview.ui:376 -#. i18n: ectx: property (text), widget (QLabel, textLabel4_2) -#. i18n: file: src/main/prefpreview.ui:188 -#. i18n: ectx: property (text), widget (QLabel, textLabel4) -#. i18n: file: src/main/prefpreview.ui:376 -#. i18n: ectx: property (text), widget (QLabel, textLabel4_2) -#: po/rc.cpp:669 po/rc.cpp:714 ui_prefpreview.h:302 ui_prefpreview.h:326 -#: rc.cpp:669 rc.cpp:714 -msgid "Audio output" +#: src/main/k9copy.cpp:247 +msgid "Copy" msgstr "" -#. i18n: file: src/main/prefpreview.ui:199 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:331 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:199 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:331 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:672 po/rc.cpp:702 ui_prefpreview.h:305 ui_prefpreview.h:321 -#: rc.cpp:672 rc.cpp:702 -msgid "X11" +#: src/main/k9copy.cpp:252 +msgid "Extract to MPEG files" msgstr "" -#. i18n: file: src/main/prefpreview.ui:204 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:336 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:204 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:336 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:675 po/rc.cpp:705 ui_prefpreview.h:306 ui_prefpreview.h:322 -#: rc.cpp:675 rc.cpp:705 -msgid "Xv" +#: src/main/k9copy.cpp:257 +msgid "Create MPEG-4" msgstr "" -#. i18n: file: src/main/prefpreview.ui:209 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:341 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:209 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:341 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:678 po/rc.cpp:708 ui_prefpreview.h:307 ui_prefpreview.h:323 -#: rc.cpp:678 rc.cpp:708 -msgid "OpenGL" +#: src/main/k9copy.cpp:266 +msgid "Eject" msgstr "" -#. i18n: file: src/main/prefpreview.ui:214 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:239 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:346 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#. i18n: file: src/main/prefpreview.ui:214 -#. i18n: ectx: property (text), item, widget (QComboBox, cbVout) -#. i18n: file: src/main/prefpreview.ui:239 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:346 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXVout) -#: po/rc.cpp:681 po/rc.cpp:690 po/rc.cpp:711 ui_prefpreview.h:308 -#: ui_prefpreview.h:314 ui_prefpreview.h:324 rc.cpp:681 rc.cpp:690 rc.cpp:711 -msgid "SDL" +#: src/main/k9copy.cpp:272 +msgid "Wizard" msgstr "" -#. i18n: file: src/main/prefpreview.ui:229 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:393 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#. i18n: file: src/main/prefpreview.ui:229 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:393 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#: po/rc.cpp:684 po/rc.cpp:717 ui_prefpreview.h:312 ui_prefpreview.h:329 -#: rc.cpp:684 rc.cpp:717 -msgid "ALSA" +#: src/main/k9copy.cpp:279 +msgid "DVD Author" msgstr "" -#. i18n: file: src/main/prefpreview.ui:234 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:398 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#. i18n: file: src/main/prefpreview.ui:234 -#. i18n: ectx: property (text), item, widget (QComboBox, cbAout) -#. i18n: file: src/main/prefpreview.ui:398 -#. i18n: ectx: property (text), item, widget (QComboBox, cbXAout) -#: po/rc.cpp:687 po/rc.cpp:720 ui_prefpreview.h:313 ui_prefpreview.h:330 -#: rc.cpp:687 rc.cpp:720 -msgid "OSS" +#: src/main/k9ffmpegcmdgen.cpp:129 +msgid "ffmpeg command generator" msgstr "" -#. i18n: file: src/main/prefpreview.ui:285 -#. i18n: ectx: property (text), widget (QLabel, textLabel2) -#: po/rc.cpp:693 ui_prefpreview.h:316 rc.cpp:693 -msgid "MPlayer options" +#: src/main/k9langselect.cpp:89 ui_mplayer.h:240 ui_phonon.h:122 +#: ui_playbackoptionsw.h:234 ui_prefAuthor.h:192 ui_prefMPEG4.h:414 +msgid "Audio" msgstr "" -#. i18n: file: src/main/prefpreview.ui:313 -#. i18n: ectx: property (text), widget (QLabel, label) -#: po/rc.cpp:696 ui_prefpreview.h:317 rc.cpp:696 -msgid "Xine player options" +#: src/main/k9langselect.cpp:100 ui_phonon.h:123 +msgid "Subtitles" msgstr "" -#. i18n: file: src/main/titlefactor.ui:13 -#. i18n: ectx: property (windowTitle), widget (QWidget, titleFactor) -#: po/rc.cpp:723 ui_titlefactor.h:119 rc.cpp:723 -msgid "Shrink Factors" +#: src/main/k9main.cpp:558 +msgid "Open DVD" msgstr "" -#. i18n: file: src/main/titlefactor.ui:28 -#. i18n: ectx: property (text), widget (QLabel, lbTitle) -#: po/rc.cpp:727 ui_titlefactor.h:120 rc.cpp:727 -#, no-c-format -msgid "Shrink Factor for Title %1" +#: src/main/k9main.cpp:578 +msgid "Titleset %1" msgstr "" -#. i18n: file: src/main/titlefactor.ui:44 -#. i18n: ectx: property (title), widget (Q3GroupBox, gbTitle) -#: po/rc.cpp:730 ui_titlefactor.h:121 rc.cpp:730 -msgid "Change Factor" +#: src/main/k9main.cpp:643 +msgid "chapters" msgstr "" -#. i18n: file: src/main/titlefactor.ui:78 -#. i18n: ectx: property (text), widget (QLabel, tFactor) -#: po/rc.cpp:733 ui_titlefactor.h:122 rc.cpp:733 -msgid "0.00" +#: src/main/k9main.cpp:712 +msgid "video %1 " msgstr "" -#. i18n: file: src/main/titlefactor.ui:88 -#. i18n: ectx: property (text), widget (QLabel, lTargetSize) -#: po/rc.cpp:737 src/main/k9titlefactor.cpp:64 src/main/k9titlefactor.cpp:101 -#: src/main/k9titlefactor.cpp:135 ui_titlefactor.h:123 rc.cpp:737 -#, no-c-format -msgid "size : %1 MB" +#: src/main/k9main.cpp:724 +msgid "audio %1 " msgstr "" -#. i18n: file: src/main/viewmpeg2.ui:31 -#. i18n: ectx: property (windowTitle), widget (QWidget, ViewMPEG2) -#: po/rc.cpp:740 ui_viewmpeg2.h:136 rc.cpp:740 -msgid "k9Copy - Title Preview" +#: src/main/k9main.cpp:746 +msgid "subpicture %1 " msgstr "" -#. i18n: file: src/mplayer/mplayer.ui:16 -#. i18n: ectx: property (windowTitle), widget (QWidget, MPlayer) -#: po/rc.cpp:743 src/main/k9copy.cpp:176 src/main/k9settings.cpp:50 -#: src/mplayer/k9mplayer.cpp:105 src/mplayer/k9xine.cpp:143 ui_mplayer.h:239 -#: rc.cpp:743 -msgid "Preview" +#: src/main/k9main.cpp:1397 +msgid "Open ISO Image" msgstr "" -#. i18n: file: src/mplayer/mplayer.ui:54 -#. i18n: ectx: property (text), widget (QLabel, textLabel1_2) -#: po/rc.cpp:749 ui_mplayer.h:242 rc.cpp:749 -msgid "Subpicture" +#: src/main/k9mencodercmdgen.cpp:63 ui_mencoderCmdGen.h:108 +msgid "MEncoder options" msgstr "" -#. i18n: file: src/mplayer/mplayer.ui:271 -#. i18n: ectx: property (text), widget (QToolButton, bDown) -#: po/rc.cpp:752 ui_mplayer.h:247 rc.cpp:752 -msgid "-" +#: src/main/k9mencodercmdgen.cpp:78 +msgid "Audio Codec" msgstr "" -#. i18n: file: src/mplayer/mplayer.ui:391 -#. i18n: ectx: property (text), widget (QToolButton, bUp) -#: po/rc.cpp:755 ui_mplayer.h:249 rc.cpp:755 -msgid "+" +#: src/main/k9mencodercmdgen.cpp:94 +msgid "Video Codec" msgstr "" -#: po/rc.cpp:765 rc.cpp:765 -msgctxt "NAME OF TRANSLATORS" -msgid "Your names" +#: src/main/k9mencodercmdgen.cpp:113 +msgid "Filters" msgstr "" -#: po/rc.cpp:766 rc.cpp:766 -msgctxt "EMAIL OF TRANSLATORS" -msgid "Your emails" +#: src/main/k9mp4title.cpp:40 src/main/k9mp4title.cpp:138 +#: src/main/k9titlefactor.cpp:111 +msgid "Select a Title in the treeview..." msgstr "" -#: src/assistant/k9assistant.cpp:43 -msgid "DVD backup assistant" +#: src/main/k9playbackoptions.cpp:149 +msgid "none" msgstr "" -#: src/assistant/k9assistant.cpp:47 -msgid "source" +#: src/main/k9prefmencoder.cpp:145 src/main/k9prefmencoder.cpp:149 +#: src/main/k9prefmencoder.cpp:160 src/main/k9prefmencoder.cpp:162 +msgid "new profile" msgstr "" -#: src/assistant/k9assistant.cpp:48 -msgid "Select the source of the backup" +#: src/main/k9settings.cpp:29 src/main/kconfigdlg.cpp:35 ui_configDlg.h:123 +msgid "Devices" msgstr "" -#: src/assistant/k9assistant.cpp:54 -msgid "destination" +#: src/main/k9settings.cpp:30 +msgid "Devices not detected by k9copy" msgstr "" -#: src/assistant/k9assistant.cpp:55 -msgid "Select the destination of the backup" +#: src/main/k9settings.cpp:34 +msgid "DVD" msgstr "" -#: src/assistant/k9assistant.cpp:61 -msgid "Select the titles you want to copy" +#: src/main/k9settings.cpp:39 +msgid "MEncoder" msgstr "" -#: src/assistant/k9assistant.cpp:68 -msgid "streams" +#: src/main/k9settings.cpp:40 +msgid "MPEG-4 Codecs" msgstr "" -#: src/assistant/k9assistant.cpp:69 -msgid "Select the streams you want to keep" +#: src/main/k9settings.cpp:44 +msgid "MPEG-4" msgstr "" -#: src/assistant/k9assistant.cpp:75 -msgid "mp4" +#: src/main/k9settings.cpp:51 +msgid "Title preview" msgstr "" -#: src/assistant/k9assistant.cpp:76 -msgid "Set mp4 options for each title" +#: src/main/k9titlefactor.cpp:64 src/main/k9titlefactor.cpp:101 +#: src/main/k9titlefactor.cpp:135 ui_titlefactor.h:123 +msgid "size : %1 MB" msgstr "" -#: src/assistant/k9assistant.cpp:82 -msgid "DVDOption" +#: src/main/k9titlefactor.cpp:122 +msgid "Shrink Factor for %1" msgstr "" -#: src/assistant/k9assistant.cpp:83 -msgid "Set DVD playback options" +#: src/main/kviewmpeg2.cpp:81 +msgid "Title Preview" msgstr "" -#: src/assistant/k9assistant.cpp:89 -msgid "mpeg" +#: src/player/k9play.cpp:341 +msgid "Error opening the DVD" msgstr "" -#: src/assistant/k9assistant.cpp:90 -msgid "Set mpeg options for each title" +#: src/player/k9play.cpp:348 +msgid "Error on dvdnav_set_readahead_flag: %1" msgstr "" -#: src/assistant/k9assistant.cpp:109 src/assistant/k9assistant.cpp:192 -#: src/import/k9importfiles.cpp:200 src/main/k9copy.cpp:362 -#: src/main/k9settings.cpp:23 -msgid "Settings" +#: src/player/k9play.cpp:357 +msgid "Error on setting languages: %1" msgstr "" -#: src/assistant/k9assistant.cpp:110 -msgid "k9copy settings" +#: src/player/k9play.cpp:365 +msgid "Error on dvdnav_set_PGC_positioning_flag: %1" msgstr "" -#: src/assistant/k9assistant.cpp:145 -msgid "The destination of the copy isn't valid" +#: src/player/k9play.cpp:400 +msgid "Error getting next block: %1" msgstr "" -#: src/assistant/k9assistant.cpp:153 -msgid "You must select at least on title !" +#: src/vamps/k9ffmpeg.cpp:41 +msgid "Cannot open the library %1" msgstr "" -#: src/assistant/k9assistant.cpp:187 -msgid "cannot continue" +#: src/xine/main.cpp:50 +msgid "wid" msgstr "" -#: src/assistant/k9aststreams.cpp:38 -msgid "audio : %1 %2 %3 ch" +#: src/xine/main.cpp:51 +msgid "vo" msgstr "" -#: src/assistant/k9aststreams.cpp:49 -msgid "subtitle : %1 %2" +#: src/xine/main.cpp:52 +msgid "ao" msgstr "" -#: src/assistant/k9asttitles.cpp:187 src/backup/k9mp4enc.cpp:199 -#: src/backup/k9mp4enc.cpp:201 src/backup/k9mp4enc.cpp:251 -#: src/backup/k9mp4enc.cpp:446 src/main/k9main.cpp:550 src/main/k9main.cpp:666 -#: src/main/k9main.cpp:683 src/main/k9mp4title.cpp:50 -#: src/main/k9prefdvd.cpp:37 src/main/k9prefmpeg4.cpp:35 -msgid "MB" +#: ui_astdestination.h:181 ui_astdvdoption.h:88 ui_astmp4.h:76 ui_astmpeg.h:76 +#: ui_astsource.h:113 ui_aststreams.h:53 ui_asttitles.h:71 +#: ui_ffmpegCmdGen.h:570 ui_phonon.h:119 +msgid "Form" msgstr "" -#: src/backup/k9dvdauthor.cpp:147 src/backup/k9dvdauthor.cpp:392 -msgid "'%1' not selected" +#: ui_astdestination.h:185 +msgid "to Disc" msgstr "" -#: src/backup/k9dvdauthor.cpp:148 src/backup/k9dvdauthor.cpp:393 -#: src/backup/k9dvdauthor.cpp:416 src/backup/k9dvdauthor.cpp:470 -#: src/backup/k9dvdauthor.cpp:479 src/backup/k9dvdauthor.cpp:482 -#: src/core/k9burndvd.cpp:243 src/core/k9burndvd.cpp:327 -#: src/import/k9newdvd.cpp:129 -msgid "authoring" +#: ui_astdestination.h:186 +msgid "to Folder" msgstr "" -#: src/backup/k9dvdauthor.cpp:416 src/backup/k9mp4enc.cpp:113 -#: src/core/k9burndvd.cpp:231 src/core/k9burndvd.cpp:315 -#: src/mplayer/k9mplayer.cpp:105 src/mplayer/k9xine.cpp:143 -msgid "Unable to run %1" +#: ui_astdestination.h:187 +msgid "to Iso image" msgstr "" -#: src/backup/k9dvdauthor.cpp:429 src/backup/k9dvdauthor.cpp:510 -#: src/backup/k9dvdauthor.cpp:548 src/import/k9newdvd.cpp:150 -#: src/main/k9settings.cpp:56 src/main/k9settings.cpp:57 -msgid "Authoring" +#: ui_astdestination.h:188 +msgid "Rip and encode DVD" msgstr "" -#: src/backup/k9dvdauthor.cpp:470 -msgid "Dvdauthor error :\n" +#: ui_astdestination.h:189 +msgid "Rip DVD without encoding" msgstr "" -#: src/backup/k9dvdauthor.cpp:479 -msgid "Authoring cancelled" +#: ui_astdestination.h:190 +msgid "Extract audio" msgstr "" -#: src/backup/k9dvdauthor.cpp:482 src/import/k9newdvd.cpp:143 -msgid "An error occured while running DVDAuthor:\n" +#: ui_astdvdoption.h:90 +msgid "Copy original menus" msgstr "" -#: src/backup/k9dvdauthor.cpp:549 -msgid "Fixing VOBUS" +#: ui_astdvdoption.h:91 +msgid "Don't copy menus." msgstr "" -#: src/backup/k9dvdbackup.cpp:149 src/backup/k9dvdbackup.cpp:163 -#: src/backup/k9dvdbackup.cpp:526 src/backup/k9dvdbackup.cpp:612 -msgid "DVD backup cancelled" +#: ui_astdvdoption.h:92 +msgid "Drag items to set title playing sequence" msgstr "" -#: src/backup/k9dvdbackup.cpp:176 -msgid "unable to open VIDEO_TS.IFO" +#: ui_astmp4.h:77 +msgid "Encoding options for title " msgstr "" -#: src/backup/k9dvdbackup.cpp:198 src/backup/k9dvdbackup.cpp:380 -#: src/backup/k9dvdbackup.cpp:450 -msgid "Unable to open file " +#: ui_astmpeg.h:77 +msgid "Select options for title" msgstr "" -#: src/backup/k9dvdbackup.cpp:276 -msgid "Unable to open titleset %1" +#: ui_astsource.h:115 +msgid "DVD Drive" msgstr "" -#: src/backup/k9dvdbackup.cpp:282 src/backup/k9dvdbackup.cpp:584 -msgid "Extracting titleset %1" +#: ui_aststreams.h:54 +msgid "Selected titles" msgstr "" -#: src/backup/k9dvdbackup.cpp:457 -msgid "Unable to open menu for titleset %1" +#: ui_asttitles.h:73 +msgid "size" msgstr "" -#: src/backup/k9dvdbackup.cpp:483 -msgid "Extracting menu for titleset %1" +#: ui_backupdlg.h:242 +msgid "

DVD Backup

" msgstr "" -#: src/backup/k9dvdbackup.cpp:576 -msgid "Unable to open ifo file for titleset %1" +#: ui_backupdlg.h:243 +msgid "Current step" msgstr "" -#: src/backup/k9dvdbackup.cpp:588 src/backup/k9dvdbackup.cpp:1703 -msgid "Unable to open DVD" +#: ui_backupdlg.h:244 ui_mp4dlg.h:247 ui_progress.h:173 +msgid "Elapsed Time" msgstr "" -#: src/backup/k9dvdbackup.cpp:598 -msgid "Unable to open vobs for titleset %1" +#: ui_backupdlg.h:245 ui_chapterEdit.h:220 ui_import.h:139 ui_newTitle.h:194 +msgid "--:--:--" msgstr "" -#: src/backup/k9dvdbackup.cpp:1393 -msgid "Updating vob %1" +#: ui_chapterEdit.h:222 +msgid "" +"*.avi\n" +"*.mpeg\n" +"*.mpg\n" +"*.*" msgstr "" -#: src/backup/k9dvdbackup.cpp:1410 -msgid "DVD backup canceled" +#: ui_chapterEdit.h:226 +msgid "start" msgstr "" -#: src/backup/k9execcopy.cpp:30 src/backup/k9execcopy.cpp:106 -#: src/backup/k9execcopy.cpp:172 src/main/k9main.cpp:358 -#: src/main/k9main.cpp:1086 src/main/k9main.cpp:1155 -msgid "DVD is not opened" +#: ui_chapterEdit.h:227 ui_chapterEdit.h:231 ui_newTitle.h:198 +msgid "HH:mm:ss" msgstr "" -#: src/backup/k9execcopy.cpp:30 src/backup/k9execcopy.cpp:54 -#: src/backup/k9execcopy.cpp:96 src/main/k9main.cpp:358 -#: src/main/k9main.cpp:383 -msgid "DVD Copy" +#: ui_chapterEdit.h:228 ui_chapterEdit.h:232 +msgid "set Current Frame" msgstr "" -#: src/backup/k9execcopy.cpp:54 src/main/k9main.cpp:383 -msgid "" -"Insufficient disk space on %1\n" -"%2 mb expected." +#: ui_chapterEdit.h:229 ui_chapterEdit.h:233 +msgid "break continuity" msgstr "" -#: src/backup/k9execcopy.cpp:96 src/backup/k9execcopy.cpp:219 -#: src/main/k9main.cpp:1202 -msgid "Selected titles have been successfully extracted" +#: ui_chapterEdit.h:230 +msgid "end" msgstr "" -#: src/backup/k9execcopy.cpp:124 src/backup/k9execcopy.cpp:190 -#: src/backup/k9mp4enc.cpp:189 src/main/k9main.cpp:1105 -#: src/main/k9main.cpp:1174 -msgid "Save file to disk" +#: ui_chapterEdit.h:234 +msgid "set Title button" msgstr "" -#: src/backup/k9execcopy.cpp:163 src/main/k9main.cpp:1144 -msgid "Selected titles have been successfully encoded" +#: ui_configDlg.h:124 +msgid "device" msgstr "" -#: src/backup/k9mp4dlg.cpp:27 -msgid "transcoding" +#: ui_configDlg.h:125 ui_prefMencoder.h:485 ui_prefMencoder.h:501 +msgid "label" msgstr "" -#: src/backup/k9mp4enc.cpp:113 src/backup/k9mp4enc.cpp:387 -msgid "Encoding error" +#: ui_configDlg.h:126 +msgid "Input" msgstr "" -#: src/backup/k9mp4enc.cpp:302 src/backup/k9mp4enc.cpp:304 -#: src/import/k9newdvd.cpp:274 -msgid "Encoding %1" +#: ui_configDlg.h:127 ui_import.h:131 ui_prefDVD.h:211 +msgid "Output" msgstr "" -#: src/backup/k9mp4enc.cpp:302 -msgid "pass %1" +#: ui_configDlg.h:128 ui_newTitle.h:200 +msgid "Add" msgstr "" -#: src/backup/k9mp4enc.cpp:387 -msgid "Error while running mencoder :" +#: ui_configDlg.h:130 +msgid "Remove" msgstr "" -#: src/core/k9burndvd.cpp:187 src/core/k9burndvd.cpp:188 -#: src/core/k9burndvd.cpp:261 src/core/k9burndvd.cpp:262 -#: src/core/k9burndvd.cpp:355 src/main/k9main.cpp:417 -msgid "Burning DVD" +#: ui_ffmpegCmdGen.h:573 +msgid "Set the video bitrate in bit/s (default = 200 kb/s)" msgstr "" -#: src/core/k9burndvd.cpp:199 src/core/k9burndvd.cpp:290 -#: src/import/k9import.cpp:313 src/main/k9main.cpp:368 -msgid "Save image to disk" +#: ui_ffmpegCmdGen.h:576 +msgid "b" msgstr "" -#: src/core/k9burndvd.cpp:222 src/core/k9burndvd.cpp:308 -msgid "Insert a recordable DVD" +#: ui_ffmpegCmdGen.h:577 +msgid "$VIDBRk" msgstr "" -#: src/core/k9burndvd.cpp:222 src/core/k9burndvd.cpp:231 -#: src/core/k9burndvd.cpp:236 src/core/k9burndvd.cpp:309 -#: src/core/k9burndvd.cpp:315 src/core/k9burndvd.cpp:320 -msgid "DVD burning" +#: ui_ffmpegCmdGen.h:578 ui_ffmpegCmdGen.h:767 +msgid "k" msgstr "" -#: src/core/k9burndvd.cpp:231 src/core/k9burndvd.cpp:315 -msgid "Error burning DVD :\n" +#: ui_ffmpegCmdGen.h:581 +msgid "Set the number of video frames to record" msgstr "" -#: src/core/k9burndvd.cpp:236 src/core/k9burndvd.cpp:320 -msgid "DVD Burning finished" +#: ui_ffmpegCmdGen.h:584 +msgid "vframes" msgstr "" -#: src/core/k9burndvd.cpp:242 src/core/k9burndvd.cpp:326 -msgid "An error occured while Burning DVD: %1" +#: ui_ffmpegCmdGen.h:587 +msgid "Set frame rate (Hz value, fraction or abbreviation), (default = 25)" msgstr "" -#: src/core/k9burndvd.cpp:242 src/core/k9burndvd.cpp:326 -msgid "Insert an other DVD" +#: ui_ffmpegCmdGen.h:590 +msgid "r" msgstr "" -#: src/core/k9burndvd.cpp:356 -msgid "Current write speed :%1 x" +#: ui_ffmpegCmdGen.h:593 +msgid "" +"Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg " +"default = same as source)" msgstr "" -#: src/core/k9dialogs.cpp:124 -msgid "select a directory" +#: ui_ffmpegCmdGen.h:596 +msgid "s" msgstr "" -#: src/core/k9dvd.cpp:133 -msgid "for visually impaired" +#: ui_ffmpegCmdGen.h:599 +msgid "$WIDTHx$HEIGHT" msgstr "" -#: src/core/k9dvd.cpp:134 -msgid "director's comments" +#: ui_ffmpegCmdGen.h:600 +msgid "sqcif" msgstr "" -#: src/core/k9dvd.cpp:135 -msgid "alternate director's comments" +#: ui_ffmpegCmdGen.h:601 +msgid "qcif" msgstr "" -#: src/core/k9dvd.cpp:139 -msgid "Large" +#: ui_ffmpegCmdGen.h:602 +msgid "cif" msgstr "" -#: src/core/k9dvd.cpp:140 -msgid "Children" +#: ui_ffmpegCmdGen.h:603 +msgid "4cif" msgstr "" -#: src/core/k9dvd.cpp:141 src/core/k9dvd.cpp:147 src/core/k9dvd.cpp:148 -#: src/core/k9dvd.cpp:149 -msgid "reserved" +#: ui_ffmpegCmdGen.h:604 +msgid "qqvga" msgstr "" -#: src/core/k9dvd.cpp:142 -msgid "Normal captions" +#: ui_ffmpegCmdGen.h:605 +msgid "qvga" msgstr "" -#: src/core/k9dvd.cpp:143 -msgid "Large captions" +#: ui_ffmpegCmdGen.h:606 +msgid "vga" msgstr "" -#: src/core/k9dvd.cpp:144 -msgid "Children captions" +#: ui_ffmpegCmdGen.h:607 +msgid "svga" msgstr "" -#: src/core/k9dvd.cpp:146 -msgid "Forced" +#: ui_ffmpegCmdGen.h:608 +msgid "xga" msgstr "" -#: src/core/k9dvd.cpp:150 -msgid "Director's comments" +#: ui_ffmpegCmdGen.h:609 +msgid "uxga" msgstr "" -#: src/core/k9dvd.cpp:151 -msgid "Large director's comments" +#: ui_ffmpegCmdGen.h:610 +msgid "qxga" msgstr "" -#: src/core/k9dvd.cpp:152 -msgid "Director's comments for children" +#: ui_ffmpegCmdGen.h:611 +msgid "sxga" msgstr "" -#: src/core/k9dvd.cpp:202 -msgid "Couldn't open %1 for title\n" +#: ui_ffmpegCmdGen.h:612 +msgid "qsxga" msgstr "" -#: src/core/k9dvd.cpp:204 src/core/k9dvd.cpp:212 src/core/k9dvd.cpp:220 -#: src/core/k9dvd.cpp:382 src/main/k9main.cpp:527 -msgid "unknown" +#: ui_ffmpegCmdGen.h:613 +msgid "hsxga" msgstr "" -#: src/core/k9dvd.cpp:210 -msgid "Couldn't seek in %1 for title\n" +#: ui_ffmpegCmdGen.h:614 +msgid "wvga" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Not Specified" +#: ui_ffmpegCmdGen.h:615 +msgid "wsxga" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Afar" +#: ui_ffmpegCmdGen.h:616 +msgid "wuxga" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Abkhazian" +#: ui_ffmpegCmdGen.h:617 +msgid "woxga" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Afrikaans" +#: ui_ffmpegCmdGen.h:618 +msgid "wqsxga" msgstr "" -#: src/core/k9dvd.cpp:237 -msgid "Amharic" +#: ui_ffmpegCmdGen.h:619 +msgid "wquxga" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Arabic" +#: ui_ffmpegCmdGen.h:620 +msgid "whuxga" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Assamese" +#: ui_ffmpegCmdGen.h:621 +msgid "cga" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Aymara" +#: ui_ffmpegCmdGen.h:622 +msgid "ega" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Azerbaijani" +#: ui_ffmpegCmdGen.h:623 +msgid "hd480" msgstr "" -#: src/core/k9dvd.cpp:238 -msgid "Bashkir" +#: ui_ffmpegCmdGen.h:624 +msgid "hd720" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Byelorussian" +#: ui_ffmpegCmdGen.h:625 +msgid "hd1080" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Bulgarian" +#: ui_ffmpegCmdGen.h:629 +msgid "Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)" msgstr "" - -#: src/core/k9dvd.cpp:239 -msgid "Bihari" + +#: ui_ffmpegCmdGen.h:632 +msgid "aspect" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Bislama" +#: ui_ffmpegCmdGen.h:635 +msgid "4:3" msgstr "" -#: src/core/k9dvd.cpp:239 -msgid "Bengali; Bangla" +#: ui_ffmpegCmdGen.h:636 +msgid "16:9" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Tibetan" +#: ui_ffmpegCmdGen.h:640 +msgid "Set top crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Breton" +#: ui_ffmpegCmdGen.h:643 +msgid "croptop" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Catalan" +#: ui_ffmpegCmdGen.h:646 +msgid "Set bottom crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Corsican" +#: ui_ffmpegCmdGen.h:649 +msgid "cropbottom" msgstr "" -#: src/core/k9dvd.cpp:240 -msgid "Czech" +#: ui_ffmpegCmdGen.h:652 +msgid "Set left crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Welsh" +#: ui_ffmpegCmdGen.h:655 +msgid "cropleft" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Dansk" +#: ui_ffmpegCmdGen.h:658 +msgid "Set right crop band size (in pixels)." msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Deutsch" +#: ui_ffmpegCmdGen.h:661 +msgid "cropright" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Bhutani" +#: ui_ffmpegCmdGen.h:664 ui_ffmpegCmdGen.h:693 +msgid "Set right crop band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "Greek" +#: ui_ffmpegCmdGen.h:669 +msgid "Set top pad band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:241 -msgid "English" +#: ui_ffmpegCmdGen.h:672 +msgid "padtop" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Esperanto" +#: ui_ffmpegCmdGen.h:675 +msgid "Set bottom pad band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Espanol" +#: ui_ffmpegCmdGen.h:678 +msgid "padbottom" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Estonian" +#: ui_ffmpegCmdGen.h:681 +msgid "Set left pad band size (in pixels)" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Basque" +#: ui_ffmpegCmdGen.h:684 +msgid "padleft" msgstr "" -#: src/core/k9dvd.cpp:242 -msgid "Persian" +#: ui_ffmpegCmdGen.h:687 +msgid "Set right pad band size (in pixels)." msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Suomi" +#: ui_ffmpegCmdGen.h:690 +msgid "padright" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Fiji" +#: ui_ffmpegCmdGen.h:698 +msgid "" +"Set color of padded bands. The value for padcolor is expressed as a six " +"digit hexadecimal number where the first two digits represent red, the " +"middle two digits green and last two digits blue (default = 000000 (black))" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Faroese" +#: ui_ffmpegCmdGen.h:701 +msgid "padcolor" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Francais" +#: ui_ffmpegCmdGen.h:702 +msgid "HHHHHH; " msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Frisian" +#: ui_ffmpegCmdGen.h:705 +msgid "Set video bitrate tolerance (in bit/s)" msgstr "" -#: src/core/k9dvd.cpp:243 -msgid "Gaelic" +#: ui_ffmpegCmdGen.h:708 +msgid "bt" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Scots Gaelic" +#: ui_ffmpegCmdGen.h:711 +msgid "Set max video bitrate (in bit/s)" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Galician" +#: ui_ffmpegCmdGen.h:714 +msgid "maxrate" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Guarani" +#: ui_ffmpegCmdGen.h:717 +msgid "Set min video bitrate (in bit/s)" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Gujarati" +#: ui_ffmpegCmdGen.h:720 +msgid "minrate" msgstr "" -#: src/core/k9dvd.cpp:244 -msgid "Hausa" +#: ui_ffmpegCmdGen.h:723 +msgid "Set video buffer verifier buffer size (in bits)" msgstr "" -#: src/core/k9dvd.cpp:245 src/core/k9dvd.cpp:247 -msgid "Hebrew" +#: ui_ffmpegCmdGen.h:726 +msgid "bufsize" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Hindi" +#: ui_ffmpegCmdGen.h:729 +msgid "" +"Force video codec to codec. Use the copy special value to tell that the raw " +"codec data must be copied as is" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Hrvatski" +#: ui_ffmpegCmdGen.h:732 +msgid "vcodec" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Magyar" +#: ui_ffmpegCmdGen.h:735 +msgid "copy" msgstr "" -#: src/core/k9dvd.cpp:245 -msgid "Armenian" +#: ui_ffmpegCmdGen.h:739 +msgid "Use same video quality as source (implies VBR)" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Interlingua" +#: ui_ffmpegCmdGen.h:742 +msgid "sameq" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Indonesian" +#: ui_ffmpegCmdGen.h:743 +msgid "pass" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Interlingue" +#: ui_ffmpegCmdGen.h:744 +msgid "$PASS" msgstr "" -#: src/core/k9dvd.cpp:246 -msgid "Inupiak" +#: ui_ffmpegCmdGen.h:745 +msgid "passlogfile" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Islenska" +#: ui_ffmpegCmdGen.h:746 +msgid "$PASSLOGFILE" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Italiano" +#: ui_ffmpegCmdGen.h:747 +msgid "FFMpeg Video options " msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Inuktitut" +#: ui_ffmpegCmdGen.h:750 +msgid "Set the number of audio frames to record" msgstr "" -#: src/core/k9dvd.cpp:247 -msgid "Japanese" +#: ui_ffmpegCmdGen.h:753 +msgid "aframes" msgstr "" -#: src/core/k9dvd.cpp:248 src/core/k9dvd.cpp:263 -msgid "Yiddish" +#: ui_ffmpegCmdGen.h:756 +msgid "Set the audio sampling frequency (default = 44100 Hz)" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Javanese" +#: ui_ffmpegCmdGen.h:759 +msgid "ar" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Georgian" +#: ui_ffmpegCmdGen.h:762 +msgid "Set the audio bitrate in bit/s (default = 64k)" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Kazakh" +#: ui_ffmpegCmdGen.h:765 +msgid "ab" msgstr "" -#: src/core/k9dvd.cpp:248 -msgid "Greenlandic" +#: ui_ffmpegCmdGen.h:766 +msgid "$AUDBRk" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Cambodian" +#: ui_ffmpegCmdGen.h:770 +msgid "Set the number of audio channels (default = 1)" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kannada" +#: ui_ffmpegCmdGen.h:773 +msgid "ac" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Korean" +#: ui_ffmpegCmdGen.h:776 +msgid "" +"Force audio codec to codec. Use the copy special value to specify that the " +"raw codec data must be copied as is" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kashmiri" +#: ui_ffmpegCmdGen.h:779 +msgid "acodec" msgstr "" -#: src/core/k9dvd.cpp:249 -msgid "Kurdish" +#: ui_ffmpegCmdGen.h:782 +msgid "COPY" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Kirghiz" +#: ui_ffmpegCmdGen.h:786 +msgid "Force audio tag/fourcc" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Latin" +#: ui_ffmpegCmdGen.h:789 +msgid "atag" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Lingala" +#: ui_ffmpegCmdGen.h:790 +msgid "nnnnn; " msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Laothian" +#: ui_ffmpegCmdGen.h:793 +msgid "Bitstream filters" msgstr "" -#: src/core/k9dvd.cpp:250 -msgid "Lithuanian" +#: ui_ffmpegCmdGen.h:796 +msgid "absf" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Latvian, Lettish" +#: ui_ffmpegCmdGen.h:799 +msgid "dump_extra" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Malagasy" +#: ui_ffmpegCmdGen.h:800 +msgid "remove_extra" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Maori" +#: ui_ffmpegCmdGen.h:801 +msgid "noise" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Macedonian" +#: ui_ffmpegCmdGen.h:802 +msgid "mp3comp" msgstr "" -#: src/core/k9dvd.cpp:251 -msgid "Malayalam" +#: ui_ffmpegCmdGen.h:803 +msgid "mp3decomp" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Mongolian" +#: ui_ffmpegCmdGen.h:805 +msgid "FFMpeg Audio options" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Moldavian" +#: ui_import.h:132 +msgid "Video files" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Marathi" +#: ui_import.h:133 ui_k9mainw.h:189 ui_k9mainw.h:195 ui_mp4dlg.h:250 +#: ui_phonon.h:120 ui_phonon.h:121 ui_processList.h:81 +msgid "..." msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Malay" +#: ui_import.h:136 +msgid "PAL" msgstr "" -#: src/core/k9dvd.cpp:252 -msgid "Maltese" +#: ui_import.h:137 +msgid "NTSC" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Burmese" +#: ui_k9mainw.h:182 +msgid "MainDlg" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nauru" +#: ui_k9mainw.h:186 +msgid "Open a folder" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nepali" +#: ui_k9mainw.h:192 +msgid "Open an iso image" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Nederlands" +#: ui_k9mainw.h:196 +msgid "Output device " msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Norsk" +#: ui_k9mainw.h:197 +msgid "@" msgstr "" -#: src/core/k9dvd.cpp:253 -msgid "Occitan" +#: ui_k9mainw.h:202 ui_prefMPEG4.h:394 +msgid "X" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Oromo" +#: ui_k9mainw.h:203 +msgid "Title" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Oriya" +#: ui_k9mainw.h:204 ui_mp4dlg.h:249 +msgid "Size" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Punjabi" +#: ui_k9mainw.h:205 +msgid "Content" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Polish" +#: ui_langselectw.h:62 +msgid "Languages" msgstr "" -#: src/core/k9dvd.cpp:254 -msgid "Pashto, Pushto" +#: ui_mencoderCmdGen.h:109 +msgid "1" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Portugues" +#: ui_menuEdit.h:206 +msgid "Edit Menu" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Quechua" +#: ui_menuEdit.h:207 +msgid "Text" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Rhaeto-Romance" +#: ui_menuEdit.h:208 +msgid "Background picture" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Kirundi" +#: ui_menuEdit.h:210 ui_prefAuthor.h:209 +msgid "Font" msgstr "" -#: src/core/k9dvd.cpp:255 -msgid "Romanian" +#: ui_menuEdit.h:213 +msgid "Bottom" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Russian" +#: ui_menuEdit.h:214 +msgid "Right" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Kinyarwanda" +#: ui_menuEdit.h:219 +msgid "At start" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sanskrit" +#: ui_menuEdit.h:222 +msgid "Play menu" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sindhi" +#: ui_menuEdit.h:223 ui_menuEdit.h:230 +msgid "Play title 1" msgstr "" -#: src/core/k9dvd.cpp:256 -msgid "Sangho" +#: ui_menuEdit.h:225 +msgid "At End" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Serbo-Croatian" +#: ui_menuEdit.h:228 +msgid "Play root menu" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Sinhalese" +#: ui_menuEdit.h:229 +msgid "Play title menu" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Slovak" +#: ui_mp4dlg.h:248 ui_prefAuthor.h:205 ui_prefMPEG4.h:399 ui_prefMPEG4.h:411 +msgid "Bitrate" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Slovenian" +#: ui_mplayer.h:242 +msgid "Subpicture" msgstr "" -#: src/core/k9dvd.cpp:257 -msgid "Samoan" +#: ui_mplayer.h:247 +msgid "-" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Shona" +#: ui_mplayer.h:249 +msgid "+" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Somali" +#: ui_newTitle.h:193 +msgid "Video file" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Albanian" +#: ui_newTitle.h:196 +msgid "number of chapters" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Serbian" +#: ui_newTitle.h:197 +msgid "chapter length" msgstr "" -#: src/core/k9dvd.cpp:258 -msgid "Siswati" +#: ui_newTitle.h:199 +msgid "Do not reencode" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Sesotho" +#: ui_playbackoptionsw.h:227 +msgid "&Keep original menus" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Sundanese" +#: ui_playbackoptionsw.h:228 ui_prefMPEG4.h:392 +msgid "Alt+K" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Svenska" +#: ui_playbackoptionsw.h:231 +msgid "Selected Titles" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Swahili" +#: ui_playbackoptionsw.h:232 +msgid "Default language" msgstr "" -#: src/core/k9dvd.cpp:259 -msgid "Tamil" +#: ui_playbackoptionsw.h:233 +msgid "Subtitle" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Telugu" +#: ui_prefAuthor.h:191 +msgid "Authoring options" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Tajik" +#: ui_prefAuthor.h:195 +msgid "AC3" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Thai" +#: ui_prefAuthor.h:196 +msgid "MP2" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Tigrinya" +#: ui_prefAuthor.h:200 +msgid "128" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Turkmen" +#: ui_prefAuthor.h:201 +msgid "192" msgstr "" -#: src/core/k9dvd.cpp:260 -msgid "Tagalog" +#: ui_prefAuthor.h:202 +msgid "320" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Setswana" +#: ui_prefAuthor.h:204 +msgid "Format" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Tonga" +#: ui_prefAuthor.h:206 +msgid "Buttons" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Turkish" +#: ui_prefAuthor.h:207 ui_prefMPEG4.h:387 +msgid "Width" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Tsonga" +#: ui_prefAuthor.h:208 ui_prefMPEG4.h:388 +msgid "Height" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Tatar" +#: ui_prefAuthor.h:210 +msgid "Hilite color" msgstr "" -#: src/core/k9dvd.cpp:261 -msgid "Twi" +#: ui_prefAuthor.h:212 +msgid "Text color" msgstr "" -#: src/core/k9dvd.cpp:262 -msgid "Uighur" +#: ui_prefDVD.h:210 +msgid "prefDVD" msgstr "" -#: src/core/k9dvd.cpp:262 -msgid "Ukrainian" +#: ui_prefDVD.h:212 +msgid "Output directory" msgstr "" -#: src/core/k9dvd.cpp:262 -msgid "Urdu" +#: ui_prefDVD.h:213 +msgid "Clear output directory on exit" msgstr "" -#: src/core/k9dvd.cpp:262 -msgid "Uzbek" +#: ui_prefDVD.h:214 +msgid "Alt+Y" msgstr "" -#: src/core/k9dvd.cpp:262 -msgid "Vietnamese" +#: ui_prefDVD.h:215 +msgid "DVD size" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Volapuk" +#: ui_prefDVD.h:216 +msgid "one file/chapter (MPEG extraction)" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Wolof" +#: ui_prefDVD.h:217 ui_prefDVD.h:219 +msgid "Alt+D" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Xhosa" +#: ui_prefDVD.h:218 +msgid "use dvdAuthor for copy without menus" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Yoruba" +#: ui_prefDVD.h:220 +msgid "Enable prohibited user operations" msgstr "" -#: src/core/k9dvd.cpp:263 -msgid "Zhuang" +#: ui_prefDVD.h:221 +msgid "Burning" msgstr "" -#: src/core/k9dvd.cpp:264 -msgid "Chinese" +#: ui_prefDVD.h:222 +msgid "Burn with k3b" msgstr "" -#: src/core/k9dvd.cpp:264 -msgid "Zulu" +#: ui_prefDVD.h:223 ui_prefMPEG4.h:400 +msgid "Alt+B" msgstr "" -#: src/core/k9dvd.cpp:264 src/core/k9dvd.cpp:266 src/core/k9dvd.cpp:488 -msgid "Unknown" +#: ui_prefDVD.h:224 +msgid "Auto burn" msgstr "" -#: src/core/k9dvd.cpp:356 -msgid "Can't open disc %1!\n" +#: ui_prefDVD.h:225 +msgid "Alt+T" msgstr "" -#: src/core/k9dvd.cpp:368 -msgid "Can't open main ifo!\n" +#: ui_prefDVD.h:226 +msgid "Performances" msgstr "" -#: src/core/k9dvd.cpp:410 src/core/k9dvd.cpp:701 -msgid "Title %1" +#: ui_prefDVD.h:227 +msgid "Quick scan" msgstr "" -#: src/core/k9dvd.cpp:752 -msgid "reading title" +#: ui_prefDVD.h:228 +msgid "Alt+Q" msgstr "" -#: src/core/k9dvd.cpp:869 -msgid "Error opening vobs for title %1\n" +#: ui_prefDVD.h:229 +msgid "DVD read ahead" msgstr "" -#: src/core/k9dvd.cpp:880 -msgid "ERROR reading block %1\n" +#: ui_prefDVD.h:233 +msgid "skip bad sectors (slow)" msgstr "" -#: src/core/k9process.cpp:120 src/core/k9tools.cpp:34 -#: src/import/k9menu.cpp:165 -msgid "Error starting program %1" +#: ui_prefDVD.h:234 +msgid "skip bad sectors (faster)" msgstr "" -#: src/core/k9process.cpp:120 src/core/k9tools.cpp:34 src/core/k9tools.cpp:56 -#: src/import/k9menu.cpp:165 -msgid "Running program" +#: ui_prefDVD.h:236 +msgid "" +"this option can improve reading of DVD having bad sectors.\n" +"It will require root privileges when opening the DVD." msgstr "" -#: src/core/k9tools.cpp:47 -msgid "Enter the root password" +#: ui_prefMencoder.h:472 ui_prefMPEG4.h:375 ui_prefpreview.h:291 +msgid "Form1" msgstr "" -#: src/core/k9tools.cpp:56 -msgid "The root password is not valid" +#: ui_prefMencoder.h:473 +msgid "" +"$PASS\n" +"$WIDTH\n" +"$HEIGHT\n" +"$VIDBR\n" +"$AUDBR" msgstr "" -#: src/devices/k9cddrive.cpp:214 +#: ui_prefMencoder.h:478 msgid "" -"The root password is needed to change the read ahead property of the dvd " -"drive" +"pass number\n" +"video width\n" +"video height\n" +"video bitrate\n" +"audio bitrate" msgstr "" -#: src/import/k9avidecode.cpp:40 src/import/k9avidecode.cpp:44 -#: src/import/k9avidecode.cpp:49 -msgid "Cannot open then library %1" +#: ui_prefMencoder.h:483 +msgid "Available variables" msgstr "" -#: src/import/k9avidecode.cpp:113 -msgid "Couldn't open the file %1" +#: ui_prefMencoder.h:486 +msgid "fourcc" msgstr "" -#: src/import/k9avidecode.cpp:118 -msgid "Couldn't find stream information" +#: ui_prefMencoder.h:487 +msgid "one pass" msgstr "" -#: src/import/k9avidecode.cpp:131 -msgid "The file doesn't contain any video stream" +#: ui_prefMencoder.h:490 +msgid "first pass" msgstr "" -#: src/import/k9avidecode.cpp:142 -msgid "Unsupported codec" +#: ui_prefMencoder.h:492 +msgid "second pass" msgstr "" -#: src/import/k9avidecode.cpp:147 -msgid "Could'nt open the codec" +#: ui_prefMencoder.h:494 ui_prefMencoder.h:504 +msgid "encoder" msgstr "" -#: src/import/k9avidecode.cpp:158 -msgid "Unable to allocate memory for frames" +#: ui_prefMencoder.h:497 ui_prefMencoder.h:507 +msgid "mencoder" msgstr "" -#: src/import/k9import.cpp:179 src/import/k9import.cpp:194 -#: src/import/k9newtitle.cpp:151 src/import/k9newtitle.cpp:173 -#: src/main/k9main.cpp:616 src/main/k9main.cpp:631 -msgid "chapter %1" +#: ui_prefMencoder.h:498 ui_prefMencoder.h:508 +msgid "ffmpeg" msgstr "" -#: src/import/k9import.cpp:239 src/import/k9import.cpp:254 -msgid "remove" +#: ui_prefMencoder.h:500 +msgid "Video codecs" msgstr "" -#: src/import/k9import.cpp:242 -msgid "add chapter" +#: ui_prefMencoder.h:502 +msgid "options" msgstr "" -#: src/import/k9importfiles.cpp:88 -msgid "Add Title" +#: ui_prefMencoder.h:510 +msgid "extension" msgstr "" -#: src/import/k9importfiles.cpp:109 -msgid "Edit menu" +#: ui_prefMencoder.h:511 +msgid "Audio codecs" msgstr "" -#: src/import/k9importfiles.cpp:158 -msgid "Create DVD" +#: ui_prefMPEG4.h:377 +msgid "Encoder" msgstr "" -#: src/import/k9menuedit.cpp:243 -msgid "Title %1 Menu" +#: ui_prefMPEG4.h:378 +msgid "2 pass" msgstr "" -#: src/import/k9menuedit.cpp:252 src/import/k9menuedit.cpp:289 -msgid "Play Menu" +#: ui_prefMPEG4.h:379 +msgid "Alt+2" msgstr "" -#: src/import/k9menuedit.cpp:254 -msgid "Play Title" +#: ui_prefMPEG4.h:380 ui_prefMPEG4.h:402 +msgid "Codec" msgstr "" -#: src/import/k9menuedit.cpp:260 -msgid "Play Root Menu" +#: ui_prefMPEG4.h:383 +msgid "XviD" msgstr "" -#: src/import/k9menuedit.cpp:262 -msgid "Play Title Menu" +#: ui_prefMPEG4.h:384 +msgid "lavc MPEG4" msgstr "" -#: src/import/k9menuedit.cpp:267 src/import/k9menuedit.cpp:293 -msgid "Play Title %1" +#: ui_prefMPEG4.h:385 +msgid "x264" msgstr "" -#: src/import/k9newdvd.cpp:96 -msgid "Creating root menu" +#: ui_prefMPEG4.h:390 +msgid "720" msgstr "" -#: src/import/k9newdvd.cpp:141 -msgid "The dvd authoring was canceled" +#: ui_prefMPEG4.h:391 +msgid "&keep aspect ratio" msgstr "" -#: src/import/k9newdvd.cpp:167 -msgid "Creating menu for title %1" +#: ui_prefMPEG4.h:396 +msgid "File size" msgstr "" -#: src/import/k9newdvd.cpp:480 src/import/k9newtitle.cpp:97 -msgid "title %1" +#: ui_prefMPEG4.h:397 +msgid "Alt+S" msgstr "" -#: src/main/k9copy.cpp:56 src/main/k9main.cpp:437 src/main/k9main.cpp:570 -#: src/main/k9main.cpp:1147 src/main/k9main.cpp:1204 -msgid "Ready" +#: ui_prefMPEG4.h:398 +msgid " MB" msgstr "" -#: src/main/k9copy.cpp:116 -msgid "Shrink Factor" +#: ui_prefMPEG4.h:401 +msgid "Video" msgstr "" -#: src/main/k9copy.cpp:127 -msgid "MPEG4 Encoding Options" +#: ui_prefMPEG4.h:405 +msgid "mp3" msgstr "" -#: src/main/k9copy.cpp:242 -msgid "Play title" +#: ui_prefMPEG4.h:406 +msgid "faac" msgstr "" -#: src/main/k9copy.cpp:248 -msgid "Copy" +#: ui_prefMPEG4.h:407 +msgid "mp2" msgstr "" -#: src/main/k9copy.cpp:253 -msgid "Extract to MPEG files" +#: ui_prefMPEG4.h:408 +msgid "ac3" msgstr "" -#: src/main/k9copy.cpp:258 -msgid "Create MPEG-4" +#: ui_prefMPEG4.h:409 +msgid "adpcm ima" msgstr "" -#: src/main/k9copy.cpp:267 -msgid "Eject" +#: ui_prefMPEG4.h:413 +msgid "Gain" msgstr "" -#: src/main/k9copy.cpp:273 -msgid "Wizard" +#: ui_prefMPEG4.h:415 +msgid "use cell cache" msgstr "" -#: src/main/k9copy.cpp:280 -msgid "DVD Author" +#: ui_prefpreview.h:293 +msgid "&Internal Player" msgstr "" -#: src/main/k9langselect.cpp:100 -msgid "Subtitles" +#: ui_prefpreview.h:294 +msgid "Alt+I" msgstr "" -#: src/main/k9main.cpp:388 -msgid "Backup in progress" +#: ui_prefpreview.h:295 +msgid "MPlayer" msgstr "" -#: src/main/k9main.cpp:524 -msgid "Open DVD" +#: ui_prefpreview.h:296 +msgid "Alt+M" msgstr "" -#: src/main/k9main.cpp:544 -msgid "Titleset %1" +#: ui_prefpreview.h:297 +msgid "Xine Player" msgstr "" -#: src/main/k9main.cpp:609 -msgid "chapters" +#: ui_prefpreview.h:298 +msgid "Phonon" msgstr "" -#: src/main/k9main.cpp:620 src/main/k9main.cpp:637 src/main/k9main.cpp:701 -#: src/main/k9main.cpp:721 -msgid "%1 MB" +#: ui_prefpreview.h:299 +msgid "Internal viewer options" msgstr "" -#: src/main/k9main.cpp:678 -msgid "video %1 " +#: ui_prefpreview.h:300 +msgid "use OpenGL" msgstr "" -#: src/main/k9main.cpp:690 -msgid "audio %1 " +#: ui_prefpreview.h:301 ui_prefpreview.h:318 +msgid "Video output" msgstr "" -#: src/main/k9main.cpp:712 -msgid "subpicture %1 " +#: ui_prefpreview.h:302 ui_prefpreview.h:326 +msgid "Audio output" msgstr "" -#: src/main/k9main.cpp:1100 -msgid "Transcoding title : %1" +#: ui_prefpreview.h:305 ui_prefpreview.h:321 +msgid "X11" msgstr "" -#: src/main/k9main.cpp:1169 -msgid "Extracting title : %1" +#: ui_prefpreview.h:306 ui_prefpreview.h:322 +msgid "Xv" msgstr "" -#: src/main/k9main.cpp:1351 -msgid "Open ISO Image" +#: ui_prefpreview.h:307 ui_prefpreview.h:323 +msgid "OpenGL" msgstr "" -#: src/main/k9mencodercmdgen.cpp:78 -msgid "Audio Codec" +#: ui_prefpreview.h:308 ui_prefpreview.h:314 ui_prefpreview.h:324 +msgid "SDL" msgstr "" -#: src/main/k9mencodercmdgen.cpp:94 -msgid "Video Codec" +#: ui_prefpreview.h:312 ui_prefpreview.h:329 +msgid "ALSA" msgstr "" -#: src/main/k9mencodercmdgen.cpp:113 -msgid "Filters" +#: ui_prefpreview.h:313 ui_prefpreview.h:330 +msgid "OSS" msgstr "" -#: src/main/k9mp4title.cpp:37 src/main/k9mp4title.cpp:110 -#: src/main/k9titlefactor.cpp:111 -msgid "Select a Title in the treeview..." +#: ui_prefpreview.h:316 +msgid "MPlayer options" msgstr "" -#: src/main/k9playbackoptions.cpp:149 -msgid "none" +#: ui_prefpreview.h:317 +msgid "Xine player options" msgstr "" -#: src/main/k9prefmencoder.cpp:110 src/main/k9prefmencoder.cpp:114 -#: src/main/k9prefmencoder.cpp:125 src/main/k9prefmencoder.cpp:127 -msgid "new profile" +#: ui_processList.h:77 +msgid "Process List" msgstr "" -#: src/main/k9settings.cpp:30 -msgid "Devices not detected by k9copy" +#: ui_processList.h:78 +msgid "Progression" msgstr "" -#: src/main/k9settings.cpp:34 -msgid "DVD" +#: ui_processList.h:79 +msgid "Processes" msgstr "" -#: src/main/k9settings.cpp:39 -msgid "MEncoder" +#: ui_processList.h:80 +msgid "Elapsed" msgstr "" -#: src/main/k9settings.cpp:40 -msgid "MPEG-4 Codecs" +#: ui_processList.h:82 +msgid "&Cancel" msgstr "" -#: src/main/k9settings.cpp:44 -msgid "MPEG-4" +#: ui_processList.h:83 +msgid "Alt+C" msgstr "" -#: src/main/k9settings.cpp:51 -msgid "Title preview" +#: ui_progress.h:171 +msgid "k9Copy" msgstr "" -#: src/main/k9titlefactor.cpp:122 -msgid "Shrink Factor for %1" +#: ui_titlefactor.h:119 +msgid "Shrink Factors" msgstr "" -#: src/main/kviewmpeg2.cpp:79 -msgid "Title Preview" +#: ui_titlefactor.h:120 +msgid "Shrink Factor for Title %1" msgstr "" -#: src/xine/main.cpp:50 -msgid "wid" +#: ui_titlefactor.h:121 +msgid "Change Factor" msgstr "" -#: src/xine/main.cpp:51 -msgid "vo" +#: ui_titlefactor.h:122 +msgid "0.00" msgstr "" -#: src/xine/main.cpp:52 -msgid "ao" +#: ui_viewmpeg2.h:136 +msgid "k9Copy - Title Preview" msgstr "" diff -Nru k9copy-2.1.0/po/sr@latin.po k9copy-2.2.0/po/sr@latin.po --- k9copy-2.1.0/po/sr@latin.po 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/po/sr@latin.po 1970-01-01 01:00:00.000000000 +0100 @@ -1,2580 +0,0 @@ -# Serbian translation of k9copy -# Courtesy of Prevod.org team (http://prevod.org/) -- 2006, 2007. -# -# This file is distributed under the same license as the k9copy package. -# -# Miloš Popović -# -msgid "" -msgstr "" -"Project-Id-Version: k9copy\n" -"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?" -"group_id=50231&atid=459007\n" -"POT-Creation-Date: 2007-12-22 09:01+0100\n" -"PO-Revision-Date: 2007-08-15 11:15+0100\n" -"Last-Translator: Miloš Popović \n" -"Language-Team: Serbian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: lib/backup/k9dvdauthor.cpp:148 lib/backup/k9dvdauthor.cpp:395 -msgid "'%1' not selected" -msgstr "'%1' nije izabran" - -#: lib/backup/k9dvdauthor.cpp:149 lib/backup/k9dvdauthor.cpp:396 -#: lib/backup/k9dvdauthor.cpp:419 lib/backup/k9dvdauthor.cpp:473 -#: lib/backup/k9dvdauthor.cpp:482 lib/backup/k9dvdauthor.cpp:485 -#: lib/core/k9burndvd.cpp:242 lib/core/k9burndvd.cpp:326 -#: lib/import/k9newdvd.cpp:123 -msgid "authoring" -msgstr "autorizujem" - -#: lib/backup/k9dvdauthor.cpp:419 lib/backup/k9mp4enc.cpp:107 -#: lib/core/k9burndvd.cpp:230 lib/core/k9burndvd.cpp:314 -#: lib/mplayer/k9mplayer.cpp:99 -msgid "Unable to run %1" -msgstr "Ne mogu da pokrenem %1" - -#: lib/backup/k9dvdauthor.cpp:432 lib/backup/k9dvdauthor.cpp:513 -#: lib/backup/k9dvdauthor.cpp:551 lib/import/k9newdvd.cpp:144 -msgid "Authoring" -msgstr "Autorizujem" - -#. i18n: file ./lib/backup/backupdlg.ui line 41 -#: lib/backup/k9dvdauthor.cpp:433 po/rc.cpp:12 ui_backupdlg.h:239 rc.cpp:12 -#, no-c-format -msgid "Backup progression" -msgstr "Napredak pravljenja kopije" - -#: lib/backup/k9dvdauthor.cpp:473 -msgid "Dvdauthor error :\n" -msgstr "Greška u programu Dvdauthor :\n" - -#: lib/backup/k9dvdauthor.cpp:482 -msgid "Authoring cancelled" -msgstr "Autorizacija prekinuta" - -#: lib/backup/k9dvdauthor.cpp:485 lib/import/k9newdvd.cpp:137 -msgid "An error occured while running DVDAuthor:\n" -msgstr "Greška je nastala pri radu sa DVDAuthor:\n" - -#: lib/backup/k9dvdauthor.cpp:552 -msgid "Fixing VOBUS" -msgstr "Popravljanje VOBUS" - -#: lib/backup/k9dvdbackup.cpp:152 lib/backup/k9dvdbackup.cpp:166 -#: lib/backup/k9dvdbackup.cpp:518 lib/backup/k9dvdbackup.cpp:604 -msgid "DVD backup cancelled" -msgstr "Pravljenje DVD rezervne kopije prekinuto" - -#: lib/backup/k9dvdbackup.cpp:179 -msgid "unable to open VIDEO_TS.IFO" -msgstr "Ne mogu da otvorim VIDEO_TS.IFO" - -#: lib/backup/k9dvdbackup.cpp:201 lib/backup/k9dvdbackup.cpp:384 -#: lib/backup/k9dvdbackup.cpp:449 -msgid "Unable to open file " -msgstr "Ne mogu da otvorim datoteku " - -#: lib/backup/k9dvdbackup.cpp:280 -msgid "Unable to open titleset %1" -msgstr "Ne mogu da otvorim niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:286 lib/backup/k9dvdbackup.cpp:576 -msgid "Extracting titleset %1" -msgstr "Čupam niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:456 -msgid "Unable to open menu for titleset %1" -msgstr "Ne mogu da otvorim meni za niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:482 -msgid "Extracting menu for titleset %1" -msgstr "Čupam meni za niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:568 -msgid "Unable to open ifo file for titleset %1" -msgstr "Ne mogu da otvorim ifo datoteku za niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:580 lib/backup/k9dvdbackup.cpp:1701 -msgid "Unable to open DVD" -msgstr "Ne mogu da otvorim DVD" - -#: lib/backup/k9dvdbackup.cpp:590 -msgid "Unable to open vobs for titleset %1" -msgstr "Ne mogu da otvorim vob-ove za niz naslova %1" - -#: lib/backup/k9dvdbackup.cpp:1388 -msgid "Updating vob %1" -msgstr "Ažuriram vob %1" - -#: lib/backup/k9dvdbackup.cpp:1405 -msgid "DVD backup canceled" -msgstr "Pravljenje rezervne kopije prekinuto" - -#: lib/backup/k9mp4enc.cpp:107 lib/backup/k9mp4enc.cpp:325 -msgid "Encoding error" -msgstr "Greška u kodiranju" - -#: lib/backup/k9mp4enc.cpp:163 lib/main/k9main.cpp:1160 -msgid "Save file to disk" -msgstr "Sačuvaj datoteku na disk" - -#: lib/backup/k9mp4enc.cpp:172 lib/backup/k9mp4enc.cpp:363 -#: lib/main/k9main.cpp:565 lib/main/k9main.cpp:679 lib/main/k9main.cpp:695 -#: lib/main/k9mp4title.cpp:50 lib/main/k9prefdvd.cpp:36 -#: lib/main/k9prefmpeg4.cpp:35 -msgid "MB" -msgstr "MB" - -#: lib/backup/k9mp4enc.cpp:244 lib/backup/k9mp4enc.cpp:246 -#: lib/import/k9newdvd.cpp:252 -msgid "Encoding %1" -msgstr "Kodiranje %1" - -#: lib/backup/k9mp4enc.cpp:244 -msgid "pass %1" -msgstr "prolaz %1" - -#: lib/backup/k9mp4enc.cpp:322 -msgid "MPEG-4 Encoding cancelled" -msgstr "MPEG-4 kodiranje prekinuto" - -#: lib/backup/k9mp4enc.cpp:322 lib/main/k9main.cpp:1146 -#: lib/main/k9settings.cpp:44 -msgid "MPEG-4 Encoding" -msgstr "MPEG-4 kodiranje" - -#: lib/backup/k9mp4enc.cpp:325 -msgid "Error while running mencoder :" -msgstr "Greška pri pokretanju programa mencoder :" - -#. i18n: file ./lib/main/k9mainwsov.ui line 76 -#. i18n: file ./lib/main/k9mainw.ui line 173 -#. i18n: file ./lib/main/k9mainwsov.ui line 76 -#. i18n: file ./lib/main/k9mainw.ui line 173 -#: lib/core/k9burndvd.cpp:175 lib/core/k9burndvd.cpp:283 -#: lib/import/k9import.cpp:209 lib/main/k9main.cpp:1353 -#: lib/main/k9playbackoptions.cpp:147 po/rc.cpp:250 po/rc.cpp:291 -#: ui_k9mainw.h:190 rc.cpp:250 rc.cpp:291 -#, no-c-format -msgid "default" -msgstr "podrazumevano" - -#: lib/core/k9burndvd.cpp:185 lib/core/k9burndvd.cpp:260 -#msgid "Burning DVD" -#msgstr "Upis DVD diska" - -#: lib/core/k9burndvd.cpp:186 lib/core/k9burndvd.cpp:261 -#: lib/core/k9burndvd.cpp:353 lib/main/k9main.cpp:428 -msgid "Burning DVD" -msgstr "Upisivanje DVD diska" - -#: lib/core/k9burndvd.cpp:197 lib/core/k9burndvd.cpp:289 -#: lib/import/k9import.cpp:181 lib/main/k9main.cpp:379 -msgid "Save image to disk" -msgstr "Sačuvaj sliku na disk" - -#: lib/core/k9burndvd.cpp:220 lib/core/k9burndvd.cpp:307 -msgid "Insert a recordable DVD" -msgstr "Ubacite upisiv DVD disk" - -#: lib/core/k9burndvd.cpp:220 lib/core/k9burndvd.cpp:230 -#: lib/core/k9burndvd.cpp:235 lib/core/k9burndvd.cpp:308 -#: lib/core/k9burndvd.cpp:314 lib/core/k9burndvd.cpp:319 -msgid "DVD burning" -msgstr "Upisivanje DVD diska" - -#: lib/core/k9burndvd.cpp:230 lib/core/k9burndvd.cpp:314 -msgid "Error burning DVD :\n" -msgstr "Greška pri upisu na DVD :\n" - -#: lib/core/k9burndvd.cpp:235 lib/core/k9burndvd.cpp:319 -msgid "DVD Burning finished" -msgstr "Upisivanje DVD diska završeno" - -#: lib/core/k9burndvd.cpp:241 lib/core/k9burndvd.cpp:325 -msgid "An error occured while Burning DVD: %1" -msgstr "Pojavila se greška pri upisivanju DVD diska: %1" - -#: lib/core/k9burndvd.cpp:241 lib/core/k9burndvd.cpp:325 -msgid "Insert an other DVD" -msgstr "Ubacite drugi DVD" - -#: lib/core/k9burndvd.cpp:354 -msgid "Current write speed :%1 x" -msgstr "Trenutna brzina upisa :%1 x" - -#: lib/core/k9dvd.cpp:133 -msgid "for visually impaired" -msgstr "za osobe sa oštećenim vidom" - -#: lib/core/k9dvd.cpp:134 -msgid "director's comments" -msgstr "komentar režisera" - -#: lib/core/k9dvd.cpp:135 -msgid "alternate director's comments" -msgstr "dodatni komentar režisera" - -#: lib/core/k9dvd.cpp:139 -msgid "Large" -msgstr "Veliko" - -#: lib/core/k9dvd.cpp:140 -msgid "Children" -msgstr "Deca" - -#: lib/core/k9dvd.cpp:141 lib/core/k9dvd.cpp:147 lib/core/k9dvd.cpp:148 -#: lib/core/k9dvd.cpp:149 -msgid "reserved" -msgstr "očivano" - -#: lib/core/k9dvd.cpp:142 -msgid "Normal captions" -msgstr "Normalna slova" - -#: lib/core/k9dvd.cpp:143 -msgid "Large captions" -msgstr "Velika slova" - -#: lib/core/k9dvd.cpp:144 -msgid "Children captions" -msgstr "Mala slova" - -#: lib/core/k9dvd.cpp:146 -msgid "Forced" -msgstr "Primorano" - -#: lib/core/k9dvd.cpp:150 -msgid "Director's comments" -msgstr "Režiserov komentar" - -#: lib/core/k9dvd.cpp:151 -msgid "Large director's comments" -msgstr "Dugi režiserov komentar" - -#: lib/core/k9dvd.cpp:152 -msgid "Director's comments for children" -msgstr "Režiserov komentar za decu" - -#: lib/core/k9dvd.cpp:202 -msgid "Couldn't open %1 for title\n" -msgstr "Ne mogu da otvorim %1 za naslov\n" - -#: lib/core/k9dvd.cpp:204 lib/core/k9dvd.cpp:212 lib/core/k9dvd.cpp:220 -#: lib/core/k9dvd.cpp:381 lib/main/k9main.cpp:536 -msgid "unknown" -msgstr "nepoznato" - -#: lib/core/k9dvd.cpp:210 -msgid "Couldn't seek in %1 for title\n" -msgstr "Ne mogu da tragam u %1 za naslov\n" - -#: lib/core/k9dvd.cpp:237 -msgid "Not Specified" -msgstr "Nije određeno" - -#: lib/core/k9dvd.cpp:237 -msgid "Afar" -msgstr "afarski" - -#: lib/core/k9dvd.cpp:237 -msgid "Abkhazian" -msgstr "abhazijski" - -#: lib/core/k9dvd.cpp:237 -msgid "Afrikaans" -msgstr "afrički" - -#: lib/core/k9dvd.cpp:237 -msgid "Amharic" -msgstr "amharski" - -#: lib/core/k9dvd.cpp:238 -msgid "Arabic" -msgstr "arapski" - -#: lib/core/k9dvd.cpp:238 -msgid "Assamese" -msgstr "asameški" - -#: lib/core/k9dvd.cpp:238 -msgid "Aymara" -msgstr "ajmarski" - -#: lib/core/k9dvd.cpp:238 -msgid "Azerbaijani" -msgstr "azerbejdžanski" - -#: lib/core/k9dvd.cpp:238 -msgid "Bashkir" -msgstr "baškirski" - -#: lib/core/k9dvd.cpp:239 -msgid "Byelorussian" -msgstr "beloruski" - -#: lib/core/k9dvd.cpp:239 -msgid "Bulgarian" -msgstr "bugarski" - -#: lib/core/k9dvd.cpp:239 -msgid "Bihari" -msgstr "biharski" - -#: lib/core/k9dvd.cpp:239 -msgid "Bislama" -msgstr "bislamski" - -#: lib/core/k9dvd.cpp:239 -msgid "Bengali; Bangla" -msgstr "bengali" - -#: lib/core/k9dvd.cpp:240 -msgid "Tibetan" -msgstr "tibetanski" - -#: lib/core/k9dvd.cpp:240 -msgid "Breton" -msgstr "bretonski" - -#: lib/core/k9dvd.cpp:240 -msgid "Catalan" -msgstr "katalonski" - -#: lib/core/k9dvd.cpp:240 -msgid "Corsican" -msgstr "korzikanski" - -#: lib/core/k9dvd.cpp:240 -msgid "Czech" -msgstr "češki" - -#: lib/core/k9dvd.cpp:241 -msgid "Welsh" -msgstr "velški" - -#: lib/core/k9dvd.cpp:241 -msgid "Dansk" -msgstr "danski" - -#: lib/core/k9dvd.cpp:241 -msgid "Deutsch" -msgstr "nemački" - -#: lib/core/k9dvd.cpp:241 -#, fuzzy -msgid "Bhutani" -msgstr "biharski" - -#: lib/core/k9dvd.cpp:241 -msgid "Greek" -msgstr "grčki" - -#: lib/core/k9dvd.cpp:241 -msgid "English" -msgstr "engleski" - -#: lib/core/k9dvd.cpp:242 -msgid "Esperanto" -msgstr "esperanto" - -#: lib/core/k9dvd.cpp:242 -msgid "Espanol" -msgstr "španjolski" - -#: lib/core/k9dvd.cpp:242 -msgid "Estonian" -msgstr "estonski" - -#: lib/core/k9dvd.cpp:242 -msgid "Basque" -msgstr "baskijski" - -#: lib/core/k9dvd.cpp:242 -msgid "Persian" -msgstr "persijski" - -#: lib/core/k9dvd.cpp:243 -msgid "Suomi" -msgstr "" - -#: lib/core/k9dvd.cpp:243 -msgid "Fiji" -msgstr "fidži" - -#: lib/core/k9dvd.cpp:243 -msgid "Faroese" -msgstr "faroski" - -#: lib/core/k9dvd.cpp:243 -msgid "Francais" -msgstr "francuski" - -#: lib/core/k9dvd.cpp:243 -msgid "Frisian" -msgstr "frizijski" - -#: lib/core/k9dvd.cpp:243 -msgid "Gaelic" -msgstr "galski" - -#: lib/core/k9dvd.cpp:244 -msgid "Scots Gaelic" -msgstr "škotski galski" - -#: lib/core/k9dvd.cpp:244 -msgid "Galician" -msgstr "galicijski" - -#: lib/core/k9dvd.cpp:244 -msgid "Guarani" -msgstr "guarani" - -#: lib/core/k9dvd.cpp:244 -msgid "Gujarati" -msgstr "gudžarati" - -#: lib/core/k9dvd.cpp:244 -msgid "Hausa" -msgstr "hausa" - -#: lib/core/k9dvd.cpp:245 lib/core/k9dvd.cpp:247 -msgid "Hebrew" -msgstr "hebrejski" - -#: lib/core/k9dvd.cpp:245 -msgid "Hindi" -msgstr "hindu" - -#: lib/core/k9dvd.cpp:245 -msgid "Hrvatski" -msgstr "hrvatski" - -#: lib/core/k9dvd.cpp:245 -msgid "Magyar" -msgstr "mađarski" - -#: lib/core/k9dvd.cpp:245 -msgid "Armenian" -msgstr "jermenski" - -#: lib/core/k9dvd.cpp:246 -msgid "Interlingua" -msgstr "višejezički" - -#: lib/core/k9dvd.cpp:246 -msgid "Indonesian" -msgstr "indonezijski" - -#: lib/core/k9dvd.cpp:246 -msgid "Interlingue" -msgstr "višejezički" - -#: lib/core/k9dvd.cpp:246 -msgid "Inupiak" -msgstr "inupiak" - -#: lib/core/k9dvd.cpp:247 -msgid "Islenska" -msgstr "" - -#: lib/core/k9dvd.cpp:247 -msgid "Italiano" -msgstr "italijanski" - -#: lib/core/k9dvd.cpp:247 -msgid "Inuktitut" -msgstr "Inuktitut (transliterovano)" - -#: lib/core/k9dvd.cpp:247 -msgid "Japanese" -msgstr "japanski" - -#: lib/core/k9dvd.cpp:248 lib/core/k9dvd.cpp:263 -msgid "Yiddish" -msgstr "jevrejski" - -#: lib/core/k9dvd.cpp:248 -msgid "Javanese" -msgstr "javanski" - -#: lib/core/k9dvd.cpp:248 -msgid "Georgian" -msgstr "gruzijski" - -#: lib/core/k9dvd.cpp:248 -msgid "Kazakh" -msgstr "kazahstanski" - -#: lib/core/k9dvd.cpp:248 -msgid "Greenlandic" -msgstr "kalalisut (grenlandski)" - -#: lib/core/k9dvd.cpp:249 -msgid "Cambodian" -msgstr "kambodžanski" - -#: lib/core/k9dvd.cpp:249 -msgid "Kannada" -msgstr "kanadski" - -#: lib/core/k9dvd.cpp:249 -msgid "Korean" -msgstr "korejski" - -#: lib/core/k9dvd.cpp:249 -msgid "Kashmiri" -msgstr "kašmirski" - -#: lib/core/k9dvd.cpp:249 -msgid "Kurdish" -msgstr "kurdski" - -#: lib/core/k9dvd.cpp:250 -msgid "Kirghiz" -msgstr "kirgiški" - -#: lib/core/k9dvd.cpp:250 -msgid "Latin" -msgstr "latinski" - -#: lib/core/k9dvd.cpp:250 -msgid "Lingala" -msgstr "lingala" - -#: lib/core/k9dvd.cpp:250 -#, fuzzy -msgid "Laothian" -msgstr "latinski" - -#: lib/core/k9dvd.cpp:250 -msgid "Lithuanian" -msgstr "" - -#: lib/core/k9dvd.cpp:251 -msgid "Latvian, Lettish" -msgstr "" - -#: lib/core/k9dvd.cpp:251 -msgid "Malagasy" -msgstr "" - -#: lib/core/k9dvd.cpp:251 -msgid "Maori" -msgstr "maori" - -#: lib/core/k9dvd.cpp:251 -msgid "Macedonian" -msgstr "makedonski" - -#: lib/core/k9dvd.cpp:251 -msgid "Malayalam" -msgstr "" - -#: lib/core/k9dvd.cpp:252 -msgid "Mongolian" -msgstr "mongolski" - -#: lib/core/k9dvd.cpp:252 -msgid "Moldavian" -msgstr "moldavski" - -#: lib/core/k9dvd.cpp:252 -#, fuzzy -msgid "Marathi" -msgstr "gudžarati" - -#: lib/core/k9dvd.cpp:252 -#, fuzzy -msgid "Malay" -msgstr "MPlayer" - -#: lib/core/k9dvd.cpp:252 -msgid "Maltese" -msgstr "" - -#: lib/core/k9dvd.cpp:253 -msgid "Burmese" -msgstr "" - -#: lib/core/k9dvd.cpp:253 -msgid "Nauru" -msgstr "" - -#: lib/core/k9dvd.cpp:253 -msgid "Nepali" -msgstr "nepalski" - -#: lib/core/k9dvd.cpp:253 -msgid "Nederlands" -msgstr "" - -#: lib/core/k9dvd.cpp:253 -msgid "Norsk" -msgstr "" - -#: lib/core/k9dvd.cpp:253 -msgid "Occitan" -msgstr "" - -#: lib/core/k9dvd.cpp:254 -msgid "Oromo" -msgstr "" - -#: lib/core/k9dvd.cpp:254 -msgid "Oriya" -msgstr "" - -#: lib/core/k9dvd.cpp:254 -msgid "Punjabi" -msgstr "" - -#: lib/core/k9dvd.cpp:254 -msgid "Polish" -msgstr "poljski" - -#: lib/core/k9dvd.cpp:254 -msgid "Pashto, Pushto" -msgstr "" - -#: lib/core/k9dvd.cpp:255 -msgid "Portugues" -msgstr "portugalski" - -#: lib/core/k9dvd.cpp:255 -msgid "Quechua" -msgstr "" - -#: lib/core/k9dvd.cpp:255 -msgid "Rhaeto-Romance" -msgstr "" - -#: lib/core/k9dvd.cpp:255 -#, fuzzy -msgid "Kirundi" -msgstr "hindu" - -#: lib/core/k9dvd.cpp:255 -msgid "Romanian" -msgstr "rumunski" - -#: lib/core/k9dvd.cpp:256 -msgid "Russian" -msgstr "ruski" - -#: lib/core/k9dvd.cpp:256 -msgid "Kinyarwanda" -msgstr "" - -#: lib/core/k9dvd.cpp:256 -#, fuzzy -msgid "Sanskrit" -msgstr "danski" - -#: lib/core/k9dvd.cpp:256 -#, fuzzy -msgid "Sindhi" -msgstr "hindu" - -#: lib/core/k9dvd.cpp:256 -msgid "Sangho" -msgstr "" - -#: lib/core/k9dvd.cpp:257 -msgid "Serbo-Croatian" -msgstr "srpsko-hrvatski" - -#: lib/core/k9dvd.cpp:257 -#, fuzzy -msgid "Sinhalese" -msgstr "vijetnamski" - -#: lib/core/k9dvd.cpp:257 -msgid "Slovak" -msgstr "slovački" - -#: lib/core/k9dvd.cpp:257 -msgid "Slovenian" -msgstr "slovenski" - -#: lib/core/k9dvd.cpp:257 -#, fuzzy -msgid "Samoan" -msgstr "kambodžanski" - -#: lib/core/k9dvd.cpp:258 -msgid "Shona" -msgstr "" - -#: lib/core/k9dvd.cpp:258 -msgid "Somali" -msgstr "" - -#: lib/core/k9dvd.cpp:258 -msgid "Albanian" -msgstr "albanski" - -#: lib/core/k9dvd.cpp:258 -msgid "Serbian" -msgstr "srpski" - -#: lib/core/k9dvd.cpp:258 -msgid "Siswati" -msgstr "" - -#: lib/core/k9dvd.cpp:259 -msgid "Sesotho" -msgstr "" - -#: lib/core/k9dvd.cpp:259 -msgid "Sundanese" -msgstr "" - -#: lib/core/k9dvd.cpp:259 -#, fuzzy -msgid "Svenska" -msgstr "slovenski" - -#: lib/core/k9dvd.cpp:259 -msgid "Swahili" -msgstr "" - -#: lib/core/k9dvd.cpp:259 -#, fuzzy -msgid "Tamil" -msgstr "tajlandski (tai)" - -#: lib/core/k9dvd.cpp:260 -msgid "Telugu" -msgstr "" - -#: lib/core/k9dvd.cpp:260 -#, fuzzy -msgid "Tajik" -msgstr "tajlandski (tai)" - -#: lib/core/k9dvd.cpp:260 -msgid "Thai" -msgstr "tajlandski (tai)" - -#: lib/core/k9dvd.cpp:260 -msgid "Tigrinya" -msgstr "" - -#: lib/core/k9dvd.cpp:260 -msgid "Turkmen" -msgstr "" - -#: lib/core/k9dvd.cpp:260 -msgid "Tagalog" -msgstr "" - -#: lib/core/k9dvd.cpp:261 -msgid "Setswana" -msgstr "" - -#: lib/core/k9dvd.cpp:261 -msgid "Tonga" -msgstr "" - -#: lib/core/k9dvd.cpp:261 -msgid "Turkish" -msgstr "turski" - -#: lib/core/k9dvd.cpp:261 -msgid "Tsonga" -msgstr "" - -#: lib/core/k9dvd.cpp:261 -#, fuzzy -msgid "Tatar" -msgstr "početak" - -#: lib/core/k9dvd.cpp:261 -msgid "Twi" -msgstr "" - -#: lib/core/k9dvd.cpp:262 -msgid "Uighur" -msgstr "" - -#: lib/core/k9dvd.cpp:262 -msgid "Ukrainian" -msgstr "ukrainski" - -#: lib/core/k9dvd.cpp:262 -msgid "Urdu" -msgstr "" - -#: lib/core/k9dvd.cpp:262 -msgid "Uzbek" -msgstr "" - -#: lib/core/k9dvd.cpp:262 -msgid "Vietnamese" -msgstr "vijetnamski" - -#: lib/core/k9dvd.cpp:263 -msgid "Volapuk" -msgstr "" - -#: lib/core/k9dvd.cpp:263 -msgid "Wolof" -msgstr "" - -#: lib/core/k9dvd.cpp:263 -msgid "Xhosa" -msgstr "" - -#: lib/core/k9dvd.cpp:263 -msgid "Yoruba" -msgstr "" - -#: lib/core/k9dvd.cpp:263 -msgid "Zhuang" -msgstr "" - -#: lib/core/k9dvd.cpp:264 -msgid "Chinese" -msgstr "kineski" - -#: lib/core/k9dvd.cpp:264 -msgid "Zulu" -msgstr "" - -#: lib/core/k9dvd.cpp:264 lib/core/k9dvd.cpp:265 lib/core/k9dvd.cpp:488 -msgid "Unknown" -msgstr "nepoznat" - -#: lib/core/k9dvd.cpp:355 -msgid "Can't open disc %1!\n" -msgstr "Ne mogu da otvorim disk %1!\n" - -#: lib/core/k9dvd.cpp:367 -msgid "Can't open main ifo!\n" -msgstr "Me mogu da otvorim glavni ifo!\n" - -#: lib/core/k9dvd.cpp:409 lib/core/k9dvd.cpp:706 -msgid "Title %1" -msgstr "Naslov %1" - -#: lib/core/k9dvd.cpp:757 -msgid "reading title" -msgstr "čitam naslov" - -#: lib/core/k9dvd.cpp:874 -msgid "Error opening vobs for title %1\n" -msgstr "Greška pri otvaranju vob-ova za naslov %1\n" - -#: lib/core/k9dvd.cpp:885 -msgid "ERROR reading block %1\n" -msgstr "Greška pri čitanju bloka %1\n" - -#: lib/import/k9avidecode.cpp:31 lib/import/k9avidecode.cpp:35 -msgid "Cannot open then library %1" -msgstr "Ne mogu da otvorim biblioteku %1" - -#: lib/import/k9avidecode.cpp:88 -msgid "Couldn't open the file %1" -msgstr "Ne mogu da otvorim datoteku %1" - -#: lib/import/k9avidecode.cpp:93 -msgid "Couldn't find stream information" -msgstr "Ne mogu da nađem podatke za protok" - -#: lib/import/k9avidecode.cpp:106 -msgid "The file doesn't contain any video stream" -msgstr "Datoteka ne sadrži ni jedan video tok" - -#: lib/import/k9avidecode.cpp:117 -msgid "Unsupported codec" -msgstr "Nepodržani kodek" - -#: lib/import/k9avidecode.cpp:122 -msgid "Could'nt open the codec" -msgstr "Ne mogu da otvorim kodek" - -#: lib/import/k9avidecode.cpp:133 -msgid "Unable to allocate memory for frames" -msgstr "Ne mogu da alociram memoriju za kadrove" - -#. i18n: file ./lib/import/menuEdit.ui line 171 -#: lib/import/k9import.cpp:50 lib/import/k9menuedit.cpp:298 po/rc.cpp:151 -#: ui_menuEdit.h:216 rc.cpp:151 -#, no-c-format -msgid "Root Menu" -msgstr "Glavni meni" - -#: lib/import/k9import.cpp:68 lib/main/k9main.cpp:474 lib/main/k9main.cpp:1253 -msgid "ISO Image" -msgstr "ISO odraz" - -#: lib/import/k9import.cpp:69 lib/main/k9main.cpp:1254 -msgid "Folder" -msgstr "Fascikla" - -#: lib/import/k9importfiles.cpp:86 -#, fuzzy -msgid "Add Title" -msgstr "Dodaj naslov" - -#. i18n: file ./lib/import/chapterEdit.ui line 20 -#: lib/import/k9importfiles.cpp:94 po/rc.cpp:72 ui_chapterEdit.h:217 rc.cpp:72 -#, no-c-format -msgid "Chapter properties" -msgstr "Postavke poglavlja" - -#: lib/import/k9importfiles.cpp:105 -msgid "Edit menu" -msgstr "Uredi meni" - -#: lib/import/k9importfiles.cpp:148 -msgid "Create DVD" -msgstr "Napravi DVD" - -#: lib/import/k9importfiles.cpp:152 lib/main/k9settings.cpp:34 -msgid "DVD Backup" -msgstr "DVD rezervna kopija" - -#: lib/import/k9importfiles.cpp:190 lib/main/k9copy.cpp:333 -msgid "Settings" -msgstr "Postavke" - -#: lib/import/k9menuedit.cpp:254 -msgid "Title %1 Menu" -msgstr "Meni %1. naslova" - -#: lib/import/k9menuedit.cpp:263 lib/import/k9menuedit.cpp:303 -msgid "Play Menu" -msgstr "Pusti meni" - -#: lib/import/k9menuedit.cpp:265 -msgid "Play Title" -msgstr "Pusti naslov" - -#: lib/import/k9menuedit.cpp:271 -msgid "Play Root Menu" -msgstr "Pusti glavni meni" - -#: lib/import/k9menuedit.cpp:273 -msgid "Play Title Menu" -msgstr "Pusti meni naslova" - -#: lib/import/k9menuedit.cpp:281 lib/import/k9menuedit.cpp:309 -msgid "Play Title %1" -msgstr "Pusti naslov %1" - -#: lib/import/k9newdvd.cpp:95 -msgid "Creating root menu" -msgstr "Pravim glavni meni" - -#: lib/import/k9newdvd.cpp:135 -msgid "The dvd authoring was canceled" -msgstr "Autorizacija DVD-a je bila prekinuta" - -#: lib/import/k9newdvd.cpp:163 -msgid "Creating menu for title %1" -msgstr "Pravim meni za naslov %1" - -#. i18n: file ./lib/backup/mp4dlg.ui line 133 -#: lib/import/k9newdvd.cpp:350 po/rc.cpp:33 ui_mp4dlg.h:219 rc.cpp:33 -#, no-c-format -msgid "fps" -msgstr "fps" - -#: lib/import/k9newdvd.cpp:387 lib/import/k9newtitle.cpp:66 -msgid "title %1" -msgstr "naslov %1" - -#. i18n: file ./lib/import/newTitle.ui line 13 -#: lib/import/k9newtitle.cpp:58 po/rc.cpp:175 ui_newTitle.h:183 rc.cpp:175 -#, no-c-format -msgid "Add title" -msgstr "Dodaj naslov" - -#: lib/import/k9newtitle.cpp:119 lib/import/k9newtitle.cpp:141 -#: lib/main/k9main.cpp:629 lib/main/k9main.cpp:646 -msgid "chapter %1" -msgstr "poglavlje %1" - -#: lib/main/k9copy.cpp:109 -msgid "Shrink Factor" -msgstr "Faktor kompresije" - -#: lib/main/k9copy.cpp:119 -msgid "MPEG4 Encoding Options" -msgstr "Opcije MPEG4 kodiranja" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 13 -#: lib/main/k9copy.cpp:140 po/rc.cpp:318 ui_playbackoptionsw.h:225 rc.cpp:318 -#, no-c-format -msgid "DVD playback options" -msgstr "Postavke DVD reprodukcije" - -#. i18n: file ./lib/main/langselectw.ui line 13 -#: lib/main/k9copy.cpp:148 po/rc.cpp:306 ui_langselectw.h:60 rc.cpp:306 -#, no-c-format -msgid "Selection" -msgstr "Izabrano" - -#. i18n: file ./lib/mplayer/mplayer.ui line 16 -#: lib/main/k9copy.cpp:160 lib/main/k9settings.cpp:49 -#: lib/mplayer/k9mplayer.cpp:99 po/rc.cpp:623 ui_mplayer.h:241 rc.cpp:623 -#, no-c-format -msgid "Preview" -msgstr "Pregled" - -#: lib/main/k9copy.cpp:224 -msgid "Play title" -msgstr "Pusti naslov" - -#: lib/main/k9copy.cpp:230 -#, fuzzy -msgid "Copy" -msgstr "k9Copy" - -#: lib/main/k9copy.cpp:236 -msgid "Create MPEG-4" -msgstr "Napravi MPEG-4" - -#: lib/main/k9copy.cpp:245 -msgid "Eject" -msgstr "Izbaci" - -#: lib/main/k9copy.cpp:253 -msgid "DVD Author" -msgstr "DVS autor" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 297 -#. i18n: file ./lib/main/prefAuthor.ui line 19 -#. i18n: file ./lib/main/prefMPEG4.ui line 397 -#. i18n: file ./lib/mplayer/mplayer.ui line 25 -#. i18n: file ./lib/main/playbackoptionsw.ui line 297 -#. i18n: file ./lib/main/prefAuthor.ui line 19 -#. i18n: file ./lib/main/prefMPEG4.ui line 397 -#. i18n: file ./lib/mplayer/mplayer.ui line 25 -#: lib/main/k9langselect.cpp:89 po/rc.cpp:336 po/rc.cpp:342 po/rc.cpp:527 -#: po/rc.cpp:626 ui_mplayer.h:242 ui_playbackoptionsw.h:233 -#: ui_prefAuthor.h:190 ui_prefMPEG4.h:395 rc.cpp:336 rc.cpp:342 rc.cpp:527 -#: rc.cpp:626 -#, no-c-format -msgid "Audio" -msgstr "Zvuk" - -#: lib/main/k9langselect.cpp:100 -msgid "Subtitles" -msgstr "Prevodi" - -#: lib/main/k9main.cpp:368 lib/main/k9main.cpp:1146 -msgid "DVD is not opened" -msgstr "DVD nije otvoren" - -#: lib/main/k9main.cpp:368 -msgid "DVD Copy" -msgstr "DVD umnožavanje" - -#: lib/main/k9main.cpp:395 -msgid "Backup in progress" -msgstr "Pravljenje rezervne kopije u toku" - -#: lib/main/k9main.cpp:450 lib/main/k9main.cpp:586 lib/main/k9main.cpp:1197 -msgid "Ready" -msgstr "Spremno" - -#: lib/main/k9main.cpp:533 -msgid "Open DVD" -msgstr "Otvori DVD" - -#: lib/main/k9main.cpp:559 -msgid "Titleset %1" -msgstr "Niz naslova %1" - -#: lib/main/k9main.cpp:621 -msgid "chapters" -msgstr "poglavlja" - -#: lib/main/k9main.cpp:633 lib/main/k9main.cpp:649 lib/main/k9main.cpp:713 -#: lib/main/k9main.cpp:734 -msgid "%1 MB" -msgstr "%1 MB" - -#: lib/main/k9main.cpp:691 -msgid "video %1 " -msgstr "video %1 " - -#: lib/main/k9main.cpp:702 -msgid "audio %1 " -msgstr "zvuk %1 " - -#: lib/main/k9main.cpp:725 -msgid "subpicture %1 " -msgstr "prevod %1 " - -#: lib/main/k9main.cpp:1154 -msgid "Transcoding title : %1" -msgstr "Kodiram naslov : %1" - -#: lib/main/k9main.cpp:1373 -msgid "Open ISO Image" -msgstr "Otvori ISO odraz" - -#: lib/main/k9main.cpp:1384 -msgid "Open DVD folder" -msgstr "Otvori DVD fasciklu" - -#. i18n: file ./lib/main/mencoderCmdGen.ui line 13 -#: lib/main/k9mencodercmdgen.cpp:63 po/rc.cpp:312 ui_mencoderCmdGen.h:106 -#: rc.cpp:312 -#, no-c-format -msgid "MEncoder options" -msgstr "MEncoder opcije" - -#: lib/main/k9mencodercmdgen.cpp:78 -msgid "Audio Codec" -msgstr "Zvučni kodek" - -#: lib/main/k9mencodercmdgen.cpp:94 -msgid "Video Codec" -msgstr "Video kodek" - -#: lib/main/k9mencodercmdgen.cpp:113 -msgid "Filters" -msgstr "Filteri" - -#: lib/main/k9mp4title.cpp:37 lib/main/k9mp4title.cpp:110 -#: lib/main/k9titlefactor.cpp:100 -msgid "Select a Title in the treeview..." -msgstr "Izaberite naslov u stablu za pregled..." - -#: lib/main/k9playbackoptions.cpp:149 -msgid "none" -msgstr "ništa" - -#: lib/main/k9prefmencoder.cpp:110 lib/main/k9prefmencoder.cpp:114 -#: lib/main/k9prefmencoder.cpp:125 lib/main/k9prefmencoder.cpp:127 -msgid "new profile" -msgstr "novi profil" - -#: lib/main/k9settings.cpp:28 -msgid "Devices" -msgstr "Uređaji" - -#: lib/main/k9settings.cpp:29 -msgid "Devices not detected by k9copy" -msgstr "Uređaji nisu pronađeni od strane programa" - -#: lib/main/k9settings.cpp:33 -msgid "DVD" -msgstr "DVD" - -#: lib/main/k9settings.cpp:38 -msgid "MEncoder" -msgstr "MEncoder" - -#: lib/main/k9settings.cpp:39 -msgid "MPEG-4 Codecs" -msgstr "MPEG-4 kodeci" - -#: lib/main/k9settings.cpp:43 -msgid "MPEG-4" -msgstr "MPEG-4" - -#: lib/main/k9settings.cpp:50 -msgid "Title preview" -msgstr "pregled naslova" - -#: lib/main/k9titlefactor.cpp:111 -msgid "Shrink Factor for %1" -msgstr "Faktor suženja za %1" - -#: main.cpp:31 -msgid "A KDE 4 Application" -msgstr "" - -#: main.cpp:37 -msgid "k9copy" -msgstr "k9Copy" - -#: main.cpp:38 -msgid "(C) 2007 Jean-Michel" -msgstr "" - -#: main.cpp:39 -msgid "Jean-Michel" -msgstr "" - -#: main.cpp:40 -msgid "_: NAME OF TRANSLATORS\\nYour names" -msgstr "_: IME PREVODILACA\\nMiloš Popović" - -#: main.cpp:41 -msgid "_: EMAIL OF TRANSLATORS\\nYour emails" -msgstr "_: MEJL ADRESA PREVODILACA\\ngpopac@gmail.com" - -#. i18n: file ./lib/main/k9mainw.ui line 49 -#: main.cpp:45 po/rc.cpp:270 ui_k9mainw.h:181 rc.cpp:270 -#, no-c-format -msgid "input device" -msgstr "ulazni uređaj" - -#: main.cpp:46 -msgid "output device" -msgstr "izlazni uređaj" - -#: main.cpp:47 -msgid "title to play" -msgstr "naslov koji da pustim" - -#: main.cpp:48 -msgid "play title to stdout" -msgstr "pusti naslov na standardni izlaz" - -#: main.cpp:49 -msgid "start sector" -msgstr "obeleživač početka" - -#: main.cpp:50 -msgid "end sector" -msgstr "obeleživač kraja" - -#: main.cpp:51 -msgid "list of audio streams" -msgstr "lista zvučnih tokova" - -#: main.cpp:52 -msgid "list of spu streams" -msgstr "lusta spu tokova" - -#: main.cpp:53 -msgid "shrink factor" -msgstr "faktor kompresije" - -#: main.cpp:54 -msgid "shrink factor forced" -msgstr "primorani faktor kompresije" - -#: main.cpp:55 -msgid "size of the cell to be copied" -msgstr "veličina ćelije za umnožavanje" - -#: main.cpp:56 -msgid "total size of selected titles" -msgstr "ukupna veličina izabranih naslova" - -#: main.cpp:57 -msgid "size of the chapters being copied" -msgstr "veličina poglavlja za umnožavanje" - -#: main.cpp:58 -msgid "selected chapters" -msgstr "izabrana poglavlja" - -#: main.cpp:59 -msgid "new dvd size" -msgstr "veličina novog DVD-a" - -#: main.cpp:60 -msgid "selected chapter" -msgstr "izabrano poglavnje" - -#: main.cpp:61 -msgid "cell number in selected chapter" -msgstr "broj ćelije u izabranom poglavlju" - -#: main.cpp:62 -msgid "status file name" -msgstr "ime datoteke za stanje" - -#: main.cpp:63 -msgid "initialize status file" -msgstr "pokreni datoteku za stanjem" - -#: main.cpp:64 -msgid "continue playing from last sector" -msgstr "nastavi reprodukciju od zadnjeg sektora" - -#: main.cpp:65 -msgid "don't save status at end" -msgstr "ne čuvaj stanje na kraju" - -#: main.cpp:66 -msgid "save cell in a temporary file before encoding" -msgstr "sačuvaj ćeliju u privremenu datoteku pre kodiranja" - -#. i18n: file ./k9copyui.rc line 4 -#: po/rc.cpp:3 rc.cpp:3 -#, fuzzy, no-c-format -msgid "&File" -msgstr "Filteri" - -#. i18n: file ./k9copyui.rc line 10 -#: po/rc.cpp:6 rc.cpp:6 -#, no-c-format -msgid "A&ctions" -msgstr "&Radnje" - -#. i18n: file ./k9copyui.rc line 24 -#: po/rc.cpp:9 rc.cpp:9 -#, no-c-format -msgid "Actions ToolBar" -msgstr "Paleta sa alatima radnje" - -#. i18n: file ./lib/backup/backupdlg.ui line 80 -#: po/rc.cpp:15 ui_backupdlg.h:240 rc.cpp:15 -#, no-c-format -msgid "

DVD Backup

" -msgstr "

DVD rezervna kopija

" - -#. i18n: file ./lib/backup/backupdlg.ui line 106 -#: po/rc.cpp:18 ui_backupdlg.h:241 rc.cpp:18 -#, no-c-format -msgid "Current step" -msgstr "Trenutni korak" - -#. i18n: file ./lib/backup/backupdlg.ui line 147 -#. i18n: file ./lib/backup/mp4dlg.ui line 146 -#. i18n: file ./lib/core/progress.ui line 221 -#. i18n: file ./lib/backup/backupdlg.ui line 147 -#. i18n: file ./lib/backup/mp4dlg.ui line 146 -#. i18n: file ./lib/core/progress.ui line 221 -#: po/rc.cpp:21 po/rc.cpp:36 po/rc.cpp:69 ui_backupdlg.h:242 ui_mp4dlg.h:220 -#: ui_progress.h:171 rc.cpp:21 rc.cpp:36 rc.cpp:69 -#, no-c-format -msgid "Elapsed Time" -msgstr "Proteklo vreme" - -#. i18n: file ./lib/backup/backupdlg.ui line 166 -#. i18n: file ./lib/import/chapterEdit.ui line 118 -#. i18n: file ./lib/import/import.ui line 97 -#. i18n: file ./lib/import/newTitle.ui line 197 -#. i18n: file ./lib/backup/backupdlg.ui line 166 -#. i18n: file ./lib/import/chapterEdit.ui line 118 -#. i18n: file ./lib/import/import.ui line 97 -#. i18n: file ./lib/import/newTitle.ui line 197 -#: po/rc.cpp:24 po/rc.cpp:75 po/rc.cpp:130 po/rc.cpp:193 ui_backupdlg.h:243 -#: ui_chapterEdit.h:218 ui_import.h:136 ui_newTitle.h:191 rc.cpp:24 rc.cpp:75 -#: rc.cpp:130 rc.cpp:193 -#, no-c-format -msgid "--:--:--" -msgstr "--:--:--" - -#. i18n: file ./lib/backup/mp4dlg.ui line 16 -#: po/rc.cpp:27 ui_mp4dlg.h:213 rc.cpp:27 -#, no-c-format -msgid "transcoding" -msgstr "Kodiranje" - -#. i18n: file ./lib/backup/mp4dlg.ui line 37 -#: po/rc.cpp:30 ui_mp4dlg.h:214 rc.cpp:30 -#, no-c-format -msgid "Encoding" -msgstr "Kodiranje" - -#. i18n: file ./lib/backup/mp4dlg.ui line 159 -#. i18n: file ./lib/main/prefAuthor.ui line 68 -#. i18n: file ./lib/main/prefMPEG4.ui line 341 -#. i18n: file ./lib/main/prefMPEG4.ui line 448 -#. i18n: file ./lib/backup/mp4dlg.ui line 159 -#. i18n: file ./lib/main/prefAuthor.ui line 68 -#. i18n: file ./lib/main/prefMPEG4.ui line 341 -#. i18n: file ./lib/main/prefMPEG4.ui line 448 -#: po/rc.cpp:39 po/rc.cpp:363 po/rc.cpp:521 po/rc.cpp:548 ui_mp4dlg.h:221 -#: ui_prefAuthor.h:203 ui_prefMPEG4.h:380 ui_prefMPEG4.h:392 rc.cpp:39 -#: rc.cpp:363 rc.cpp:521 rc.cpp:548 -#, no-c-format -msgid "Bitrate" -msgstr "Bitski protok" - -#. i18n: file ./lib/backup/mp4dlg.ui line 172 -#. i18n: file ./lib/main/k9mainwsov.ui line 243 -#. i18n: file ./lib/main/k9mainw.ui line 218 -#. i18n: file ./lib/backup/mp4dlg.ui line 172 -#. i18n: file ./lib/main/k9mainwsov.ui line 243 -#. i18n: file ./lib/main/k9mainw.ui line 218 -#: po/rc.cpp:42 po/rc.cpp:262 po/rc.cpp:300 ui_k9mainw.h:194 ui_mp4dlg.h:222 -#: rc.cpp:42 rc.cpp:262 rc.cpp:300 -#, no-c-format -msgid "Size" -msgstr "Veličina" - -#. i18n: file ./lib/core/dvdprogress.ui line 35 -#: po/rc.cpp:45 ui_dvdprogress.h:114 rc.cpp:45 -#, no-c-format -msgid "DVD Analyze" -msgstr "DVD analiza" - -#. i18n: file ./lib/core/processList.ui line 16 -#. i18n: file ./lib/import/processList.ui line 13 -#. i18n: file ./lib/core/processList.ui line 16 -#. i18n: file ./lib/import/processList.ui line 13 -#: po/rc.cpp:48 po/rc.cpp:196 ui_processList.h:73 rc.cpp:48 rc.cpp:196 -#, no-c-format -msgid "Process List" -msgstr "Lista za obradu" - -#. i18n: file ./lib/core/processList.ui line 25 -#. i18n: file ./lib/import/processList.ui line 25 -#. i18n: file ./lib/core/processList.ui line 25 -#. i18n: file ./lib/import/processList.ui line 25 -#: po/rc.cpp:51 po/rc.cpp:202 ui_processList.h:75 rc.cpp:51 rc.cpp:202 -#, no-c-format -msgid "Processes" -msgstr "Obrade" - -#. i18n: file ./lib/core/processList.ui line 36 -#. i18n: file ./lib/import/processList.ui line 30 -#. i18n: file ./lib/core/processList.ui line 36 -#. i18n: file ./lib/import/processList.ui line 30 -#: po/rc.cpp:54 po/rc.cpp:205 ui_processList.h:76 rc.cpp:54 rc.cpp:205 -#, no-c-format -msgid "Elapsed" -msgstr "Proteklo" - -#. i18n: file ./lib/core/processList.ui line 47 -#. i18n: file ./lib/import/import.ui line 58 -#. i18n: file ./lib/import/processList.ui line 35 -#. i18n: file ./lib/main/k9mainw.ui line 80 -#. i18n: file ./lib/main/k9mainw.ui line 90 -#. i18n: file ./lib/core/processList.ui line 47 -#. i18n: file ./lib/import/import.ui line 58 -#. i18n: file ./lib/import/processList.ui line 35 -#. i18n: file ./lib/main/k9mainw.ui line 80 -#. i18n: file ./lib/main/k9mainw.ui line 90 -#: po/rc.cpp:57 po/rc.cpp:121 po/rc.cpp:208 po/rc.cpp:276 po/rc.cpp:282 -#: ui_import.h:130 ui_k9mainw.h:183 ui_k9mainw.h:185 ui_processList.h:77 -#: rc.cpp:57 rc.cpp:121 rc.cpp:208 rc.cpp:276 rc.cpp:282 -#, no-c-format -msgid "..." -msgstr "..." - -#. i18n: file ./lib/core/processList.ui line 73 -#. i18n: file ./lib/import/processList.ui line 49 -#. i18n: file ./lib/core/processList.ui line 73 -#. i18n: file ./lib/import/processList.ui line 49 -#: po/rc.cpp:60 po/rc.cpp:211 ui_processList.h:78 rc.cpp:60 rc.cpp:211 -#, no-c-format -msgid "&Cancel" -msgstr "" - -#. i18n: file ./lib/core/processList.ui line 76 -#. i18n: file ./lib/import/processList.ui line 52 -#. i18n: file ./lib/core/processList.ui line 76 -#. i18n: file ./lib/import/processList.ui line 52 -#: po/rc.cpp:63 po/rc.cpp:214 ui_processList.h:79 rc.cpp:63 rc.cpp:214 -#, no-c-format -msgid "Alt+C" -msgstr "Alt+C" - -#. i18n: file ./lib/core/progress.ui line 31 -#: po/rc.cpp:66 ui_progress.h:169 rc.cpp:66 -#, fuzzy, no-c-format -msgid "k9Copy" -msgstr "k9Copy" - -#. i18n: file ./lib/import/chapterEdit.ui line 130 -#: po/rc.cpp:78 ui_chapterEdit.h:219 rc.cpp:78 -#, no-c-format -msgid "video" -msgstr "video" - -#. i18n: file ./lib/import/chapterEdit.ui line 153 -#: po/rc.cpp:81 ui_chapterEdit.h:220 rc.cpp:81 -#, no-c-format -msgid "" -"*.avi\n" -"*.mpeg" -msgstr "" -"*.avi\n" -"*.mpeg" - -#. i18n: file ./lib/import/chapterEdit.ui line 160 -#: po/rc.cpp:85 ui_chapterEdit.h:222 rc.cpp:85 -#, fuzzy, no-c-format -msgid "start" -msgstr "Na početak" - -#. i18n: file ./lib/import/chapterEdit.ui line 176 -#. i18n: file ./lib/import/chapterEdit.ui line 251 -#. i18n: file ./lib/import/newTitle.ui line 56 -#. i18n: file ./lib/import/chapterEdit.ui line 176 -#. i18n: file ./lib/import/chapterEdit.ui line 251 -#. i18n: file ./lib/import/newTitle.ui line 56 -#: po/rc.cpp:88 po/rc.cpp:100 po/rc.cpp:178 ui_chapterEdit.h:223 -#: ui_chapterEdit.h:227 ui_newTitle.h:185 rc.cpp:88 rc.cpp:100 rc.cpp:178 -#, no-c-format -msgid "HH:mm:ss" -msgstr "" - -#. i18n: file ./lib/import/chapterEdit.ui line 189 -#. i18n: file ./lib/import/chapterEdit.ui line 264 -#. i18n: file ./lib/import/chapterEdit.ui line 189 -#. i18n: file ./lib/import/chapterEdit.ui line 264 -#: po/rc.cpp:91 po/rc.cpp:103 ui_chapterEdit.h:224 ui_chapterEdit.h:228 -#: rc.cpp:91 rc.cpp:103 -#, no-c-format -msgid "set Current Frame" -msgstr "postavi trenutni kadar" - -#. i18n: file ./lib/import/chapterEdit.ui line 212 -#. i18n: file ./lib/import/chapterEdit.ui line 271 -#. i18n: file ./lib/import/chapterEdit.ui line 212 -#. i18n: file ./lib/import/chapterEdit.ui line 271 -#: po/rc.cpp:94 po/rc.cpp:106 ui_chapterEdit.h:225 ui_chapterEdit.h:229 -#: rc.cpp:94 rc.cpp:106 -#, no-c-format -msgid "break continuity" -msgstr "prekini kontinuitet" - -#. i18n: file ./lib/import/chapterEdit.ui line 235 -#: po/rc.cpp:97 ui_chapterEdit.h:226 rc.cpp:97 -#, no-c-format -msgid "end" -msgstr "kraj" - -#. i18n: file ./lib/import/chapterEdit.ui line 300 -#: po/rc.cpp:109 ui_chapterEdit.h:230 rc.cpp:109 -#, no-c-format -msgid "set Title button" -msgstr "postavi Naslovno dugme" - -#. i18n: file ./lib/import/import.ui line 13 -#: po/rc.cpp:112 ui_import.h:127 rc.cpp:112 -#, no-c-format -msgid "import" -msgstr "uvoz" - -#. i18n: file ./lib/import/import.ui line 25 -#. i18n: file ./lib/main/configDlg.ui line 113 -#. i18n: file ./lib/import/import.ui line 25 -#. i18n: file ./lib/main/configDlg.ui line 113 -#: po/rc.cpp:115 po/rc.cpp:229 ui_configDlg.h:128 ui_import.h:128 rc.cpp:115 -#: rc.cpp:229 -#, no-c-format -msgid "Output" -msgstr "Izlaz" - -#. i18n: file ./lib/import/import.ui line 53 -#: po/rc.cpp:118 ui_import.h:129 rc.cpp:118 -#, no-c-format -msgid "Video files" -msgstr "Video datoteke" - -#. i18n: file ./lib/import/import.ui line 78 -#: po/rc.cpp:124 ui_import.h:133 rc.cpp:124 -#, no-c-format -msgid "PAL" -msgstr "PAL" - -#. i18n: file ./lib/import/import.ui line 83 -#: po/rc.cpp:127 ui_import.h:134 rc.cpp:127 -#, no-c-format -msgid "NTSC" -msgstr "NTSC" - -#. i18n: file ./lib/import/menuEdit.ui line 13 -#: po/rc.cpp:133 ui_menuEdit.h:204 rc.cpp:133 -#, no-c-format -msgid "Edit Menu" -msgstr "Uredi meni" - -#. i18n: file ./lib/import/menuEdit.ui line 37 -#: po/rc.cpp:136 ui_menuEdit.h:205 rc.cpp:136 -#, no-c-format -msgid "Text" -msgstr "Tekst" - -#. i18n: file ./lib/import/menuEdit.ui line 53 -#: po/rc.cpp:139 ui_menuEdit.h:206 rc.cpp:139 -#, no-c-format -msgid "Background picture" -msgstr "Pozadinska slika" - -#. i18n: file ./lib/import/menuEdit.ui line 85 -#. i18n: file ./lib/main/prefAuthor.ui line 175 -#. i18n: file ./lib/import/menuEdit.ui line 85 -#. i18n: file ./lib/main/prefAuthor.ui line 175 -#: po/rc.cpp:142 po/rc.cpp:375 ui_menuEdit.h:208 ui_prefAuthor.h:207 -#: rc.cpp:142 rc.cpp:375 -#, fuzzy, no-c-format -msgid "Font" -msgstr "Format" - -#. i18n: file ./lib/import/menuEdit.ui line 99 -#: po/rc.cpp:145 ui_menuEdit.h:211 rc.cpp:145 -#, fuzzy, no-c-format -msgid "Bottom" -msgstr "Dugmići" - -#. i18n: file ./lib/import/menuEdit.ui line 104 -#: po/rc.cpp:148 ui_menuEdit.h:212 rc.cpp:148 -#, no-c-format -msgid "Right" -msgstr "" - -#. i18n: file ./lib/import/menuEdit.ui line 181 -#: po/rc.cpp:154 ui_menuEdit.h:217 rc.cpp:154 -#, no-c-format -msgid "At start" -msgstr "Na početak" - -#. i18n: file ./lib/import/menuEdit.ui line 192 -#: po/rc.cpp:157 ui_menuEdit.h:220 rc.cpp:157 -#, no-c-format -msgid "Play menu" -msgstr "Pusti meni" - -#. i18n: file ./lib/import/menuEdit.ui line 197 -#. i18n: file ./lib/import/menuEdit.ui line 226 -#. i18n: file ./lib/import/menuEdit.ui line 197 -#. i18n: file ./lib/import/menuEdit.ui line 226 -#: po/rc.cpp:160 po/rc.cpp:172 ui_menuEdit.h:221 ui_menuEdit.h:228 rc.cpp:160 -#: rc.cpp:172 -#, no-c-format -msgid "Play title 1" -msgstr "Pusti naslov 1" - -#. i18n: file ./lib/import/menuEdit.ui line 205 -#: po/rc.cpp:163 ui_menuEdit.h:223 rc.cpp:163 -#, no-c-format -msgid "At End" -msgstr "Na kraj" - -#. i18n: file ./lib/import/menuEdit.ui line 216 -#: po/rc.cpp:166 ui_menuEdit.h:226 rc.cpp:166 -#, no-c-format -msgid "Play root menu" -msgstr "Pusti glavni meni" - -#. i18n: file ./lib/import/menuEdit.ui line 221 -#: po/rc.cpp:169 ui_menuEdit.h:227 rc.cpp:169 -#, no-c-format -msgid "Play title menu" -msgstr "Pusti meni naslova" - -#. i18n: file ./lib/import/newTitle.ui line 63 -#: po/rc.cpp:181 ui_newTitle.h:186 rc.cpp:181 -#, no-c-format -msgid "number of chapters" -msgstr "broj poglavlja" - -#. i18n: file ./lib/import/newTitle.ui line 73 -#: po/rc.cpp:184 ui_newTitle.h:187 rc.cpp:184 -#, no-c-format -msgid "chapter length" -msgstr "dužina poglavlja" - -#. i18n: file ./lib/import/newTitle.ui line 140 -#. i18n: file ./lib/main/configDlg.ui line 129 -#. i18n: file ./lib/import/newTitle.ui line 140 -#. i18n: file ./lib/main/configDlg.ui line 129 -#: po/rc.cpp:187 po/rc.cpp:232 ui_configDlg.h:130 ui_newTitle.h:188 rc.cpp:187 -#: rc.cpp:232 -#, no-c-format -msgid "Add" -msgstr "" - -#. i18n: file ./lib/import/newTitle.ui line 174 -#: po/rc.cpp:190 ui_newTitle.h:190 rc.cpp:190 -#, no-c-format -msgid "Video file" -msgstr "Video datoteka" - -#. i18n: file ./lib/import/processList.ui line 20 -#: po/rc.cpp:199 ui_processList.h:74 rc.cpp:199 -#, fuzzy, no-c-format -msgid "Progression" -msgstr "k9DVD napredak" - -#. i18n: file ./lib/main/configDlg.ui line 20 -#: po/rc.cpp:217 ui_configDlg.h:111 rc.cpp:217 -#, no-c-format -#msgid "Devices" -#msgstr "Uređaji" - -#. i18n: file ./lib/main/configDlg.ui line 98 -#: po/rc.cpp:220 ui_configDlg.h:116 rc.cpp:220 -#, no-c-format -msgid "device" -msgstr "uređaj" - -#. i18n: file ./lib/main/configDlg.ui line 103 -#. i18n: file ./lib/main/prefMencoder.ui line 108 -#. i18n: file ./lib/main/prefMencoder.ui line 360 -#. i18n: file ./lib/main/configDlg.ui line 103 -#. i18n: file ./lib/main/prefMencoder.ui line 108 -#. i18n: file ./lib/main/prefMencoder.ui line 360 -#: po/rc.cpp:223 po/rc.cpp:443 po/rc.cpp:461 ui_configDlg.h:120 -#: ui_prefMencoder.h:419 ui_prefMencoder.h:429 rc.cpp:223 rc.cpp:443 -#: rc.cpp:461 -#, no-c-format -msgid "label" -msgstr "natpis" - -#. i18n: file ./lib/main/configDlg.ui line 108 -#: po/rc.cpp:226 ui_configDlg.h:124 rc.cpp:226 -#, no-c-format -msgid "Input" -msgstr "Ulaz" - -#. i18n: file ./lib/main/configDlg.ui line 148 -#: po/rc.cpp:235 ui_configDlg.h:132 rc.cpp:235 -#, no-c-format -msgid "Remove" -msgstr "" - -#. i18n: file ./lib/main/k9mainwsov.ui line 16 -#. i18n: file ./lib/main/k9mainw.ui line 25 -#. i18n: file ./lib/main/k9mainwsov.ui line 16 -#. i18n: file ./lib/main/k9mainw.ui line 25 -#: po/rc.cpp:238 po/rc.cpp:267 ui_k9mainw.h:180 rc.cpp:238 rc.cpp:267 -#, no-c-format -msgid "MainDlg" -msgstr "MainDlg" - -#. i18n: file ./lib/main/k9mainwsov.ui line 38 -#. i18n: file ./lib/main/k9mainw.ui line 121 -#. i18n: file ./lib/main/k9mainwsov.ui line 38 -#. i18n: file ./lib/main/k9mainw.ui line 121 -#: po/rc.cpp:241 po/rc.cpp:285 ui_k9mainw.h:186 rc.cpp:241 rc.cpp:285 -#, no-c-format -msgid "Output device " -msgstr "Izlazni uređaj " - -#. i18n: file ./lib/main/k9mainwsov.ui line 54 -#. i18n: file ./lib/main/k9mainw.ui line 153 -#. i18n: file ./lib/main/k9mainwsov.ui line 54 -#. i18n: file ./lib/main/k9mainw.ui line 153 -#: po/rc.cpp:244 po/rc.cpp:288 ui_k9mainw.h:187 rc.cpp:244 rc.cpp:288 -#, no-c-format -msgid "@" -msgstr "@" - -#. i18n: file ./lib/main/k9mainwsov.ui line 70 -#: po/rc.cpp:247 rc.cpp:247 -#, no-c-format -msgid "Input device " -msgstr "Ulazni uređaj " - -#. i18n: file ./lib/main/k9mainwsov.ui line 145 -#. i18n: file ./lib/main/k9mainw.ui line 187 -#. i18n: file ./lib/main/prefMPEG4.ui line 266 -#. i18n: file ./lib/main/k9mainwsov.ui line 145 -#. i18n: file ./lib/main/k9mainw.ui line 187 -#. i18n: file ./lib/main/prefMPEG4.ui line 266 -#: po/rc.cpp:253 po/rc.cpp:294 po/rc.cpp:509 ui_k9mainw.h:192 -#: ui_prefMPEG4.h:375 rc.cpp:253 rc.cpp:294 rc.cpp:509 -#, no-c-format -msgid "X" -msgstr "X" - -#. i18n: file ./lib/main/k9mainwsov.ui line 165 -#: po/rc.cpp:256 rc.cpp:256 -#, no-c-format -msgid "D&VD" -msgstr "&DVD" - -#. i18n: file ./lib/main/k9mainwsov.ui line 232 -#. i18n: file ./lib/main/k9mainw.ui line 213 -#. i18n: file ./lib/main/k9mainwsov.ui line 232 -#. i18n: file ./lib/main/k9mainw.ui line 213 -#: po/rc.cpp:259 po/rc.cpp:297 ui_k9mainw.h:193 rc.cpp:259 rc.cpp:297 -#, no-c-format -msgid "Title" -msgstr "Naslov" - -#. i18n: file ./lib/main/k9mainw.ui line 77 -#: po/rc.cpp:273 ui_k9mainw.h:182 rc.cpp:273 -#, no-c-format -msgid "Open a folder" -msgstr "Otvori fasciklu" - -#. i18n: file ./lib/main/k9mainw.ui line 87 -#: po/rc.cpp:279 ui_k9mainw.h:184 rc.cpp:279 -#, no-c-format -msgid "Open an iso image" -msgstr "Otvori iso odraz" - -#. i18n: file ./lib/main/k9mainw.ui line 223 -#: po/rc.cpp:303 ui_k9mainw.h:195 rc.cpp:303 -#, no-c-format -msgid "Content" -msgstr "Sadržaj" - -#. i18n: file ./lib/main/langselectw.ui line 47 -#: po/rc.cpp:309 ui_langselectw.h:61 rc.cpp:309 -#, no-c-format -msgid "Languages" -msgstr "Jezici" - -#. i18n: file ./lib/main/mencoderCmdGen.ui line 23 -#: po/rc.cpp:315 ui_mencoderCmdGen.h:107 rc.cpp:315 -#, no-c-format -msgid "1" -msgstr "" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 34 -#: po/rc.cpp:321 ui_playbackoptionsw.h:226 rc.cpp:321 -#, no-c-format -msgid "&Keep original menus" -msgstr "Zadrži originalne menije" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 37 -#. i18n: file ./lib/main/prefMPEG4.ui line 171 -#. i18n: file ./lib/main/playbackoptionsw.ui line 37 -#. i18n: file ./lib/main/prefMPEG4.ui line 171 -#: po/rc.cpp:324 po/rc.cpp:506 ui_playbackoptionsw.h:227 ui_prefMPEG4.h:373 -#: rc.cpp:324 rc.cpp:506 -#, no-c-format -msgid "Alt+K" -msgstr "Alt+K" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 184 -#: po/rc.cpp:327 ui_playbackoptionsw.h:230 rc.cpp:327 -#, no-c-format -msgid "Selected Titles" -msgstr "Izabrani naslovi" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 245 -#: po/rc.cpp:330 ui_playbackoptionsw.h:231 rc.cpp:330 -#, no-c-format -msgid "Default language" -msgstr "Podrazumevani jezik" - -#. i18n: file ./lib/main/playbackoptionsw.ui line 271 -#: po/rc.cpp:333 ui_playbackoptionsw.h:232 rc.cpp:333 -#, no-c-format -msgid "Subtitle" -msgstr "Prevod" - -#. i18n: file ./lib/main/prefAuthor.ui line 13 -#: po/rc.cpp:339 ui_prefAuthor.h:189 rc.cpp:339 -#, no-c-format -msgid "Authoring options" -msgstr "Opcije autorizacije" - -#. i18n: file ./lib/main/prefAuthor.ui line 26 -#: po/rc.cpp:345 ui_prefAuthor.h:193 rc.cpp:345 -#, no-c-format -msgid "AC3" -msgstr "AC3" - -#. i18n: file ./lib/main/prefAuthor.ui line 31 -#: po/rc.cpp:348 ui_prefAuthor.h:194 rc.cpp:348 -#, no-c-format -msgid "MP2" -msgstr "MP2" - -#. i18n: file ./lib/main/prefAuthor.ui line 40 -#: po/rc.cpp:351 ui_prefAuthor.h:198 rc.cpp:351 -#, no-c-format -msgid "128" -msgstr "128" - -#. i18n: file ./lib/main/prefAuthor.ui line 45 -#: po/rc.cpp:354 ui_prefAuthor.h:199 rc.cpp:354 -#, no-c-format -msgid "192" -msgstr "192" - -#. i18n: file ./lib/main/prefAuthor.ui line 50 -#: po/rc.cpp:357 ui_prefAuthor.h:200 rc.cpp:357 -#, no-c-format -msgid "320" -msgstr "320" - -#. i18n: file ./lib/main/prefAuthor.ui line 58 -#: po/rc.cpp:360 ui_prefAuthor.h:202 rc.cpp:360 -#, no-c-format -msgid "Format" -msgstr "Format" - -#. i18n: file ./lib/main/prefAuthor.ui line 113 -#: po/rc.cpp:366 ui_prefAuthor.h:204 rc.cpp:366 -#, no-c-format -msgid "Buttons" -msgstr "Dugmići" - -#. i18n: file ./lib/main/prefAuthor.ui line 119 -#. i18n: file ./lib/main/prefMPEG4.ui line 111 -#. i18n: file ./lib/main/prefAuthor.ui line 119 -#. i18n: file ./lib/main/prefMPEG4.ui line 111 -#: po/rc.cpp:369 po/rc.cpp:494 ui_prefAuthor.h:205 ui_prefMPEG4.h:368 -#: rc.cpp:369 rc.cpp:494 -#, fuzzy, no-c-format -msgid "Width" -msgstr "k9Widget" - -#. i18n: file ./lib/main/prefAuthor.ui line 145 -#. i18n: file ./lib/main/prefMPEG4.ui line 121 -#. i18n: file ./lib/main/prefAuthor.ui line 145 -#. i18n: file ./lib/main/prefMPEG4.ui line 121 -#: po/rc.cpp:372 po/rc.cpp:497 ui_prefAuthor.h:206 ui_prefMPEG4.h:369 -#: rc.cpp:372 rc.cpp:497 -#, no-c-format -msgid "Height" -msgstr "" - -#. i18n: file ./lib/main/prefAuthor.ui line 182 -#: po/rc.cpp:378 ui_prefAuthor.h:208 rc.cpp:378 -#, no-c-format -msgid "Hilite color" -msgstr "Boja isticanja" - -#. i18n: file ./lib/main/prefAuthor.ui line 199 -#: po/rc.cpp:381 ui_prefAuthor.h:210 rc.cpp:381 -#, no-c-format -msgid "Text color" -msgstr "Boja pisma" - -#. i18n: file ./lib/main/prefDVD.ui line 13 -#: po/rc.cpp:384 ui_prefDVD.h:138 rc.cpp:384 -#, no-c-format -msgid "prefDVD" -msgstr "postDVD" - -#. i18n: file ./lib/main/prefDVD.ui line 25 -#: po/rc.cpp:387 ui_prefDVD.h:139 rc.cpp:387 -#, no-c-format -msgid "Output directory" -msgstr "Izlazni direktorijum" - -#. i18n: file ./lib/main/prefDVD.ui line 45 -#: po/rc.cpp:390 ui_prefDVD.h:140 rc.cpp:390 -#, no-c-format -msgid "Burn with k3b" -msgstr "Upiši disk pomoću k3b-a" - -#. i18n: file ./lib/main/prefDVD.ui line 48 -#. i18n: file ./lib/main/prefMPEG4.ui line 344 -#. i18n: file ./lib/main/prefDVD.ui line 48 -#. i18n: file ./lib/main/prefMPEG4.ui line 344 -#: po/rc.cpp:393 po/rc.cpp:524 ui_prefDVD.h:141 ui_prefMPEG4.h:381 rc.cpp:393 -#: rc.cpp:524 -#, no-c-format -msgid "Alt+B" -msgstr "Alt+B" - -#. i18n: file ./lib/main/prefDVD.ui line 61 -#: po/rc.cpp:396 ui_prefDVD.h:142 rc.cpp:396 -#, no-c-format -msgid "Auto burn" -msgstr "Automatski upiši disk" - -#. i18n: file ./lib/main/prefDVD.ui line 64 -#: po/rc.cpp:399 ui_prefDVD.h:143 rc.cpp:399 -#, no-c-format -msgid "Alt+T" -msgstr "Alt+T" - -#. i18n: file ./lib/main/prefDVD.ui line 71 -#: po/rc.cpp:402 ui_prefDVD.h:144 rc.cpp:402 -#, no-c-format -msgid "DVD size" -msgstr "Veličina DVD-a" - -#. i18n: file ./lib/main/prefDVD.ui line 106 -#: po/rc.cpp:405 ui_prefDVD.h:145 rc.cpp:405 -#, no-c-format -msgid "Quick scan" -msgstr "Brzo skeniranje" - -#. i18n: file ./lib/main/prefDVD.ui line 109 -#: po/rc.cpp:408 ui_prefDVD.h:146 rc.cpp:408 -#, no-c-format -msgid "Alt+Q" -msgstr "Alt+Q" - -#. i18n: file ./lib/main/prefDVD.ui line 132 -#: po/rc.cpp:411 ui_prefDVD.h:147 rc.cpp:411 -#, no-c-format -msgid "use dvdAuthor for copy without menus" -msgstr "koristi dvdAuthor za kopije bez menija" - -#. i18n: file ./lib/main/prefDVD.ui line 135 -#: po/rc.cpp:414 ui_prefDVD.h:148 rc.cpp:414 -#, no-c-format -msgid "Alt+D" -msgstr "Alt+D" - -#. i18n: file ./lib/main/prefDVD.ui line 142 -#: po/rc.cpp:417 ui_prefDVD.h:149 rc.cpp:417 -#, no-c-format -msgid "Clear output directory on exit" -msgstr "Očisti izlazni direktorijum pri izlasku iz programa" - -#. i18n: file ./lib/main/prefDVD.ui line 145 -#: po/rc.cpp:420 ui_prefDVD.h:150 rc.cpp:420 -#, no-c-format -msgid "Alt+Y" -msgstr "Alt+Y" - -#. i18n: file ./lib/main/prefMencoder.ui line 13 -#. i18n: file ./lib/main/prefMPEG4.ui line 13 -#. i18n: file ./lib/main/prefpreview.ui line 13 -#. i18n: file ./lib/main/prefMencoder.ui line 13 -#. i18n: file ./lib/main/prefMPEG4.ui line 13 -#. i18n: file ./lib/main/prefpreview.ui line 13 -#: po/rc.cpp:423 po/rc.cpp:470 po/rc.cpp:557 ui_prefMencoder.h:407 -#: ui_prefMPEG4.h:357 ui_prefpreview.h:206 rc.cpp:423 rc.cpp:470 rc.cpp:557 -#, no-c-format -msgid "Form1" -msgstr "Form1" - -#. i18n: file ./lib/main/prefMencoder.ui line 37 -#: po/rc.cpp:426 ui_prefMencoder.h:408 rc.cpp:426 -#, no-c-format -msgid "" -"$PASS\n" -"$WIDTH\n" -"$HEIGHT\n" -"$VIDBR\n" -"$AUDBR" -msgstr "" -"$PASS\n" -"$WIDTH\n" -"$HEIGHT\n" -"$VIDBR\n" -"$AUDBR" - -#. i18n: file ./lib/main/prefMencoder.ui line 57 -#: po/rc.cpp:433 ui_prefMencoder.h:413 rc.cpp:433 -#, no-c-format -msgid "" -"pass number\n" -"video width\n" -"video height\n" -"video bitrate\n" -"audio bitrate" -msgstr "" -"broj prolaza\n" -"širina videa\n" -"vidina videa\n" -"bitski protok videa\n" -"bitski protok zvuka" - -#. i18n: file ./lib/main/prefMencoder.ui line 70 -#: po/rc.cpp:440 ui_prefMencoder.h:428 rc.cpp:440 -#, no-c-format -msgid "Video codecs" -msgstr "Video kodeci" - -#. i18n: file ./lib/main/prefMencoder.ui line 121 -#: po/rc.cpp:446 ui_prefMencoder.h:420 rc.cpp:446 -#, no-c-format -msgid "fourcc" -msgstr "fourcc" - -#. i18n: file ./lib/main/prefMencoder.ui line 131 -#: po/rc.cpp:449 ui_prefMencoder.h:421 rc.cpp:449 -#, no-c-format -msgid "first pass" -msgstr "prvi prolaz" - -#. i18n: file ./lib/main/prefMencoder.ui line 233 -#: po/rc.cpp:452 ui_prefMencoder.h:424 rc.cpp:452 -#, no-c-format -msgid "one pass" -msgstr "jedan prolaz" - -#. i18n: file ./lib/main/prefMencoder.ui line 301 -#: po/rc.cpp:455 ui_prefMencoder.h:427 rc.cpp:455 -#, no-c-format -msgid "second pass" -msgstr "drugi prolaz" - -#. i18n: file ./lib/main/prefMencoder.ui line 322 -#: po/rc.cpp:458 ui_prefMencoder.h:432 rc.cpp:458 -#, no-c-format -msgid "Audio codecs" -msgstr "Zvučni kodek" - -#. i18n: file ./lib/main/prefMencoder.ui line 427 -#: po/rc.cpp:464 ui_prefMencoder.h:431 rc.cpp:464 -#, no-c-format -msgid "options" -msgstr "opcije" - -#. i18n: file ./lib/main/prefMencoder.ui line 453 -#: po/rc.cpp:467 ui_prefMencoder.h:433 rc.cpp:467 -#, no-c-format -msgid "Available variables" -msgstr "Dostupne promenjljive" - -#. i18n: file ./lib/main/prefMPEG4.ui line 57 -#: po/rc.cpp:473 ui_prefMPEG4.h:382 rc.cpp:473 -#, no-c-format -msgid "Video" -msgstr "Video" - -#. i18n: file ./lib/main/prefMPEG4.ui line 63 -#: po/rc.cpp:476 ui_prefMPEG4.h:359 rc.cpp:476 -#, no-c-format -msgid "2 pass" -msgstr "2 prolaza" - -#. i18n: file ./lib/main/prefMPEG4.ui line 66 -#: po/rc.cpp:479 ui_prefMPEG4.h:360 rc.cpp:479 -#, no-c-format -msgid "Alt+2" -msgstr "Alt+2" - -#. i18n: file ./lib/main/prefMPEG4.ui line 73 -#. i18n: file ./lib/main/prefMPEG4.ui line 403 -#. i18n: file ./lib/main/prefMPEG4.ui line 73 -#. i18n: file ./lib/main/prefMPEG4.ui line 403 -#: po/rc.cpp:482 po/rc.cpp:530 ui_prefMPEG4.h:361 ui_prefMPEG4.h:383 -#: rc.cpp:482 rc.cpp:530 -#, no-c-format -msgid "Codec" -msgstr "Kodek" - -#. i18n: file ./lib/main/prefMPEG4.ui line 93 -#: po/rc.cpp:485 ui_prefMPEG4.h:364 rc.cpp:485 -#, no-c-format -msgid "XviD" -msgstr "Xvid" - -#. i18n: file ./lib/main/prefMPEG4.ui line 98 -#: po/rc.cpp:488 ui_prefMPEG4.h:365 rc.cpp:488 -#, no-c-format -msgid "lavc MPEG4" -msgstr "lavc MPEG4" - -#. i18n: file ./lib/main/prefMPEG4.ui line 103 -#: po/rc.cpp:491 ui_prefMPEG4.h:366 rc.cpp:491 -#, no-c-format -msgid "x264" -msgstr "x264" - -#. i18n: file ./lib/main/prefMPEG4.ui line 152 -#: po/rc.cpp:500 ui_prefMPEG4.h:371 rc.cpp:500 -#, no-c-format -msgid "640" -msgstr "640" - -#. i18n: file ./lib/main/prefMPEG4.ui line 168 -#: po/rc.cpp:503 ui_prefMPEG4.h:372 rc.cpp:503 -#, no-c-format -msgid "&keep aspect ratio" -msgstr "&zadrži razmeru" - -#. i18n: file ./lib/main/prefMPEG4.ui line 297 -#: po/rc.cpp:512 ui_prefMPEG4.h:377 rc.cpp:512 -#, no-c-format -msgid "File size" -msgstr "Veličina datoteke" - -#. i18n: file ./lib/main/prefMPEG4.ui line 300 -#: po/rc.cpp:515 ui_prefMPEG4.h:378 rc.cpp:515 -#, no-c-format -msgid "Alt+S" -msgstr "Alt+S" - -#. i18n: file ./lib/main/prefMPEG4.ui line 322 -#: po/rc.cpp:518 ui_prefMPEG4.h:379 rc.cpp:518 -#, no-c-format -msgid " MB" -msgstr " MB" - -#. i18n: file ./lib/main/prefMPEG4.ui line 420 -#: po/rc.cpp:533 ui_prefMPEG4.h:386 rc.cpp:533 -#, no-c-format -msgid "mp3" -msgstr "mp3" - -#. i18n: file ./lib/main/prefMPEG4.ui line 425 -#: po/rc.cpp:536 ui_prefMPEG4.h:387 rc.cpp:536 -#, no-c-format -msgid "faac" -msgstr "faac" - -#. i18n: file ./lib/main/prefMPEG4.ui line 430 -#: po/rc.cpp:539 ui_prefMPEG4.h:388 rc.cpp:539 -#, no-c-format -msgid "mp2" -msgstr "mp2" - -#. i18n: file ./lib/main/prefMPEG4.ui line 435 -#: po/rc.cpp:542 ui_prefMPEG4.h:389 rc.cpp:542 -#, no-c-format -msgid "ac3" -msgstr "ac3" - -#. i18n: file ./lib/main/prefMPEG4.ui line 440 -#: po/rc.cpp:545 ui_prefMPEG4.h:390 rc.cpp:545 -#, no-c-format -msgid "adpcm ima" -msgstr "adpcm ima" - -#. i18n: file ./lib/main/prefMPEG4.ui line 512 -#: po/rc.cpp:551 ui_prefMPEG4.h:394 rc.cpp:551 -#, no-c-format -msgid "Gain" -msgstr "Pojačanje" - -#. i18n: file ./lib/main/prefMPEG4.ui line 542 -#: po/rc.cpp:554 ui_prefMPEG4.h:396 rc.cpp:554 -#, no-c-format -msgid "use cell cache" -msgstr "koristi keš ćelije" - -#. i18n: file ./lib/main/prefpreview.ui line 34 -#: po/rc.cpp:560 ui_prefpreview.h:208 rc.cpp:560 -#, no-c-format -msgid "&Internal Player" -msgstr "Integrisani pregledač" - -#. i18n: file ./lib/main/prefpreview.ui line 37 -#: po/rc.cpp:563 ui_prefpreview.h:209 rc.cpp:563 -#, no-c-format -msgid "Alt+I" -msgstr "Alt+I" - -#. i18n: file ./lib/main/prefpreview.ui line 44 -#: po/rc.cpp:566 ui_prefpreview.h:210 rc.cpp:566 -#, fuzzy, no-c-format -msgid "MPlayer" -msgstr "K9Mplayer" - -#. i18n: file ./lib/main/prefpreview.ui line 47 -#: po/rc.cpp:569 ui_prefpreview.h:211 rc.cpp:569 -#, no-c-format -msgid "Alt+M" -msgstr "Alt+M" - -#. i18n: file ./lib/main/prefpreview.ui line 109 -#: po/rc.cpp:572 ui_prefpreview.h:212 rc.cpp:572 -#, no-c-format -msgid "Internal viewer options" -msgstr "Opcije integrisanog pregledača" - -#. i18n: file ./lib/main/prefpreview.ui line 119 -#: po/rc.cpp:575 ui_prefpreview.h:213 rc.cpp:575 -#, no-c-format -msgid "use OpenGL" -msgstr "koristi OpenGL" - -#. i18n: file ./lib/main/prefpreview.ui line 154 -#: po/rc.cpp:578 ui_prefpreview.h:214 rc.cpp:578 -#, no-c-format -msgid "Video output" -msgstr "Video izlaz" - -#. i18n: file ./lib/main/prefpreview.ui line 170 -#: po/rc.cpp:581 ui_prefpreview.h:215 rc.cpp:581 -#, no-c-format -msgid "Audio output" -msgstr "Zvučni izlaz" - -#. i18n: file ./lib/main/prefpreview.ui line 181 -#: po/rc.cpp:584 ui_prefpreview.h:218 rc.cpp:584 -#, no-c-format -msgid "X11" -msgstr "X11" - -#. i18n: file ./lib/main/prefpreview.ui line 186 -#: po/rc.cpp:587 ui_prefpreview.h:219 rc.cpp:587 -#, no-c-format -msgid "Xv" -msgstr "Xv" - -#. i18n: file ./lib/main/prefpreview.ui line 191 -#: po/rc.cpp:590 ui_prefpreview.h:220 rc.cpp:590 -#, no-c-format -msgid "OpenGL" -msgstr "OpenGL" - -#. i18n: file ./lib/main/prefpreview.ui line 196 -#. i18n: file ./lib/main/prefpreview.ui line 221 -#. i18n: file ./lib/main/prefpreview.ui line 196 -#. i18n: file ./lib/main/prefpreview.ui line 221 -#: po/rc.cpp:593 po/rc.cpp:602 ui_prefpreview.h:221 ui_prefpreview.h:227 -#: rc.cpp:593 rc.cpp:602 -#, no-c-format -msgid "SDL" -msgstr "SDL" - -#. i18n: file ./lib/main/prefpreview.ui line 211 -#: po/rc.cpp:596 ui_prefpreview.h:225 rc.cpp:596 -#, no-c-format -msgid "ALSA" -msgstr "ALSA" - -#. i18n: file ./lib/main/prefpreview.ui line 216 -#: po/rc.cpp:599 ui_prefpreview.h:226 rc.cpp:599 -#, no-c-format -msgid "OSS" -msgstr "OSS" - -#. i18n: file ./lib/main/prefpreview.ui line 267 -#: po/rc.cpp:605 ui_prefpreview.h:229 rc.cpp:605 -#, no-c-format -msgid "MPlayer options" -msgstr "MPlayer opcije" - -#. i18n: file ./lib/main/titlefactor.ui line 13 -#: po/rc.cpp:608 ui_titlefactor.h:116 rc.cpp:608 -#, no-c-format -msgid "Shrink Factors" -msgstr "Faktori suženja" - -#. i18n: file ./lib/main/titlefactor.ui line 40 -#: po/rc.cpp:611 ui_titlefactor.h:117 rc.cpp:611 -#, no-c-format -msgid "Shrink Factor for Title %1" -msgstr "Faktor suženja za naslov %1" - -#. i18n: file ./lib/main/titlefactor.ui line 56 -#: po/rc.cpp:614 ui_titlefactor.h:118 rc.cpp:614 -#, no-c-format -msgid "Change Factor" -msgstr "Promeni faktor" - -#. i18n: file ./lib/main/titlefactor.ui line 92 -#: po/rc.cpp:617 ui_titlefactor.h:119 rc.cpp:617 -#, no-c-format -msgid "0.00" -msgstr "0.00" - -#. i18n: file ./lib/main/viewmpeg2.ui line 31 -#: po/rc.cpp:620 ui_viewmpeg2.h:133 rc.cpp:620 -#, no-c-format -msgid "Title Preview" -msgstr "Pregled naslova" - -#. i18n: file ./lib/mplayer/mplayer.ui line 54 -#: po/rc.cpp:629 ui_mplayer.h:244 rc.cpp:629 -#, no-c-format -msgid "Subpicture" -msgstr "Prevod" - -#. i18n: file ./lib/mplayer/mplayer.ui line 271 -#: po/rc.cpp:632 ui_mplayer.h:249 rc.cpp:632 -#, no-c-format -msgid "-" -msgstr "-" - -#. i18n: file ./lib/mplayer/mplayer.ui line 391 -#: po/rc.cpp:635 ui_mplayer.h:251 rc.cpp:635 -#, no-c-format -msgid "+" -msgstr "+" - -#. i18n: file ./prefs_base.ui line 16 -#: po/rc.cpp:638 rc.cpp:638 -#, fuzzy, no-c-format -msgid "Background color:" -msgstr "Pozadinska slika" - -#. i18n: file ./prefs_base.ui line 26 -#: po/rc.cpp:641 rc.cpp:641 -#, no-c-format -msgid "Choose a new background color" -msgstr "" - -#. i18n: file ./prefs_base.ui line 32 -#: po/rc.cpp:644 rc.cpp:644 -#, no-c-format -msgid "" -"\n" -"

Change the background color by clicking here and choose the " -"new color in the color dialog.

" -msgstr "" - -#. i18n: file ./prefs_base.ui line 42 -#: po/rc.cpp:650 rc.cpp:650 -#, no-c-format -msgid "Project age:" -msgstr "" - -#. i18n: file ./prefs_base.ui line 52 -#: po/rc.cpp:653 rc.cpp:653 -#, no-c-format -msgid "Foreground color:" -msgstr "" - -#. i18n: file ./prefs_base.ui line 62 -#: po/rc.cpp:656 rc.cpp:656 -#, no-c-format -msgid "Choose a new foreground color" -msgstr "" - -#. i18n: file ./prefs_base.ui line 68 -#: po/rc.cpp:659 rc.cpp:659 -#, no-c-format -msgid "" -"\n" -"

Change the foreground color by clicking here and choose the " -"new color in the color dialog.

" -msgstr "" - -#. i18n: file ./prefs_base.ui line 110 -#: po/rc.cpp:665 rc.cpp:665 -#, no-c-format -msgid "Set the project age (in days)" -msgstr "" - -#. i18n: file ./prefs_base.ui line 113 -#: po/rc.cpp:668 rc.cpp:668 -#, no-c-format -msgid "Change the project age (in days) by choosing a new number of days." -msgstr "" - -#: po/rc.cpp:669 rc.cpp:669 -msgctxt "NAME OF TRANSLATORS" -msgid "Your names" -msgstr "" - -#: po/rc.cpp:670 rc.cpp:670 -msgctxt "EMAIL OF TRANSLATORS" -msgid "Your emails" -msgstr "" - -#~ msgid "lavc" -#~ msgstr "lavc" - -#~ msgid "xvid" -#~ msgstr "xvid" - -#~ msgid "MJPEG" -#~ msgstr "MJPEG" - -#~ msgid "LJPEG" -#~ msgstr "LJPEG" - -#~ msgid "H.261" -#~ msgstr "H.261" - -#~ msgid "H.263" -#~ msgstr "H.263" - -#~ msgid "MPEG-4 (DivX 4/5)" -#~ msgstr "MPEG-4 (DivX 4/5)" - -#~ msgid "DivX 3" -#~ msgstr "DivX 3" - -#~ msgid "MS MPEG-4 v2" -#~ msgstr "MS MPEG-4 v2" - -#~ msgid "WMV7" -#~ msgstr "WMV7" - -#~ msgid "WMV8" -#~ msgstr "WMV8" - -#~ msgid "RealVideo" -#~ msgstr "RealVideo" - -#~ msgid "MPEG-1" -#~ msgstr "MPEG-1" - -#~ msgid "MPEG-2" -#~ msgstr "MPEG-2" - -#~ msgid "HuffYUV" -#~ msgstr "HuffYUV" - -#~ msgid "ffvHuff" -#~ msgstr "ffvHuff" - -#~ msgid "ASUS v1" -#~ msgstr "ASUS v1" - -#~ msgid "ASUS v2" -#~ msgstr "ASUS v2" - -#~ msgid "New Item" -#~ msgstr "Nova stavka" - -#~ msgid "k9Ifo2" -#~ msgstr "k9Ifo2" - -#~ msgid "k9ChapterCell" -#~ msgstr "k9 ćelija sa poglavljem" - -#~ msgid "k9DVDChapter" -#~ msgstr "k9DVD poglavlje" - -#~ msgid "k9BurnDVD" -#~ msgstr "k9 upis DVD-a" - -#~ msgid "k9DVD" -#~ msgstr "k9DVD" - -#~ msgid "k9DVDVideoStream" -#~ msgstr "k9DVD video tok" - -#~ msgid "k9DVDAudioStream" -#~ msgstr "k9DVD zvučni tok" - -#~ msgid "k9DVDSubtitle" -#~ msgstr "k9DVD prevod" - -#~ msgid "k9DVDTitle" -#~ msgstr "k9DVD naslov" - -#~ msgid "k9DVDTitleset" -#~ msgstr "k9DVD niz naslova" - -#~ msgid "k9DVDAuthor" -#~ msgstr "k9DVD autor" - -#~ msgid "k9DVDSize" -#~ msgstr "k9DVD veličina" - -#~ msgid "Menu Preview" -#~ msgstr "pregled menija" - -#~ msgid "kCDDrive" -#~ msgstr "kCD uređaj" - -#~ msgid "kCDDrives" -#~ msgstr "kCD uređaji" - -#~ msgid "kViewMPEG2" -#~ msgstr "kViewMPEG2" - -#~ msgid "kDecMPEG2" -#~ msgstr "kDecMPEG2" - -#~ msgid "A DVD Backup tool for KDE" -#~ msgstr "Alat za pravljenje DVD rezervnih kopija u KDE okruženju" - -#~ msgid "for internal use" -#~ msgstr "za unutarnju upotrebu" - -#~ msgid "MPEG4 Encoding options" -#~ msgstr "Opcije MPEG4 kodiranja" - -#~ msgid "" -#~ "Insuffisant disk space on %1\n" -#~ "%2 mb expected." -#~ msgstr "" -#~ "Nedovoljno mesta na disku u %1\n" -#~ "%2 MB očekivano" - -#~ msgid "processing" -#~ msgstr "obrada" - -#~ msgid "Create new DVD" -#~ msgstr "Napravi novi DVD" diff -Nru k9copy-2.1.0/po/sr@Latn.po k9copy-2.2.0/po/sr@Latn.po --- k9copy-2.1.0/po/sr@Latn.po 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/po/sr@Latn.po 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,2580 @@ +# Serbian translation of k9copy +# Courtesy of Prevod.org team (http://prevod.org/) -- 2006, 2007. +# +# This file is distributed under the same license as the k9copy package. +# +# Miloš Popović +# +msgid "" +msgstr "" +"Project-Id-Version: k9copy\n" +"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?" +"group_id=50231&atid=459007\n" +"POT-Creation-Date: 2007-12-22 09:01+0100\n" +"PO-Revision-Date: 2007-08-15 11:15+0100\n" +"Last-Translator: Miloš Popović \n" +"Language-Team: Serbian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: lib/backup/k9dvdauthor.cpp:148 lib/backup/k9dvdauthor.cpp:395 +msgid "'%1' not selected" +msgstr "'%1' nije izabran" + +#: lib/backup/k9dvdauthor.cpp:149 lib/backup/k9dvdauthor.cpp:396 +#: lib/backup/k9dvdauthor.cpp:419 lib/backup/k9dvdauthor.cpp:473 +#: lib/backup/k9dvdauthor.cpp:482 lib/backup/k9dvdauthor.cpp:485 +#: lib/core/k9burndvd.cpp:242 lib/core/k9burndvd.cpp:326 +#: lib/import/k9newdvd.cpp:123 +msgid "authoring" +msgstr "autorizujem" + +#: lib/backup/k9dvdauthor.cpp:419 lib/backup/k9mp4enc.cpp:107 +#: lib/core/k9burndvd.cpp:230 lib/core/k9burndvd.cpp:314 +#: lib/mplayer/k9mplayer.cpp:99 +msgid "Unable to run %1" +msgstr "Ne mogu da pokrenem %1" + +#: lib/backup/k9dvdauthor.cpp:432 lib/backup/k9dvdauthor.cpp:513 +#: lib/backup/k9dvdauthor.cpp:551 lib/import/k9newdvd.cpp:144 +msgid "Authoring" +msgstr "Autorizujem" + +#. i18n: file ./lib/backup/backupdlg.ui line 41 +#: lib/backup/k9dvdauthor.cpp:433 po/rc.cpp:12 ui_backupdlg.h:239 rc.cpp:12 +#, no-c-format +msgid "Backup progression" +msgstr "Napredak pravljenja kopije" + +#: lib/backup/k9dvdauthor.cpp:473 +msgid "Dvdauthor error :\n" +msgstr "Greška u programu Dvdauthor :\n" + +#: lib/backup/k9dvdauthor.cpp:482 +msgid "Authoring cancelled" +msgstr "Autorizacija prekinuta" + +#: lib/backup/k9dvdauthor.cpp:485 lib/import/k9newdvd.cpp:137 +msgid "An error occured while running DVDAuthor:\n" +msgstr "Greška je nastala pri radu sa DVDAuthor:\n" + +#: lib/backup/k9dvdauthor.cpp:552 +msgid "Fixing VOBUS" +msgstr "Popravljanje VOBUS" + +#: lib/backup/k9dvdbackup.cpp:152 lib/backup/k9dvdbackup.cpp:166 +#: lib/backup/k9dvdbackup.cpp:518 lib/backup/k9dvdbackup.cpp:604 +msgid "DVD backup cancelled" +msgstr "Pravljenje DVD rezervne kopije prekinuto" + +#: lib/backup/k9dvdbackup.cpp:179 +msgid "unable to open VIDEO_TS.IFO" +msgstr "Ne mogu da otvorim VIDEO_TS.IFO" + +#: lib/backup/k9dvdbackup.cpp:201 lib/backup/k9dvdbackup.cpp:384 +#: lib/backup/k9dvdbackup.cpp:449 +msgid "Unable to open file " +msgstr "Ne mogu da otvorim datoteku " + +#: lib/backup/k9dvdbackup.cpp:280 +msgid "Unable to open titleset %1" +msgstr "Ne mogu da otvorim niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:286 lib/backup/k9dvdbackup.cpp:576 +msgid "Extracting titleset %1" +msgstr "Čupam niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:456 +msgid "Unable to open menu for titleset %1" +msgstr "Ne mogu da otvorim meni za niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:482 +msgid "Extracting menu for titleset %1" +msgstr "Čupam meni za niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:568 +msgid "Unable to open ifo file for titleset %1" +msgstr "Ne mogu da otvorim ifo datoteku za niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:580 lib/backup/k9dvdbackup.cpp:1701 +msgid "Unable to open DVD" +msgstr "Ne mogu da otvorim DVD" + +#: lib/backup/k9dvdbackup.cpp:590 +msgid "Unable to open vobs for titleset %1" +msgstr "Ne mogu da otvorim vob-ove za niz naslova %1" + +#: lib/backup/k9dvdbackup.cpp:1388 +msgid "Updating vob %1" +msgstr "Ažuriram vob %1" + +#: lib/backup/k9dvdbackup.cpp:1405 +msgid "DVD backup canceled" +msgstr "Pravljenje rezervne kopije prekinuto" + +#: lib/backup/k9mp4enc.cpp:107 lib/backup/k9mp4enc.cpp:325 +msgid "Encoding error" +msgstr "Greška u kodiranju" + +#: lib/backup/k9mp4enc.cpp:163 lib/main/k9main.cpp:1160 +msgid "Save file to disk" +msgstr "Sačuvaj datoteku na disk" + +#: lib/backup/k9mp4enc.cpp:172 lib/backup/k9mp4enc.cpp:363 +#: lib/main/k9main.cpp:565 lib/main/k9main.cpp:679 lib/main/k9main.cpp:695 +#: lib/main/k9mp4title.cpp:50 lib/main/k9prefdvd.cpp:36 +#: lib/main/k9prefmpeg4.cpp:35 +msgid "MB" +msgstr "MB" + +#: lib/backup/k9mp4enc.cpp:244 lib/backup/k9mp4enc.cpp:246 +#: lib/import/k9newdvd.cpp:252 +msgid "Encoding %1" +msgstr "Kodiranje %1" + +#: lib/backup/k9mp4enc.cpp:244 +msgid "pass %1" +msgstr "prolaz %1" + +#: lib/backup/k9mp4enc.cpp:322 +msgid "MPEG-4 Encoding cancelled" +msgstr "MPEG-4 kodiranje prekinuto" + +#: lib/backup/k9mp4enc.cpp:322 lib/main/k9main.cpp:1146 +#: lib/main/k9settings.cpp:44 +msgid "MPEG-4 Encoding" +msgstr "MPEG-4 kodiranje" + +#: lib/backup/k9mp4enc.cpp:325 +msgid "Error while running mencoder :" +msgstr "Greška pri pokretanju programa mencoder :" + +#. i18n: file ./lib/main/k9mainwsov.ui line 76 +#. i18n: file ./lib/main/k9mainw.ui line 173 +#. i18n: file ./lib/main/k9mainwsov.ui line 76 +#. i18n: file ./lib/main/k9mainw.ui line 173 +#: lib/core/k9burndvd.cpp:175 lib/core/k9burndvd.cpp:283 +#: lib/import/k9import.cpp:209 lib/main/k9main.cpp:1353 +#: lib/main/k9playbackoptions.cpp:147 po/rc.cpp:250 po/rc.cpp:291 +#: ui_k9mainw.h:190 rc.cpp:250 rc.cpp:291 +#, no-c-format +msgid "default" +msgstr "podrazumevano" + +#: lib/core/k9burndvd.cpp:185 lib/core/k9burndvd.cpp:260 +#msgid "Burning DVD" +#msgstr "Upis DVD diska" + +#: lib/core/k9burndvd.cpp:186 lib/core/k9burndvd.cpp:261 +#: lib/core/k9burndvd.cpp:353 lib/main/k9main.cpp:428 +msgid "Burning DVD" +msgstr "Upisivanje DVD diska" + +#: lib/core/k9burndvd.cpp:197 lib/core/k9burndvd.cpp:289 +#: lib/import/k9import.cpp:181 lib/main/k9main.cpp:379 +msgid "Save image to disk" +msgstr "Sačuvaj sliku na disk" + +#: lib/core/k9burndvd.cpp:220 lib/core/k9burndvd.cpp:307 +msgid "Insert a recordable DVD" +msgstr "Ubacite upisiv DVD disk" + +#: lib/core/k9burndvd.cpp:220 lib/core/k9burndvd.cpp:230 +#: lib/core/k9burndvd.cpp:235 lib/core/k9burndvd.cpp:308 +#: lib/core/k9burndvd.cpp:314 lib/core/k9burndvd.cpp:319 +msgid "DVD burning" +msgstr "Upisivanje DVD diska" + +#: lib/core/k9burndvd.cpp:230 lib/core/k9burndvd.cpp:314 +msgid "Error burning DVD :\n" +msgstr "Greška pri upisu na DVD :\n" + +#: lib/core/k9burndvd.cpp:235 lib/core/k9burndvd.cpp:319 +msgid "DVD Burning finished" +msgstr "Upisivanje DVD diska završeno" + +#: lib/core/k9burndvd.cpp:241 lib/core/k9burndvd.cpp:325 +msgid "An error occured while Burning DVD: %1" +msgstr "Pojavila se greška pri upisivanju DVD diska: %1" + +#: lib/core/k9burndvd.cpp:241 lib/core/k9burndvd.cpp:325 +msgid "Insert an other DVD" +msgstr "Ubacite drugi DVD" + +#: lib/core/k9burndvd.cpp:354 +msgid "Current write speed :%1 x" +msgstr "Trenutna brzina upisa :%1 x" + +#: lib/core/k9dvd.cpp:133 +msgid "for visually impaired" +msgstr "za osobe sa oštećenim vidom" + +#: lib/core/k9dvd.cpp:134 +msgid "director's comments" +msgstr "komentar režisera" + +#: lib/core/k9dvd.cpp:135 +msgid "alternate director's comments" +msgstr "dodatni komentar režisera" + +#: lib/core/k9dvd.cpp:139 +msgid "Large" +msgstr "Veliko" + +#: lib/core/k9dvd.cpp:140 +msgid "Children" +msgstr "Deca" + +#: lib/core/k9dvd.cpp:141 lib/core/k9dvd.cpp:147 lib/core/k9dvd.cpp:148 +#: lib/core/k9dvd.cpp:149 +msgid "reserved" +msgstr "očivano" + +#: lib/core/k9dvd.cpp:142 +msgid "Normal captions" +msgstr "Normalna slova" + +#: lib/core/k9dvd.cpp:143 +msgid "Large captions" +msgstr "Velika slova" + +#: lib/core/k9dvd.cpp:144 +msgid "Children captions" +msgstr "Mala slova" + +#: lib/core/k9dvd.cpp:146 +msgid "Forced" +msgstr "Primorano" + +#: lib/core/k9dvd.cpp:150 +msgid "Director's comments" +msgstr "Režiserov komentar" + +#: lib/core/k9dvd.cpp:151 +msgid "Large director's comments" +msgstr "Dugi režiserov komentar" + +#: lib/core/k9dvd.cpp:152 +msgid "Director's comments for children" +msgstr "Režiserov komentar za decu" + +#: lib/core/k9dvd.cpp:202 +msgid "Couldn't open %1 for title\n" +msgstr "Ne mogu da otvorim %1 za naslov\n" + +#: lib/core/k9dvd.cpp:204 lib/core/k9dvd.cpp:212 lib/core/k9dvd.cpp:220 +#: lib/core/k9dvd.cpp:381 lib/main/k9main.cpp:536 +msgid "unknown" +msgstr "nepoznato" + +#: lib/core/k9dvd.cpp:210 +msgid "Couldn't seek in %1 for title\n" +msgstr "Ne mogu da tragam u %1 za naslov\n" + +#: lib/core/k9dvd.cpp:237 +msgid "Not Specified" +msgstr "Nije određeno" + +#: lib/core/k9dvd.cpp:237 +msgid "Afar" +msgstr "afarski" + +#: lib/core/k9dvd.cpp:237 +msgid "Abkhazian" +msgstr "abhazijski" + +#: lib/core/k9dvd.cpp:237 +msgid "Afrikaans" +msgstr "afrički" + +#: lib/core/k9dvd.cpp:237 +msgid "Amharic" +msgstr "amharski" + +#: lib/core/k9dvd.cpp:238 +msgid "Arabic" +msgstr "arapski" + +#: lib/core/k9dvd.cpp:238 +msgid "Assamese" +msgstr "asameški" + +#: lib/core/k9dvd.cpp:238 +msgid "Aymara" +msgstr "ajmarski" + +#: lib/core/k9dvd.cpp:238 +msgid "Azerbaijani" +msgstr "azerbejdžanski" + +#: lib/core/k9dvd.cpp:238 +msgid "Bashkir" +msgstr "baškirski" + +#: lib/core/k9dvd.cpp:239 +msgid "Byelorussian" +msgstr "beloruski" + +#: lib/core/k9dvd.cpp:239 +msgid "Bulgarian" +msgstr "bugarski" + +#: lib/core/k9dvd.cpp:239 +msgid "Bihari" +msgstr "biharski" + +#: lib/core/k9dvd.cpp:239 +msgid "Bislama" +msgstr "bislamski" + +#: lib/core/k9dvd.cpp:239 +msgid "Bengali; Bangla" +msgstr "bengali" + +#: lib/core/k9dvd.cpp:240 +msgid "Tibetan" +msgstr "tibetanski" + +#: lib/core/k9dvd.cpp:240 +msgid "Breton" +msgstr "bretonski" + +#: lib/core/k9dvd.cpp:240 +msgid "Catalan" +msgstr "katalonski" + +#: lib/core/k9dvd.cpp:240 +msgid "Corsican" +msgstr "korzikanski" + +#: lib/core/k9dvd.cpp:240 +msgid "Czech" +msgstr "češki" + +#: lib/core/k9dvd.cpp:241 +msgid "Welsh" +msgstr "velški" + +#: lib/core/k9dvd.cpp:241 +msgid "Dansk" +msgstr "danski" + +#: lib/core/k9dvd.cpp:241 +msgid "Deutsch" +msgstr "nemački" + +#: lib/core/k9dvd.cpp:241 +#, fuzzy +msgid "Bhutani" +msgstr "biharski" + +#: lib/core/k9dvd.cpp:241 +msgid "Greek" +msgstr "grčki" + +#: lib/core/k9dvd.cpp:241 +msgid "English" +msgstr "engleski" + +#: lib/core/k9dvd.cpp:242 +msgid "Esperanto" +msgstr "esperanto" + +#: lib/core/k9dvd.cpp:242 +msgid "Espanol" +msgstr "španjolski" + +#: lib/core/k9dvd.cpp:242 +msgid "Estonian" +msgstr "estonski" + +#: lib/core/k9dvd.cpp:242 +msgid "Basque" +msgstr "baskijski" + +#: lib/core/k9dvd.cpp:242 +msgid "Persian" +msgstr "persijski" + +#: lib/core/k9dvd.cpp:243 +msgid "Suomi" +msgstr "" + +#: lib/core/k9dvd.cpp:243 +msgid "Fiji" +msgstr "fidži" + +#: lib/core/k9dvd.cpp:243 +msgid "Faroese" +msgstr "faroski" + +#: lib/core/k9dvd.cpp:243 +msgid "Francais" +msgstr "francuski" + +#: lib/core/k9dvd.cpp:243 +msgid "Frisian" +msgstr "frizijski" + +#: lib/core/k9dvd.cpp:243 +msgid "Gaelic" +msgstr "galski" + +#: lib/core/k9dvd.cpp:244 +msgid "Scots Gaelic" +msgstr "škotski galski" + +#: lib/core/k9dvd.cpp:244 +msgid "Galician" +msgstr "galicijski" + +#: lib/core/k9dvd.cpp:244 +msgid "Guarani" +msgstr "guarani" + +#: lib/core/k9dvd.cpp:244 +msgid "Gujarati" +msgstr "gudžarati" + +#: lib/core/k9dvd.cpp:244 +msgid "Hausa" +msgstr "hausa" + +#: lib/core/k9dvd.cpp:245 lib/core/k9dvd.cpp:247 +msgid "Hebrew" +msgstr "hebrejski" + +#: lib/core/k9dvd.cpp:245 +msgid "Hindi" +msgstr "hindu" + +#: lib/core/k9dvd.cpp:245 +msgid "Hrvatski" +msgstr "hrvatski" + +#: lib/core/k9dvd.cpp:245 +msgid "Magyar" +msgstr "mađarski" + +#: lib/core/k9dvd.cpp:245 +msgid "Armenian" +msgstr "jermenski" + +#: lib/core/k9dvd.cpp:246 +msgid "Interlingua" +msgstr "višejezički" + +#: lib/core/k9dvd.cpp:246 +msgid "Indonesian" +msgstr "indonezijski" + +#: lib/core/k9dvd.cpp:246 +msgid "Interlingue" +msgstr "višejezički" + +#: lib/core/k9dvd.cpp:246 +msgid "Inupiak" +msgstr "inupiak" + +#: lib/core/k9dvd.cpp:247 +msgid "Islenska" +msgstr "" + +#: lib/core/k9dvd.cpp:247 +msgid "Italiano" +msgstr "italijanski" + +#: lib/core/k9dvd.cpp:247 +msgid "Inuktitut" +msgstr "Inuktitut (transliterovano)" + +#: lib/core/k9dvd.cpp:247 +msgid "Japanese" +msgstr "japanski" + +#: lib/core/k9dvd.cpp:248 lib/core/k9dvd.cpp:263 +msgid "Yiddish" +msgstr "jevrejski" + +#: lib/core/k9dvd.cpp:248 +msgid "Javanese" +msgstr "javanski" + +#: lib/core/k9dvd.cpp:248 +msgid "Georgian" +msgstr "gruzijski" + +#: lib/core/k9dvd.cpp:248 +msgid "Kazakh" +msgstr "kazahstanski" + +#: lib/core/k9dvd.cpp:248 +msgid "Greenlandic" +msgstr "kalalisut (grenlandski)" + +#: lib/core/k9dvd.cpp:249 +msgid "Cambodian" +msgstr "kambodžanski" + +#: lib/core/k9dvd.cpp:249 +msgid "Kannada" +msgstr "kanadski" + +#: lib/core/k9dvd.cpp:249 +msgid "Korean" +msgstr "korejski" + +#: lib/core/k9dvd.cpp:249 +msgid "Kashmiri" +msgstr "kašmirski" + +#: lib/core/k9dvd.cpp:249 +msgid "Kurdish" +msgstr "kurdski" + +#: lib/core/k9dvd.cpp:250 +msgid "Kirghiz" +msgstr "kirgiški" + +#: lib/core/k9dvd.cpp:250 +msgid "Latin" +msgstr "latinski" + +#: lib/core/k9dvd.cpp:250 +msgid "Lingala" +msgstr "lingala" + +#: lib/core/k9dvd.cpp:250 +#, fuzzy +msgid "Laothian" +msgstr "latinski" + +#: lib/core/k9dvd.cpp:250 +msgid "Lithuanian" +msgstr "" + +#: lib/core/k9dvd.cpp:251 +msgid "Latvian, Lettish" +msgstr "" + +#: lib/core/k9dvd.cpp:251 +msgid "Malagasy" +msgstr "" + +#: lib/core/k9dvd.cpp:251 +msgid "Maori" +msgstr "maori" + +#: lib/core/k9dvd.cpp:251 +msgid "Macedonian" +msgstr "makedonski" + +#: lib/core/k9dvd.cpp:251 +msgid "Malayalam" +msgstr "" + +#: lib/core/k9dvd.cpp:252 +msgid "Mongolian" +msgstr "mongolski" + +#: lib/core/k9dvd.cpp:252 +msgid "Moldavian" +msgstr "moldavski" + +#: lib/core/k9dvd.cpp:252 +#, fuzzy +msgid "Marathi" +msgstr "gudžarati" + +#: lib/core/k9dvd.cpp:252 +#, fuzzy +msgid "Malay" +msgstr "MPlayer" + +#: lib/core/k9dvd.cpp:252 +msgid "Maltese" +msgstr "" + +#: lib/core/k9dvd.cpp:253 +msgid "Burmese" +msgstr "" + +#: lib/core/k9dvd.cpp:253 +msgid "Nauru" +msgstr "" + +#: lib/core/k9dvd.cpp:253 +msgid "Nepali" +msgstr "nepalski" + +#: lib/core/k9dvd.cpp:253 +msgid "Nederlands" +msgstr "" + +#: lib/core/k9dvd.cpp:253 +msgid "Norsk" +msgstr "" + +#: lib/core/k9dvd.cpp:253 +msgid "Occitan" +msgstr "" + +#: lib/core/k9dvd.cpp:254 +msgid "Oromo" +msgstr "" + +#: lib/core/k9dvd.cpp:254 +msgid "Oriya" +msgstr "" + +#: lib/core/k9dvd.cpp:254 +msgid "Punjabi" +msgstr "" + +#: lib/core/k9dvd.cpp:254 +msgid "Polish" +msgstr "poljski" + +#: lib/core/k9dvd.cpp:254 +msgid "Pashto, Pushto" +msgstr "" + +#: lib/core/k9dvd.cpp:255 +msgid "Portugues" +msgstr "portugalski" + +#: lib/core/k9dvd.cpp:255 +msgid "Quechua" +msgstr "" + +#: lib/core/k9dvd.cpp:255 +msgid "Rhaeto-Romance" +msgstr "" + +#: lib/core/k9dvd.cpp:255 +#, fuzzy +msgid "Kirundi" +msgstr "hindu" + +#: lib/core/k9dvd.cpp:255 +msgid "Romanian" +msgstr "rumunski" + +#: lib/core/k9dvd.cpp:256 +msgid "Russian" +msgstr "ruski" + +#: lib/core/k9dvd.cpp:256 +msgid "Kinyarwanda" +msgstr "" + +#: lib/core/k9dvd.cpp:256 +#, fuzzy +msgid "Sanskrit" +msgstr "danski" + +#: lib/core/k9dvd.cpp:256 +#, fuzzy +msgid "Sindhi" +msgstr "hindu" + +#: lib/core/k9dvd.cpp:256 +msgid "Sangho" +msgstr "" + +#: lib/core/k9dvd.cpp:257 +msgid "Serbo-Croatian" +msgstr "srpsko-hrvatski" + +#: lib/core/k9dvd.cpp:257 +#, fuzzy +msgid "Sinhalese" +msgstr "vijetnamski" + +#: lib/core/k9dvd.cpp:257 +msgid "Slovak" +msgstr "slovački" + +#: lib/core/k9dvd.cpp:257 +msgid "Slovenian" +msgstr "slovenski" + +#: lib/core/k9dvd.cpp:257 +#, fuzzy +msgid "Samoan" +msgstr "kambodžanski" + +#: lib/core/k9dvd.cpp:258 +msgid "Shona" +msgstr "" + +#: lib/core/k9dvd.cpp:258 +msgid "Somali" +msgstr "" + +#: lib/core/k9dvd.cpp:258 +msgid "Albanian" +msgstr "albanski" + +#: lib/core/k9dvd.cpp:258 +msgid "Serbian" +msgstr "srpski" + +#: lib/core/k9dvd.cpp:258 +msgid "Siswati" +msgstr "" + +#: lib/core/k9dvd.cpp:259 +msgid "Sesotho" +msgstr "" + +#: lib/core/k9dvd.cpp:259 +msgid "Sundanese" +msgstr "" + +#: lib/core/k9dvd.cpp:259 +#, fuzzy +msgid "Svenska" +msgstr "slovenski" + +#: lib/core/k9dvd.cpp:259 +msgid "Swahili" +msgstr "" + +#: lib/core/k9dvd.cpp:259 +#, fuzzy +msgid "Tamil" +msgstr "tajlandski (tai)" + +#: lib/core/k9dvd.cpp:260 +msgid "Telugu" +msgstr "" + +#: lib/core/k9dvd.cpp:260 +#, fuzzy +msgid "Tajik" +msgstr "tajlandski (tai)" + +#: lib/core/k9dvd.cpp:260 +msgid "Thai" +msgstr "tajlandski (tai)" + +#: lib/core/k9dvd.cpp:260 +msgid "Tigrinya" +msgstr "" + +#: lib/core/k9dvd.cpp:260 +msgid "Turkmen" +msgstr "" + +#: lib/core/k9dvd.cpp:260 +msgid "Tagalog" +msgstr "" + +#: lib/core/k9dvd.cpp:261 +msgid "Setswana" +msgstr "" + +#: lib/core/k9dvd.cpp:261 +msgid "Tonga" +msgstr "" + +#: lib/core/k9dvd.cpp:261 +msgid "Turkish" +msgstr "turski" + +#: lib/core/k9dvd.cpp:261 +msgid "Tsonga" +msgstr "" + +#: lib/core/k9dvd.cpp:261 +#, fuzzy +msgid "Tatar" +msgstr "početak" + +#: lib/core/k9dvd.cpp:261 +msgid "Twi" +msgstr "" + +#: lib/core/k9dvd.cpp:262 +msgid "Uighur" +msgstr "" + +#: lib/core/k9dvd.cpp:262 +msgid "Ukrainian" +msgstr "ukrainski" + +#: lib/core/k9dvd.cpp:262 +msgid "Urdu" +msgstr "" + +#: lib/core/k9dvd.cpp:262 +msgid "Uzbek" +msgstr "" + +#: lib/core/k9dvd.cpp:262 +msgid "Vietnamese" +msgstr "vijetnamski" + +#: lib/core/k9dvd.cpp:263 +msgid "Volapuk" +msgstr "" + +#: lib/core/k9dvd.cpp:263 +msgid "Wolof" +msgstr "" + +#: lib/core/k9dvd.cpp:263 +msgid "Xhosa" +msgstr "" + +#: lib/core/k9dvd.cpp:263 +msgid "Yoruba" +msgstr "" + +#: lib/core/k9dvd.cpp:263 +msgid "Zhuang" +msgstr "" + +#: lib/core/k9dvd.cpp:264 +msgid "Chinese" +msgstr "kineski" + +#: lib/core/k9dvd.cpp:264 +msgid "Zulu" +msgstr "" + +#: lib/core/k9dvd.cpp:264 lib/core/k9dvd.cpp:265 lib/core/k9dvd.cpp:488 +msgid "Unknown" +msgstr "nepoznat" + +#: lib/core/k9dvd.cpp:355 +msgid "Can't open disc %1!\n" +msgstr "Ne mogu da otvorim disk %1!\n" + +#: lib/core/k9dvd.cpp:367 +msgid "Can't open main ifo!\n" +msgstr "Me mogu da otvorim glavni ifo!\n" + +#: lib/core/k9dvd.cpp:409 lib/core/k9dvd.cpp:706 +msgid "Title %1" +msgstr "Naslov %1" + +#: lib/core/k9dvd.cpp:757 +msgid "reading title" +msgstr "čitam naslov" + +#: lib/core/k9dvd.cpp:874 +msgid "Error opening vobs for title %1\n" +msgstr "Greška pri otvaranju vob-ova za naslov %1\n" + +#: lib/core/k9dvd.cpp:885 +msgid "ERROR reading block %1\n" +msgstr "Greška pri čitanju bloka %1\n" + +#: lib/import/k9avidecode.cpp:31 lib/import/k9avidecode.cpp:35 +msgid "Cannot open then library %1" +msgstr "Ne mogu da otvorim biblioteku %1" + +#: lib/import/k9avidecode.cpp:88 +msgid "Couldn't open the file %1" +msgstr "Ne mogu da otvorim datoteku %1" + +#: lib/import/k9avidecode.cpp:93 +msgid "Couldn't find stream information" +msgstr "Ne mogu da nađem podatke za protok" + +#: lib/import/k9avidecode.cpp:106 +msgid "The file doesn't contain any video stream" +msgstr "Datoteka ne sadrži ni jedan video tok" + +#: lib/import/k9avidecode.cpp:117 +msgid "Unsupported codec" +msgstr "Nepodržani kodek" + +#: lib/import/k9avidecode.cpp:122 +msgid "Could'nt open the codec" +msgstr "Ne mogu da otvorim kodek" + +#: lib/import/k9avidecode.cpp:133 +msgid "Unable to allocate memory for frames" +msgstr "Ne mogu da alociram memoriju za kadrove" + +#. i18n: file ./lib/import/menuEdit.ui line 171 +#: lib/import/k9import.cpp:50 lib/import/k9menuedit.cpp:298 po/rc.cpp:151 +#: ui_menuEdit.h:216 rc.cpp:151 +#, no-c-format +msgid "Root Menu" +msgstr "Glavni meni" + +#: lib/import/k9import.cpp:68 lib/main/k9main.cpp:474 lib/main/k9main.cpp:1253 +msgid "ISO Image" +msgstr "ISO odraz" + +#: lib/import/k9import.cpp:69 lib/main/k9main.cpp:1254 +msgid "Folder" +msgstr "Fascikla" + +#: lib/import/k9importfiles.cpp:86 +#, fuzzy +msgid "Add Title" +msgstr "Dodaj naslov" + +#. i18n: file ./lib/import/chapterEdit.ui line 20 +#: lib/import/k9importfiles.cpp:94 po/rc.cpp:72 ui_chapterEdit.h:217 rc.cpp:72 +#, no-c-format +msgid "Chapter properties" +msgstr "Postavke poglavlja" + +#: lib/import/k9importfiles.cpp:105 +msgid "Edit menu" +msgstr "Uredi meni" + +#: lib/import/k9importfiles.cpp:148 +msgid "Create DVD" +msgstr "Napravi DVD" + +#: lib/import/k9importfiles.cpp:152 lib/main/k9settings.cpp:34 +msgid "DVD Backup" +msgstr "DVD rezervna kopija" + +#: lib/import/k9importfiles.cpp:190 lib/main/k9copy.cpp:333 +msgid "Settings" +msgstr "Postavke" + +#: lib/import/k9menuedit.cpp:254 +msgid "Title %1 Menu" +msgstr "Meni %1. naslova" + +#: lib/import/k9menuedit.cpp:263 lib/import/k9menuedit.cpp:303 +msgid "Play Menu" +msgstr "Pusti meni" + +#: lib/import/k9menuedit.cpp:265 +msgid "Play Title" +msgstr "Pusti naslov" + +#: lib/import/k9menuedit.cpp:271 +msgid "Play Root Menu" +msgstr "Pusti glavni meni" + +#: lib/import/k9menuedit.cpp:273 +msgid "Play Title Menu" +msgstr "Pusti meni naslova" + +#: lib/import/k9menuedit.cpp:281 lib/import/k9menuedit.cpp:309 +msgid "Play Title %1" +msgstr "Pusti naslov %1" + +#: lib/import/k9newdvd.cpp:95 +msgid "Creating root menu" +msgstr "Pravim glavni meni" + +#: lib/import/k9newdvd.cpp:135 +msgid "The dvd authoring was canceled" +msgstr "Autorizacija DVD-a je bila prekinuta" + +#: lib/import/k9newdvd.cpp:163 +msgid "Creating menu for title %1" +msgstr "Pravim meni za naslov %1" + +#. i18n: file ./lib/backup/mp4dlg.ui line 133 +#: lib/import/k9newdvd.cpp:350 po/rc.cpp:33 ui_mp4dlg.h:219 rc.cpp:33 +#, no-c-format +msgid "fps" +msgstr "fps" + +#: lib/import/k9newdvd.cpp:387 lib/import/k9newtitle.cpp:66 +msgid "title %1" +msgstr "naslov %1" + +#. i18n: file ./lib/import/newTitle.ui line 13 +#: lib/import/k9newtitle.cpp:58 po/rc.cpp:175 ui_newTitle.h:183 rc.cpp:175 +#, no-c-format +msgid "Add title" +msgstr "Dodaj naslov" + +#: lib/import/k9newtitle.cpp:119 lib/import/k9newtitle.cpp:141 +#: lib/main/k9main.cpp:629 lib/main/k9main.cpp:646 +msgid "chapter %1" +msgstr "poglavlje %1" + +#: lib/main/k9copy.cpp:109 +msgid "Shrink Factor" +msgstr "Faktor kompresije" + +#: lib/main/k9copy.cpp:119 +msgid "MPEG4 Encoding Options" +msgstr "Opcije MPEG4 kodiranja" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 13 +#: lib/main/k9copy.cpp:140 po/rc.cpp:318 ui_playbackoptionsw.h:225 rc.cpp:318 +#, no-c-format +msgid "DVD playback options" +msgstr "Postavke DVD reprodukcije" + +#. i18n: file ./lib/main/langselectw.ui line 13 +#: lib/main/k9copy.cpp:148 po/rc.cpp:306 ui_langselectw.h:60 rc.cpp:306 +#, no-c-format +msgid "Selection" +msgstr "Izabrano" + +#. i18n: file ./lib/mplayer/mplayer.ui line 16 +#: lib/main/k9copy.cpp:160 lib/main/k9settings.cpp:49 +#: lib/mplayer/k9mplayer.cpp:99 po/rc.cpp:623 ui_mplayer.h:241 rc.cpp:623 +#, no-c-format +msgid "Preview" +msgstr "Pregled" + +#: lib/main/k9copy.cpp:224 +msgid "Play title" +msgstr "Pusti naslov" + +#: lib/main/k9copy.cpp:230 +#, fuzzy +msgid "Copy" +msgstr "k9Copy" + +#: lib/main/k9copy.cpp:236 +msgid "Create MPEG-4" +msgstr "Napravi MPEG-4" + +#: lib/main/k9copy.cpp:245 +msgid "Eject" +msgstr "Izbaci" + +#: lib/main/k9copy.cpp:253 +msgid "DVD Author" +msgstr "DVS autor" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 297 +#. i18n: file ./lib/main/prefAuthor.ui line 19 +#. i18n: file ./lib/main/prefMPEG4.ui line 397 +#. i18n: file ./lib/mplayer/mplayer.ui line 25 +#. i18n: file ./lib/main/playbackoptionsw.ui line 297 +#. i18n: file ./lib/main/prefAuthor.ui line 19 +#. i18n: file ./lib/main/prefMPEG4.ui line 397 +#. i18n: file ./lib/mplayer/mplayer.ui line 25 +#: lib/main/k9langselect.cpp:89 po/rc.cpp:336 po/rc.cpp:342 po/rc.cpp:527 +#: po/rc.cpp:626 ui_mplayer.h:242 ui_playbackoptionsw.h:233 +#: ui_prefAuthor.h:190 ui_prefMPEG4.h:395 rc.cpp:336 rc.cpp:342 rc.cpp:527 +#: rc.cpp:626 +#, no-c-format +msgid "Audio" +msgstr "Zvuk" + +#: lib/main/k9langselect.cpp:100 +msgid "Subtitles" +msgstr "Prevodi" + +#: lib/main/k9main.cpp:368 lib/main/k9main.cpp:1146 +msgid "DVD is not opened" +msgstr "DVD nije otvoren" + +#: lib/main/k9main.cpp:368 +msgid "DVD Copy" +msgstr "DVD umnožavanje" + +#: lib/main/k9main.cpp:395 +msgid "Backup in progress" +msgstr "Pravljenje rezervne kopije u toku" + +#: lib/main/k9main.cpp:450 lib/main/k9main.cpp:586 lib/main/k9main.cpp:1197 +msgid "Ready" +msgstr "Spremno" + +#: lib/main/k9main.cpp:533 +msgid "Open DVD" +msgstr "Otvori DVD" + +#: lib/main/k9main.cpp:559 +msgid "Titleset %1" +msgstr "Niz naslova %1" + +#: lib/main/k9main.cpp:621 +msgid "chapters" +msgstr "poglavlja" + +#: lib/main/k9main.cpp:633 lib/main/k9main.cpp:649 lib/main/k9main.cpp:713 +#: lib/main/k9main.cpp:734 +msgid "%1 MB" +msgstr "%1 MB" + +#: lib/main/k9main.cpp:691 +msgid "video %1 " +msgstr "video %1 " + +#: lib/main/k9main.cpp:702 +msgid "audio %1 " +msgstr "zvuk %1 " + +#: lib/main/k9main.cpp:725 +msgid "subpicture %1 " +msgstr "prevod %1 " + +#: lib/main/k9main.cpp:1154 +msgid "Transcoding title : %1" +msgstr "Kodiram naslov : %1" + +#: lib/main/k9main.cpp:1373 +msgid "Open ISO Image" +msgstr "Otvori ISO odraz" + +#: lib/main/k9main.cpp:1384 +msgid "Open DVD folder" +msgstr "Otvori DVD fasciklu" + +#. i18n: file ./lib/main/mencoderCmdGen.ui line 13 +#: lib/main/k9mencodercmdgen.cpp:63 po/rc.cpp:312 ui_mencoderCmdGen.h:106 +#: rc.cpp:312 +#, no-c-format +msgid "MEncoder options" +msgstr "MEncoder opcije" + +#: lib/main/k9mencodercmdgen.cpp:78 +msgid "Audio Codec" +msgstr "Zvučni kodek" + +#: lib/main/k9mencodercmdgen.cpp:94 +msgid "Video Codec" +msgstr "Video kodek" + +#: lib/main/k9mencodercmdgen.cpp:113 +msgid "Filters" +msgstr "Filteri" + +#: lib/main/k9mp4title.cpp:37 lib/main/k9mp4title.cpp:110 +#: lib/main/k9titlefactor.cpp:100 +msgid "Select a Title in the treeview..." +msgstr "Izaberite naslov u stablu za pregled..." + +#: lib/main/k9playbackoptions.cpp:149 +msgid "none" +msgstr "ništa" + +#: lib/main/k9prefmencoder.cpp:110 lib/main/k9prefmencoder.cpp:114 +#: lib/main/k9prefmencoder.cpp:125 lib/main/k9prefmencoder.cpp:127 +msgid "new profile" +msgstr "novi profil" + +#: lib/main/k9settings.cpp:28 +msgid "Devices" +msgstr "Uređaji" + +#: lib/main/k9settings.cpp:29 +msgid "Devices not detected by k9copy" +msgstr "Uređaji nisu pronađeni od strane programa" + +#: lib/main/k9settings.cpp:33 +msgid "DVD" +msgstr "DVD" + +#: lib/main/k9settings.cpp:38 +msgid "MEncoder" +msgstr "MEncoder" + +#: lib/main/k9settings.cpp:39 +msgid "MPEG-4 Codecs" +msgstr "MPEG-4 kodeci" + +#: lib/main/k9settings.cpp:43 +msgid "MPEG-4" +msgstr "MPEG-4" + +#: lib/main/k9settings.cpp:50 +msgid "Title preview" +msgstr "pregled naslova" + +#: lib/main/k9titlefactor.cpp:111 +msgid "Shrink Factor for %1" +msgstr "Faktor suženja za %1" + +#: main.cpp:31 +msgid "A KDE 4 Application" +msgstr "" + +#: main.cpp:37 +msgid "k9copy" +msgstr "k9Copy" + +#: main.cpp:38 +msgid "(C) 2007 Jean-Michel" +msgstr "" + +#: main.cpp:39 +msgid "Jean-Michel" +msgstr "" + +#: main.cpp:40 +msgid "_: NAME OF TRANSLATORS\\nYour names" +msgstr "_: IME PREVODILACA\\nMiloš Popović" + +#: main.cpp:41 +msgid "_: EMAIL OF TRANSLATORS\\nYour emails" +msgstr "_: MEJL ADRESA PREVODILACA\\ngpopac@gmail.com" + +#. i18n: file ./lib/main/k9mainw.ui line 49 +#: main.cpp:45 po/rc.cpp:270 ui_k9mainw.h:181 rc.cpp:270 +#, no-c-format +msgid "input device" +msgstr "ulazni uređaj" + +#: main.cpp:46 +msgid "output device" +msgstr "izlazni uređaj" + +#: main.cpp:47 +msgid "title to play" +msgstr "naslov koji da pustim" + +#: main.cpp:48 +msgid "play title to stdout" +msgstr "pusti naslov na standardni izlaz" + +#: main.cpp:49 +msgid "start sector" +msgstr "obeleživač početka" + +#: main.cpp:50 +msgid "end sector" +msgstr "obeleživač kraja" + +#: main.cpp:51 +msgid "list of audio streams" +msgstr "lista zvučnih tokova" + +#: main.cpp:52 +msgid "list of spu streams" +msgstr "lusta spu tokova" + +#: main.cpp:53 +msgid "shrink factor" +msgstr "faktor kompresije" + +#: main.cpp:54 +msgid "shrink factor forced" +msgstr "primorani faktor kompresije" + +#: main.cpp:55 +msgid "size of the cell to be copied" +msgstr "veličina ćelije za umnožavanje" + +#: main.cpp:56 +msgid "total size of selected titles" +msgstr "ukupna veličina izabranih naslova" + +#: main.cpp:57 +msgid "size of the chapters being copied" +msgstr "veličina poglavlja za umnožavanje" + +#: main.cpp:58 +msgid "selected chapters" +msgstr "izabrana poglavlja" + +#: main.cpp:59 +msgid "new dvd size" +msgstr "veličina novog DVD-a" + +#: main.cpp:60 +msgid "selected chapter" +msgstr "izabrano poglavnje" + +#: main.cpp:61 +msgid "cell number in selected chapter" +msgstr "broj ćelije u izabranom poglavlju" + +#: main.cpp:62 +msgid "status file name" +msgstr "ime datoteke za stanje" + +#: main.cpp:63 +msgid "initialize status file" +msgstr "pokreni datoteku za stanjem" + +#: main.cpp:64 +msgid "continue playing from last sector" +msgstr "nastavi reprodukciju od zadnjeg sektora" + +#: main.cpp:65 +msgid "don't save status at end" +msgstr "ne čuvaj stanje na kraju" + +#: main.cpp:66 +msgid "save cell in a temporary file before encoding" +msgstr "sačuvaj ćeliju u privremenu datoteku pre kodiranja" + +#. i18n: file ./k9copyui.rc line 4 +#: po/rc.cpp:3 rc.cpp:3 +#, fuzzy, no-c-format +msgid "&File" +msgstr "Filteri" + +#. i18n: file ./k9copyui.rc line 10 +#: po/rc.cpp:6 rc.cpp:6 +#, no-c-format +msgid "A&ctions" +msgstr "&Radnje" + +#. i18n: file ./k9copyui.rc line 24 +#: po/rc.cpp:9 rc.cpp:9 +#, no-c-format +msgid "Actions ToolBar" +msgstr "Paleta sa alatima radnje" + +#. i18n: file ./lib/backup/backupdlg.ui line 80 +#: po/rc.cpp:15 ui_backupdlg.h:240 rc.cpp:15 +#, no-c-format +msgid "

DVD Backup

" +msgstr "

DVD rezervna kopija

" + +#. i18n: file ./lib/backup/backupdlg.ui line 106 +#: po/rc.cpp:18 ui_backupdlg.h:241 rc.cpp:18 +#, no-c-format +msgid "Current step" +msgstr "Trenutni korak" + +#. i18n: file ./lib/backup/backupdlg.ui line 147 +#. i18n: file ./lib/backup/mp4dlg.ui line 146 +#. i18n: file ./lib/core/progress.ui line 221 +#. i18n: file ./lib/backup/backupdlg.ui line 147 +#. i18n: file ./lib/backup/mp4dlg.ui line 146 +#. i18n: file ./lib/core/progress.ui line 221 +#: po/rc.cpp:21 po/rc.cpp:36 po/rc.cpp:69 ui_backupdlg.h:242 ui_mp4dlg.h:220 +#: ui_progress.h:171 rc.cpp:21 rc.cpp:36 rc.cpp:69 +#, no-c-format +msgid "Elapsed Time" +msgstr "Proteklo vreme" + +#. i18n: file ./lib/backup/backupdlg.ui line 166 +#. i18n: file ./lib/import/chapterEdit.ui line 118 +#. i18n: file ./lib/import/import.ui line 97 +#. i18n: file ./lib/import/newTitle.ui line 197 +#. i18n: file ./lib/backup/backupdlg.ui line 166 +#. i18n: file ./lib/import/chapterEdit.ui line 118 +#. i18n: file ./lib/import/import.ui line 97 +#. i18n: file ./lib/import/newTitle.ui line 197 +#: po/rc.cpp:24 po/rc.cpp:75 po/rc.cpp:130 po/rc.cpp:193 ui_backupdlg.h:243 +#: ui_chapterEdit.h:218 ui_import.h:136 ui_newTitle.h:191 rc.cpp:24 rc.cpp:75 +#: rc.cpp:130 rc.cpp:193 +#, no-c-format +msgid "--:--:--" +msgstr "--:--:--" + +#. i18n: file ./lib/backup/mp4dlg.ui line 16 +#: po/rc.cpp:27 ui_mp4dlg.h:213 rc.cpp:27 +#, no-c-format +msgid "transcoding" +msgstr "Kodiranje" + +#. i18n: file ./lib/backup/mp4dlg.ui line 37 +#: po/rc.cpp:30 ui_mp4dlg.h:214 rc.cpp:30 +#, no-c-format +msgid "Encoding" +msgstr "Kodiranje" + +#. i18n: file ./lib/backup/mp4dlg.ui line 159 +#. i18n: file ./lib/main/prefAuthor.ui line 68 +#. i18n: file ./lib/main/prefMPEG4.ui line 341 +#. i18n: file ./lib/main/prefMPEG4.ui line 448 +#. i18n: file ./lib/backup/mp4dlg.ui line 159 +#. i18n: file ./lib/main/prefAuthor.ui line 68 +#. i18n: file ./lib/main/prefMPEG4.ui line 341 +#. i18n: file ./lib/main/prefMPEG4.ui line 448 +#: po/rc.cpp:39 po/rc.cpp:363 po/rc.cpp:521 po/rc.cpp:548 ui_mp4dlg.h:221 +#: ui_prefAuthor.h:203 ui_prefMPEG4.h:380 ui_prefMPEG4.h:392 rc.cpp:39 +#: rc.cpp:363 rc.cpp:521 rc.cpp:548 +#, no-c-format +msgid "Bitrate" +msgstr "Bitski protok" + +#. i18n: file ./lib/backup/mp4dlg.ui line 172 +#. i18n: file ./lib/main/k9mainwsov.ui line 243 +#. i18n: file ./lib/main/k9mainw.ui line 218 +#. i18n: file ./lib/backup/mp4dlg.ui line 172 +#. i18n: file ./lib/main/k9mainwsov.ui line 243 +#. i18n: file ./lib/main/k9mainw.ui line 218 +#: po/rc.cpp:42 po/rc.cpp:262 po/rc.cpp:300 ui_k9mainw.h:194 ui_mp4dlg.h:222 +#: rc.cpp:42 rc.cpp:262 rc.cpp:300 +#, no-c-format +msgid "Size" +msgstr "Veličina" + +#. i18n: file ./lib/core/dvdprogress.ui line 35 +#: po/rc.cpp:45 ui_dvdprogress.h:114 rc.cpp:45 +#, no-c-format +msgid "DVD Analyze" +msgstr "DVD analiza" + +#. i18n: file ./lib/core/processList.ui line 16 +#. i18n: file ./lib/import/processList.ui line 13 +#. i18n: file ./lib/core/processList.ui line 16 +#. i18n: file ./lib/import/processList.ui line 13 +#: po/rc.cpp:48 po/rc.cpp:196 ui_processList.h:73 rc.cpp:48 rc.cpp:196 +#, no-c-format +msgid "Process List" +msgstr "Lista za obradu" + +#. i18n: file ./lib/core/processList.ui line 25 +#. i18n: file ./lib/import/processList.ui line 25 +#. i18n: file ./lib/core/processList.ui line 25 +#. i18n: file ./lib/import/processList.ui line 25 +#: po/rc.cpp:51 po/rc.cpp:202 ui_processList.h:75 rc.cpp:51 rc.cpp:202 +#, no-c-format +msgid "Processes" +msgstr "Obrade" + +#. i18n: file ./lib/core/processList.ui line 36 +#. i18n: file ./lib/import/processList.ui line 30 +#. i18n: file ./lib/core/processList.ui line 36 +#. i18n: file ./lib/import/processList.ui line 30 +#: po/rc.cpp:54 po/rc.cpp:205 ui_processList.h:76 rc.cpp:54 rc.cpp:205 +#, no-c-format +msgid "Elapsed" +msgstr "Proteklo" + +#. i18n: file ./lib/core/processList.ui line 47 +#. i18n: file ./lib/import/import.ui line 58 +#. i18n: file ./lib/import/processList.ui line 35 +#. i18n: file ./lib/main/k9mainw.ui line 80 +#. i18n: file ./lib/main/k9mainw.ui line 90 +#. i18n: file ./lib/core/processList.ui line 47 +#. i18n: file ./lib/import/import.ui line 58 +#. i18n: file ./lib/import/processList.ui line 35 +#. i18n: file ./lib/main/k9mainw.ui line 80 +#. i18n: file ./lib/main/k9mainw.ui line 90 +#: po/rc.cpp:57 po/rc.cpp:121 po/rc.cpp:208 po/rc.cpp:276 po/rc.cpp:282 +#: ui_import.h:130 ui_k9mainw.h:183 ui_k9mainw.h:185 ui_processList.h:77 +#: rc.cpp:57 rc.cpp:121 rc.cpp:208 rc.cpp:276 rc.cpp:282 +#, no-c-format +msgid "..." +msgstr "..." + +#. i18n: file ./lib/core/processList.ui line 73 +#. i18n: file ./lib/import/processList.ui line 49 +#. i18n: file ./lib/core/processList.ui line 73 +#. i18n: file ./lib/import/processList.ui line 49 +#: po/rc.cpp:60 po/rc.cpp:211 ui_processList.h:78 rc.cpp:60 rc.cpp:211 +#, no-c-format +msgid "&Cancel" +msgstr "" + +#. i18n: file ./lib/core/processList.ui line 76 +#. i18n: file ./lib/import/processList.ui line 52 +#. i18n: file ./lib/core/processList.ui line 76 +#. i18n: file ./lib/import/processList.ui line 52 +#: po/rc.cpp:63 po/rc.cpp:214 ui_processList.h:79 rc.cpp:63 rc.cpp:214 +#, no-c-format +msgid "Alt+C" +msgstr "Alt+C" + +#. i18n: file ./lib/core/progress.ui line 31 +#: po/rc.cpp:66 ui_progress.h:169 rc.cpp:66 +#, fuzzy, no-c-format +msgid "k9Copy" +msgstr "k9Copy" + +#. i18n: file ./lib/import/chapterEdit.ui line 130 +#: po/rc.cpp:78 ui_chapterEdit.h:219 rc.cpp:78 +#, no-c-format +msgid "video" +msgstr "video" + +#. i18n: file ./lib/import/chapterEdit.ui line 153 +#: po/rc.cpp:81 ui_chapterEdit.h:220 rc.cpp:81 +#, no-c-format +msgid "" +"*.avi\n" +"*.mpeg" +msgstr "" +"*.avi\n" +"*.mpeg" + +#. i18n: file ./lib/import/chapterEdit.ui line 160 +#: po/rc.cpp:85 ui_chapterEdit.h:222 rc.cpp:85 +#, fuzzy, no-c-format +msgid "start" +msgstr "Na početak" + +#. i18n: file ./lib/import/chapterEdit.ui line 176 +#. i18n: file ./lib/import/chapterEdit.ui line 251 +#. i18n: file ./lib/import/newTitle.ui line 56 +#. i18n: file ./lib/import/chapterEdit.ui line 176 +#. i18n: file ./lib/import/chapterEdit.ui line 251 +#. i18n: file ./lib/import/newTitle.ui line 56 +#: po/rc.cpp:88 po/rc.cpp:100 po/rc.cpp:178 ui_chapterEdit.h:223 +#: ui_chapterEdit.h:227 ui_newTitle.h:185 rc.cpp:88 rc.cpp:100 rc.cpp:178 +#, no-c-format +msgid "HH:mm:ss" +msgstr "" + +#. i18n: file ./lib/import/chapterEdit.ui line 189 +#. i18n: file ./lib/import/chapterEdit.ui line 264 +#. i18n: file ./lib/import/chapterEdit.ui line 189 +#. i18n: file ./lib/import/chapterEdit.ui line 264 +#: po/rc.cpp:91 po/rc.cpp:103 ui_chapterEdit.h:224 ui_chapterEdit.h:228 +#: rc.cpp:91 rc.cpp:103 +#, no-c-format +msgid "set Current Frame" +msgstr "postavi trenutni kadar" + +#. i18n: file ./lib/import/chapterEdit.ui line 212 +#. i18n: file ./lib/import/chapterEdit.ui line 271 +#. i18n: file ./lib/import/chapterEdit.ui line 212 +#. i18n: file ./lib/import/chapterEdit.ui line 271 +#: po/rc.cpp:94 po/rc.cpp:106 ui_chapterEdit.h:225 ui_chapterEdit.h:229 +#: rc.cpp:94 rc.cpp:106 +#, no-c-format +msgid "break continuity" +msgstr "prekini kontinuitet" + +#. i18n: file ./lib/import/chapterEdit.ui line 235 +#: po/rc.cpp:97 ui_chapterEdit.h:226 rc.cpp:97 +#, no-c-format +msgid "end" +msgstr "kraj" + +#. i18n: file ./lib/import/chapterEdit.ui line 300 +#: po/rc.cpp:109 ui_chapterEdit.h:230 rc.cpp:109 +#, no-c-format +msgid "set Title button" +msgstr "postavi Naslovno dugme" + +#. i18n: file ./lib/import/import.ui line 13 +#: po/rc.cpp:112 ui_import.h:127 rc.cpp:112 +#, no-c-format +msgid "import" +msgstr "uvoz" + +#. i18n: file ./lib/import/import.ui line 25 +#. i18n: file ./lib/main/configDlg.ui line 113 +#. i18n: file ./lib/import/import.ui line 25 +#. i18n: file ./lib/main/configDlg.ui line 113 +#: po/rc.cpp:115 po/rc.cpp:229 ui_configDlg.h:128 ui_import.h:128 rc.cpp:115 +#: rc.cpp:229 +#, no-c-format +msgid "Output" +msgstr "Izlaz" + +#. i18n: file ./lib/import/import.ui line 53 +#: po/rc.cpp:118 ui_import.h:129 rc.cpp:118 +#, no-c-format +msgid "Video files" +msgstr "Video datoteke" + +#. i18n: file ./lib/import/import.ui line 78 +#: po/rc.cpp:124 ui_import.h:133 rc.cpp:124 +#, no-c-format +msgid "PAL" +msgstr "PAL" + +#. i18n: file ./lib/import/import.ui line 83 +#: po/rc.cpp:127 ui_import.h:134 rc.cpp:127 +#, no-c-format +msgid "NTSC" +msgstr "NTSC" + +#. i18n: file ./lib/import/menuEdit.ui line 13 +#: po/rc.cpp:133 ui_menuEdit.h:204 rc.cpp:133 +#, no-c-format +msgid "Edit Menu" +msgstr "Uredi meni" + +#. i18n: file ./lib/import/menuEdit.ui line 37 +#: po/rc.cpp:136 ui_menuEdit.h:205 rc.cpp:136 +#, no-c-format +msgid "Text" +msgstr "Tekst" + +#. i18n: file ./lib/import/menuEdit.ui line 53 +#: po/rc.cpp:139 ui_menuEdit.h:206 rc.cpp:139 +#, no-c-format +msgid "Background picture" +msgstr "Pozadinska slika" + +#. i18n: file ./lib/import/menuEdit.ui line 85 +#. i18n: file ./lib/main/prefAuthor.ui line 175 +#. i18n: file ./lib/import/menuEdit.ui line 85 +#. i18n: file ./lib/main/prefAuthor.ui line 175 +#: po/rc.cpp:142 po/rc.cpp:375 ui_menuEdit.h:208 ui_prefAuthor.h:207 +#: rc.cpp:142 rc.cpp:375 +#, fuzzy, no-c-format +msgid "Font" +msgstr "Format" + +#. i18n: file ./lib/import/menuEdit.ui line 99 +#: po/rc.cpp:145 ui_menuEdit.h:211 rc.cpp:145 +#, fuzzy, no-c-format +msgid "Bottom" +msgstr "Dugmići" + +#. i18n: file ./lib/import/menuEdit.ui line 104 +#: po/rc.cpp:148 ui_menuEdit.h:212 rc.cpp:148 +#, no-c-format +msgid "Right" +msgstr "" + +#. i18n: file ./lib/import/menuEdit.ui line 181 +#: po/rc.cpp:154 ui_menuEdit.h:217 rc.cpp:154 +#, no-c-format +msgid "At start" +msgstr "Na početak" + +#. i18n: file ./lib/import/menuEdit.ui line 192 +#: po/rc.cpp:157 ui_menuEdit.h:220 rc.cpp:157 +#, no-c-format +msgid "Play menu" +msgstr "Pusti meni" + +#. i18n: file ./lib/import/menuEdit.ui line 197 +#. i18n: file ./lib/import/menuEdit.ui line 226 +#. i18n: file ./lib/import/menuEdit.ui line 197 +#. i18n: file ./lib/import/menuEdit.ui line 226 +#: po/rc.cpp:160 po/rc.cpp:172 ui_menuEdit.h:221 ui_menuEdit.h:228 rc.cpp:160 +#: rc.cpp:172 +#, no-c-format +msgid "Play title 1" +msgstr "Pusti naslov 1" + +#. i18n: file ./lib/import/menuEdit.ui line 205 +#: po/rc.cpp:163 ui_menuEdit.h:223 rc.cpp:163 +#, no-c-format +msgid "At End" +msgstr "Na kraj" + +#. i18n: file ./lib/import/menuEdit.ui line 216 +#: po/rc.cpp:166 ui_menuEdit.h:226 rc.cpp:166 +#, no-c-format +msgid "Play root menu" +msgstr "Pusti glavni meni" + +#. i18n: file ./lib/import/menuEdit.ui line 221 +#: po/rc.cpp:169 ui_menuEdit.h:227 rc.cpp:169 +#, no-c-format +msgid "Play title menu" +msgstr "Pusti meni naslova" + +#. i18n: file ./lib/import/newTitle.ui line 63 +#: po/rc.cpp:181 ui_newTitle.h:186 rc.cpp:181 +#, no-c-format +msgid "number of chapters" +msgstr "broj poglavlja" + +#. i18n: file ./lib/import/newTitle.ui line 73 +#: po/rc.cpp:184 ui_newTitle.h:187 rc.cpp:184 +#, no-c-format +msgid "chapter length" +msgstr "dužina poglavlja" + +#. i18n: file ./lib/import/newTitle.ui line 140 +#. i18n: file ./lib/main/configDlg.ui line 129 +#. i18n: file ./lib/import/newTitle.ui line 140 +#. i18n: file ./lib/main/configDlg.ui line 129 +#: po/rc.cpp:187 po/rc.cpp:232 ui_configDlg.h:130 ui_newTitle.h:188 rc.cpp:187 +#: rc.cpp:232 +#, no-c-format +msgid "Add" +msgstr "" + +#. i18n: file ./lib/import/newTitle.ui line 174 +#: po/rc.cpp:190 ui_newTitle.h:190 rc.cpp:190 +#, no-c-format +msgid "Video file" +msgstr "Video datoteka" + +#. i18n: file ./lib/import/processList.ui line 20 +#: po/rc.cpp:199 ui_processList.h:74 rc.cpp:199 +#, fuzzy, no-c-format +msgid "Progression" +msgstr "k9DVD napredak" + +#. i18n: file ./lib/main/configDlg.ui line 20 +#: po/rc.cpp:217 ui_configDlg.h:111 rc.cpp:217 +#, no-c-format +#msgid "Devices" +#msgstr "Uređaji" + +#. i18n: file ./lib/main/configDlg.ui line 98 +#: po/rc.cpp:220 ui_configDlg.h:116 rc.cpp:220 +#, no-c-format +msgid "device" +msgstr "uređaj" + +#. i18n: file ./lib/main/configDlg.ui line 103 +#. i18n: file ./lib/main/prefMencoder.ui line 108 +#. i18n: file ./lib/main/prefMencoder.ui line 360 +#. i18n: file ./lib/main/configDlg.ui line 103 +#. i18n: file ./lib/main/prefMencoder.ui line 108 +#. i18n: file ./lib/main/prefMencoder.ui line 360 +#: po/rc.cpp:223 po/rc.cpp:443 po/rc.cpp:461 ui_configDlg.h:120 +#: ui_prefMencoder.h:419 ui_prefMencoder.h:429 rc.cpp:223 rc.cpp:443 +#: rc.cpp:461 +#, no-c-format +msgid "label" +msgstr "natpis" + +#. i18n: file ./lib/main/configDlg.ui line 108 +#: po/rc.cpp:226 ui_configDlg.h:124 rc.cpp:226 +#, no-c-format +msgid "Input" +msgstr "Ulaz" + +#. i18n: file ./lib/main/configDlg.ui line 148 +#: po/rc.cpp:235 ui_configDlg.h:132 rc.cpp:235 +#, no-c-format +msgid "Remove" +msgstr "" + +#. i18n: file ./lib/main/k9mainwsov.ui line 16 +#. i18n: file ./lib/main/k9mainw.ui line 25 +#. i18n: file ./lib/main/k9mainwsov.ui line 16 +#. i18n: file ./lib/main/k9mainw.ui line 25 +#: po/rc.cpp:238 po/rc.cpp:267 ui_k9mainw.h:180 rc.cpp:238 rc.cpp:267 +#, no-c-format +msgid "MainDlg" +msgstr "MainDlg" + +#. i18n: file ./lib/main/k9mainwsov.ui line 38 +#. i18n: file ./lib/main/k9mainw.ui line 121 +#. i18n: file ./lib/main/k9mainwsov.ui line 38 +#. i18n: file ./lib/main/k9mainw.ui line 121 +#: po/rc.cpp:241 po/rc.cpp:285 ui_k9mainw.h:186 rc.cpp:241 rc.cpp:285 +#, no-c-format +msgid "Output device " +msgstr "Izlazni uređaj " + +#. i18n: file ./lib/main/k9mainwsov.ui line 54 +#. i18n: file ./lib/main/k9mainw.ui line 153 +#. i18n: file ./lib/main/k9mainwsov.ui line 54 +#. i18n: file ./lib/main/k9mainw.ui line 153 +#: po/rc.cpp:244 po/rc.cpp:288 ui_k9mainw.h:187 rc.cpp:244 rc.cpp:288 +#, no-c-format +msgid "@" +msgstr "@" + +#. i18n: file ./lib/main/k9mainwsov.ui line 70 +#: po/rc.cpp:247 rc.cpp:247 +#, no-c-format +msgid "Input device " +msgstr "Ulazni uređaj " + +#. i18n: file ./lib/main/k9mainwsov.ui line 145 +#. i18n: file ./lib/main/k9mainw.ui line 187 +#. i18n: file ./lib/main/prefMPEG4.ui line 266 +#. i18n: file ./lib/main/k9mainwsov.ui line 145 +#. i18n: file ./lib/main/k9mainw.ui line 187 +#. i18n: file ./lib/main/prefMPEG4.ui line 266 +#: po/rc.cpp:253 po/rc.cpp:294 po/rc.cpp:509 ui_k9mainw.h:192 +#: ui_prefMPEG4.h:375 rc.cpp:253 rc.cpp:294 rc.cpp:509 +#, no-c-format +msgid "X" +msgstr "X" + +#. i18n: file ./lib/main/k9mainwsov.ui line 165 +#: po/rc.cpp:256 rc.cpp:256 +#, no-c-format +msgid "D&VD" +msgstr "&DVD" + +#. i18n: file ./lib/main/k9mainwsov.ui line 232 +#. i18n: file ./lib/main/k9mainw.ui line 213 +#. i18n: file ./lib/main/k9mainwsov.ui line 232 +#. i18n: file ./lib/main/k9mainw.ui line 213 +#: po/rc.cpp:259 po/rc.cpp:297 ui_k9mainw.h:193 rc.cpp:259 rc.cpp:297 +#, no-c-format +msgid "Title" +msgstr "Naslov" + +#. i18n: file ./lib/main/k9mainw.ui line 77 +#: po/rc.cpp:273 ui_k9mainw.h:182 rc.cpp:273 +#, no-c-format +msgid "Open a folder" +msgstr "Otvori fasciklu" + +#. i18n: file ./lib/main/k9mainw.ui line 87 +#: po/rc.cpp:279 ui_k9mainw.h:184 rc.cpp:279 +#, no-c-format +msgid "Open an iso image" +msgstr "Otvori iso odraz" + +#. i18n: file ./lib/main/k9mainw.ui line 223 +#: po/rc.cpp:303 ui_k9mainw.h:195 rc.cpp:303 +#, no-c-format +msgid "Content" +msgstr "Sadržaj" + +#. i18n: file ./lib/main/langselectw.ui line 47 +#: po/rc.cpp:309 ui_langselectw.h:61 rc.cpp:309 +#, no-c-format +msgid "Languages" +msgstr "Jezici" + +#. i18n: file ./lib/main/mencoderCmdGen.ui line 23 +#: po/rc.cpp:315 ui_mencoderCmdGen.h:107 rc.cpp:315 +#, no-c-format +msgid "1" +msgstr "" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 34 +#: po/rc.cpp:321 ui_playbackoptionsw.h:226 rc.cpp:321 +#, no-c-format +msgid "&Keep original menus" +msgstr "Zadrži originalne menije" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 37 +#. i18n: file ./lib/main/prefMPEG4.ui line 171 +#. i18n: file ./lib/main/playbackoptionsw.ui line 37 +#. i18n: file ./lib/main/prefMPEG4.ui line 171 +#: po/rc.cpp:324 po/rc.cpp:506 ui_playbackoptionsw.h:227 ui_prefMPEG4.h:373 +#: rc.cpp:324 rc.cpp:506 +#, no-c-format +msgid "Alt+K" +msgstr "Alt+K" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 184 +#: po/rc.cpp:327 ui_playbackoptionsw.h:230 rc.cpp:327 +#, no-c-format +msgid "Selected Titles" +msgstr "Izabrani naslovi" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 245 +#: po/rc.cpp:330 ui_playbackoptionsw.h:231 rc.cpp:330 +#, no-c-format +msgid "Default language" +msgstr "Podrazumevani jezik" + +#. i18n: file ./lib/main/playbackoptionsw.ui line 271 +#: po/rc.cpp:333 ui_playbackoptionsw.h:232 rc.cpp:333 +#, no-c-format +msgid "Subtitle" +msgstr "Prevod" + +#. i18n: file ./lib/main/prefAuthor.ui line 13 +#: po/rc.cpp:339 ui_prefAuthor.h:189 rc.cpp:339 +#, no-c-format +msgid "Authoring options" +msgstr "Opcije autorizacije" + +#. i18n: file ./lib/main/prefAuthor.ui line 26 +#: po/rc.cpp:345 ui_prefAuthor.h:193 rc.cpp:345 +#, no-c-format +msgid "AC3" +msgstr "AC3" + +#. i18n: file ./lib/main/prefAuthor.ui line 31 +#: po/rc.cpp:348 ui_prefAuthor.h:194 rc.cpp:348 +#, no-c-format +msgid "MP2" +msgstr "MP2" + +#. i18n: file ./lib/main/prefAuthor.ui line 40 +#: po/rc.cpp:351 ui_prefAuthor.h:198 rc.cpp:351 +#, no-c-format +msgid "128" +msgstr "128" + +#. i18n: file ./lib/main/prefAuthor.ui line 45 +#: po/rc.cpp:354 ui_prefAuthor.h:199 rc.cpp:354 +#, no-c-format +msgid "192" +msgstr "192" + +#. i18n: file ./lib/main/prefAuthor.ui line 50 +#: po/rc.cpp:357 ui_prefAuthor.h:200 rc.cpp:357 +#, no-c-format +msgid "320" +msgstr "320" + +#. i18n: file ./lib/main/prefAuthor.ui line 58 +#: po/rc.cpp:360 ui_prefAuthor.h:202 rc.cpp:360 +#, no-c-format +msgid "Format" +msgstr "Format" + +#. i18n: file ./lib/main/prefAuthor.ui line 113 +#: po/rc.cpp:366 ui_prefAuthor.h:204 rc.cpp:366 +#, no-c-format +msgid "Buttons" +msgstr "Dugmići" + +#. i18n: file ./lib/main/prefAuthor.ui line 119 +#. i18n: file ./lib/main/prefMPEG4.ui line 111 +#. i18n: file ./lib/main/prefAuthor.ui line 119 +#. i18n: file ./lib/main/prefMPEG4.ui line 111 +#: po/rc.cpp:369 po/rc.cpp:494 ui_prefAuthor.h:205 ui_prefMPEG4.h:368 +#: rc.cpp:369 rc.cpp:494 +#, fuzzy, no-c-format +msgid "Width" +msgstr "k9Widget" + +#. i18n: file ./lib/main/prefAuthor.ui line 145 +#. i18n: file ./lib/main/prefMPEG4.ui line 121 +#. i18n: file ./lib/main/prefAuthor.ui line 145 +#. i18n: file ./lib/main/prefMPEG4.ui line 121 +#: po/rc.cpp:372 po/rc.cpp:497 ui_prefAuthor.h:206 ui_prefMPEG4.h:369 +#: rc.cpp:372 rc.cpp:497 +#, no-c-format +msgid "Height" +msgstr "" + +#. i18n: file ./lib/main/prefAuthor.ui line 182 +#: po/rc.cpp:378 ui_prefAuthor.h:208 rc.cpp:378 +#, no-c-format +msgid "Hilite color" +msgstr "Boja isticanja" + +#. i18n: file ./lib/main/prefAuthor.ui line 199 +#: po/rc.cpp:381 ui_prefAuthor.h:210 rc.cpp:381 +#, no-c-format +msgid "Text color" +msgstr "Boja pisma" + +#. i18n: file ./lib/main/prefDVD.ui line 13 +#: po/rc.cpp:384 ui_prefDVD.h:138 rc.cpp:384 +#, no-c-format +msgid "prefDVD" +msgstr "postDVD" + +#. i18n: file ./lib/main/prefDVD.ui line 25 +#: po/rc.cpp:387 ui_prefDVD.h:139 rc.cpp:387 +#, no-c-format +msgid "Output directory" +msgstr "Izlazni direktorijum" + +#. i18n: file ./lib/main/prefDVD.ui line 45 +#: po/rc.cpp:390 ui_prefDVD.h:140 rc.cpp:390 +#, no-c-format +msgid "Burn with k3b" +msgstr "Upiši disk pomoću k3b-a" + +#. i18n: file ./lib/main/prefDVD.ui line 48 +#. i18n: file ./lib/main/prefMPEG4.ui line 344 +#. i18n: file ./lib/main/prefDVD.ui line 48 +#. i18n: file ./lib/main/prefMPEG4.ui line 344 +#: po/rc.cpp:393 po/rc.cpp:524 ui_prefDVD.h:141 ui_prefMPEG4.h:381 rc.cpp:393 +#: rc.cpp:524 +#, no-c-format +msgid "Alt+B" +msgstr "Alt+B" + +#. i18n: file ./lib/main/prefDVD.ui line 61 +#: po/rc.cpp:396 ui_prefDVD.h:142 rc.cpp:396 +#, no-c-format +msgid "Auto burn" +msgstr "Automatski upiši disk" + +#. i18n: file ./lib/main/prefDVD.ui line 64 +#: po/rc.cpp:399 ui_prefDVD.h:143 rc.cpp:399 +#, no-c-format +msgid "Alt+T" +msgstr "Alt+T" + +#. i18n: file ./lib/main/prefDVD.ui line 71 +#: po/rc.cpp:402 ui_prefDVD.h:144 rc.cpp:402 +#, no-c-format +msgid "DVD size" +msgstr "Veličina DVD-a" + +#. i18n: file ./lib/main/prefDVD.ui line 106 +#: po/rc.cpp:405 ui_prefDVD.h:145 rc.cpp:405 +#, no-c-format +msgid "Quick scan" +msgstr "Brzo skeniranje" + +#. i18n: file ./lib/main/prefDVD.ui line 109 +#: po/rc.cpp:408 ui_prefDVD.h:146 rc.cpp:408 +#, no-c-format +msgid "Alt+Q" +msgstr "Alt+Q" + +#. i18n: file ./lib/main/prefDVD.ui line 132 +#: po/rc.cpp:411 ui_prefDVD.h:147 rc.cpp:411 +#, no-c-format +msgid "use dvdAuthor for copy without menus" +msgstr "koristi dvdAuthor za kopije bez menija" + +#. i18n: file ./lib/main/prefDVD.ui line 135 +#: po/rc.cpp:414 ui_prefDVD.h:148 rc.cpp:414 +#, no-c-format +msgid "Alt+D" +msgstr "Alt+D" + +#. i18n: file ./lib/main/prefDVD.ui line 142 +#: po/rc.cpp:417 ui_prefDVD.h:149 rc.cpp:417 +#, no-c-format +msgid "Clear output directory on exit" +msgstr "Očisti izlazni direktorijum pri izlasku iz programa" + +#. i18n: file ./lib/main/prefDVD.ui line 145 +#: po/rc.cpp:420 ui_prefDVD.h:150 rc.cpp:420 +#, no-c-format +msgid "Alt+Y" +msgstr "Alt+Y" + +#. i18n: file ./lib/main/prefMencoder.ui line 13 +#. i18n: file ./lib/main/prefMPEG4.ui line 13 +#. i18n: file ./lib/main/prefpreview.ui line 13 +#. i18n: file ./lib/main/prefMencoder.ui line 13 +#. i18n: file ./lib/main/prefMPEG4.ui line 13 +#. i18n: file ./lib/main/prefpreview.ui line 13 +#: po/rc.cpp:423 po/rc.cpp:470 po/rc.cpp:557 ui_prefMencoder.h:407 +#: ui_prefMPEG4.h:357 ui_prefpreview.h:206 rc.cpp:423 rc.cpp:470 rc.cpp:557 +#, no-c-format +msgid "Form1" +msgstr "Form1" + +#. i18n: file ./lib/main/prefMencoder.ui line 37 +#: po/rc.cpp:426 ui_prefMencoder.h:408 rc.cpp:426 +#, no-c-format +msgid "" +"$PASS\n" +"$WIDTH\n" +"$HEIGHT\n" +"$VIDBR\n" +"$AUDBR" +msgstr "" +"$PASS\n" +"$WIDTH\n" +"$HEIGHT\n" +"$VIDBR\n" +"$AUDBR" + +#. i18n: file ./lib/main/prefMencoder.ui line 57 +#: po/rc.cpp:433 ui_prefMencoder.h:413 rc.cpp:433 +#, no-c-format +msgid "" +"pass number\n" +"video width\n" +"video height\n" +"video bitrate\n" +"audio bitrate" +msgstr "" +"broj prolaza\n" +"širina videa\n" +"vidina videa\n" +"bitski protok videa\n" +"bitski protok zvuka" + +#. i18n: file ./lib/main/prefMencoder.ui line 70 +#: po/rc.cpp:440 ui_prefMencoder.h:428 rc.cpp:440 +#, no-c-format +msgid "Video codecs" +msgstr "Video kodeci" + +#. i18n: file ./lib/main/prefMencoder.ui line 121 +#: po/rc.cpp:446 ui_prefMencoder.h:420 rc.cpp:446 +#, no-c-format +msgid "fourcc" +msgstr "fourcc" + +#. i18n: file ./lib/main/prefMencoder.ui line 131 +#: po/rc.cpp:449 ui_prefMencoder.h:421 rc.cpp:449 +#, no-c-format +msgid "first pass" +msgstr "prvi prolaz" + +#. i18n: file ./lib/main/prefMencoder.ui line 233 +#: po/rc.cpp:452 ui_prefMencoder.h:424 rc.cpp:452 +#, no-c-format +msgid "one pass" +msgstr "jedan prolaz" + +#. i18n: file ./lib/main/prefMencoder.ui line 301 +#: po/rc.cpp:455 ui_prefMencoder.h:427 rc.cpp:455 +#, no-c-format +msgid "second pass" +msgstr "drugi prolaz" + +#. i18n: file ./lib/main/prefMencoder.ui line 322 +#: po/rc.cpp:458 ui_prefMencoder.h:432 rc.cpp:458 +#, no-c-format +msgid "Audio codecs" +msgstr "Zvučni kodek" + +#. i18n: file ./lib/main/prefMencoder.ui line 427 +#: po/rc.cpp:464 ui_prefMencoder.h:431 rc.cpp:464 +#, no-c-format +msgid "options" +msgstr "opcije" + +#. i18n: file ./lib/main/prefMencoder.ui line 453 +#: po/rc.cpp:467 ui_prefMencoder.h:433 rc.cpp:467 +#, no-c-format +msgid "Available variables" +msgstr "Dostupne promenjljive" + +#. i18n: file ./lib/main/prefMPEG4.ui line 57 +#: po/rc.cpp:473 ui_prefMPEG4.h:382 rc.cpp:473 +#, no-c-format +msgid "Video" +msgstr "Video" + +#. i18n: file ./lib/main/prefMPEG4.ui line 63 +#: po/rc.cpp:476 ui_prefMPEG4.h:359 rc.cpp:476 +#, no-c-format +msgid "2 pass" +msgstr "2 prolaza" + +#. i18n: file ./lib/main/prefMPEG4.ui line 66 +#: po/rc.cpp:479 ui_prefMPEG4.h:360 rc.cpp:479 +#, no-c-format +msgid "Alt+2" +msgstr "Alt+2" + +#. i18n: file ./lib/main/prefMPEG4.ui line 73 +#. i18n: file ./lib/main/prefMPEG4.ui line 403 +#. i18n: file ./lib/main/prefMPEG4.ui line 73 +#. i18n: file ./lib/main/prefMPEG4.ui line 403 +#: po/rc.cpp:482 po/rc.cpp:530 ui_prefMPEG4.h:361 ui_prefMPEG4.h:383 +#: rc.cpp:482 rc.cpp:530 +#, no-c-format +msgid "Codec" +msgstr "Kodek" + +#. i18n: file ./lib/main/prefMPEG4.ui line 93 +#: po/rc.cpp:485 ui_prefMPEG4.h:364 rc.cpp:485 +#, no-c-format +msgid "XviD" +msgstr "Xvid" + +#. i18n: file ./lib/main/prefMPEG4.ui line 98 +#: po/rc.cpp:488 ui_prefMPEG4.h:365 rc.cpp:488 +#, no-c-format +msgid "lavc MPEG4" +msgstr "lavc MPEG4" + +#. i18n: file ./lib/main/prefMPEG4.ui line 103 +#: po/rc.cpp:491 ui_prefMPEG4.h:366 rc.cpp:491 +#, no-c-format +msgid "x264" +msgstr "x264" + +#. i18n: file ./lib/main/prefMPEG4.ui line 152 +#: po/rc.cpp:500 ui_prefMPEG4.h:371 rc.cpp:500 +#, no-c-format +msgid "640" +msgstr "640" + +#. i18n: file ./lib/main/prefMPEG4.ui line 168 +#: po/rc.cpp:503 ui_prefMPEG4.h:372 rc.cpp:503 +#, no-c-format +msgid "&keep aspect ratio" +msgstr "&zadrži razmeru" + +#. i18n: file ./lib/main/prefMPEG4.ui line 297 +#: po/rc.cpp:512 ui_prefMPEG4.h:377 rc.cpp:512 +#, no-c-format +msgid "File size" +msgstr "Veličina datoteke" + +#. i18n: file ./lib/main/prefMPEG4.ui line 300 +#: po/rc.cpp:515 ui_prefMPEG4.h:378 rc.cpp:515 +#, no-c-format +msgid "Alt+S" +msgstr "Alt+S" + +#. i18n: file ./lib/main/prefMPEG4.ui line 322 +#: po/rc.cpp:518 ui_prefMPEG4.h:379 rc.cpp:518 +#, no-c-format +msgid " MB" +msgstr " MB" + +#. i18n: file ./lib/main/prefMPEG4.ui line 420 +#: po/rc.cpp:533 ui_prefMPEG4.h:386 rc.cpp:533 +#, no-c-format +msgid "mp3" +msgstr "mp3" + +#. i18n: file ./lib/main/prefMPEG4.ui line 425 +#: po/rc.cpp:536 ui_prefMPEG4.h:387 rc.cpp:536 +#, no-c-format +msgid "faac" +msgstr "faac" + +#. i18n: file ./lib/main/prefMPEG4.ui line 430 +#: po/rc.cpp:539 ui_prefMPEG4.h:388 rc.cpp:539 +#, no-c-format +msgid "mp2" +msgstr "mp2" + +#. i18n: file ./lib/main/prefMPEG4.ui line 435 +#: po/rc.cpp:542 ui_prefMPEG4.h:389 rc.cpp:542 +#, no-c-format +msgid "ac3" +msgstr "ac3" + +#. i18n: file ./lib/main/prefMPEG4.ui line 440 +#: po/rc.cpp:545 ui_prefMPEG4.h:390 rc.cpp:545 +#, no-c-format +msgid "adpcm ima" +msgstr "adpcm ima" + +#. i18n: file ./lib/main/prefMPEG4.ui line 512 +#: po/rc.cpp:551 ui_prefMPEG4.h:394 rc.cpp:551 +#, no-c-format +msgid "Gain" +msgstr "Pojačanje" + +#. i18n: file ./lib/main/prefMPEG4.ui line 542 +#: po/rc.cpp:554 ui_prefMPEG4.h:396 rc.cpp:554 +#, no-c-format +msgid "use cell cache" +msgstr "koristi keš ćelije" + +#. i18n: file ./lib/main/prefpreview.ui line 34 +#: po/rc.cpp:560 ui_prefpreview.h:208 rc.cpp:560 +#, no-c-format +msgid "&Internal Player" +msgstr "Integrisani pregledač" + +#. i18n: file ./lib/main/prefpreview.ui line 37 +#: po/rc.cpp:563 ui_prefpreview.h:209 rc.cpp:563 +#, no-c-format +msgid "Alt+I" +msgstr "Alt+I" + +#. i18n: file ./lib/main/prefpreview.ui line 44 +#: po/rc.cpp:566 ui_prefpreview.h:210 rc.cpp:566 +#, fuzzy, no-c-format +msgid "MPlayer" +msgstr "K9Mplayer" + +#. i18n: file ./lib/main/prefpreview.ui line 47 +#: po/rc.cpp:569 ui_prefpreview.h:211 rc.cpp:569 +#, no-c-format +msgid "Alt+M" +msgstr "Alt+M" + +#. i18n: file ./lib/main/prefpreview.ui line 109 +#: po/rc.cpp:572 ui_prefpreview.h:212 rc.cpp:572 +#, no-c-format +msgid "Internal viewer options" +msgstr "Opcije integrisanog pregledača" + +#. i18n: file ./lib/main/prefpreview.ui line 119 +#: po/rc.cpp:575 ui_prefpreview.h:213 rc.cpp:575 +#, no-c-format +msgid "use OpenGL" +msgstr "koristi OpenGL" + +#. i18n: file ./lib/main/prefpreview.ui line 154 +#: po/rc.cpp:578 ui_prefpreview.h:214 rc.cpp:578 +#, no-c-format +msgid "Video output" +msgstr "Video izlaz" + +#. i18n: file ./lib/main/prefpreview.ui line 170 +#: po/rc.cpp:581 ui_prefpreview.h:215 rc.cpp:581 +#, no-c-format +msgid "Audio output" +msgstr "Zvučni izlaz" + +#. i18n: file ./lib/main/prefpreview.ui line 181 +#: po/rc.cpp:584 ui_prefpreview.h:218 rc.cpp:584 +#, no-c-format +msgid "X11" +msgstr "X11" + +#. i18n: file ./lib/main/prefpreview.ui line 186 +#: po/rc.cpp:587 ui_prefpreview.h:219 rc.cpp:587 +#, no-c-format +msgid "Xv" +msgstr "Xv" + +#. i18n: file ./lib/main/prefpreview.ui line 191 +#: po/rc.cpp:590 ui_prefpreview.h:220 rc.cpp:590 +#, no-c-format +msgid "OpenGL" +msgstr "OpenGL" + +#. i18n: file ./lib/main/prefpreview.ui line 196 +#. i18n: file ./lib/main/prefpreview.ui line 221 +#. i18n: file ./lib/main/prefpreview.ui line 196 +#. i18n: file ./lib/main/prefpreview.ui line 221 +#: po/rc.cpp:593 po/rc.cpp:602 ui_prefpreview.h:221 ui_prefpreview.h:227 +#: rc.cpp:593 rc.cpp:602 +#, no-c-format +msgid "SDL" +msgstr "SDL" + +#. i18n: file ./lib/main/prefpreview.ui line 211 +#: po/rc.cpp:596 ui_prefpreview.h:225 rc.cpp:596 +#, no-c-format +msgid "ALSA" +msgstr "ALSA" + +#. i18n: file ./lib/main/prefpreview.ui line 216 +#: po/rc.cpp:599 ui_prefpreview.h:226 rc.cpp:599 +#, no-c-format +msgid "OSS" +msgstr "OSS" + +#. i18n: file ./lib/main/prefpreview.ui line 267 +#: po/rc.cpp:605 ui_prefpreview.h:229 rc.cpp:605 +#, no-c-format +msgid "MPlayer options" +msgstr "MPlayer opcije" + +#. i18n: file ./lib/main/titlefactor.ui line 13 +#: po/rc.cpp:608 ui_titlefactor.h:116 rc.cpp:608 +#, no-c-format +msgid "Shrink Factors" +msgstr "Faktori suženja" + +#. i18n: file ./lib/main/titlefactor.ui line 40 +#: po/rc.cpp:611 ui_titlefactor.h:117 rc.cpp:611 +#, no-c-format +msgid "Shrink Factor for Title %1" +msgstr "Faktor suženja za naslov %1" + +#. i18n: file ./lib/main/titlefactor.ui line 56 +#: po/rc.cpp:614 ui_titlefactor.h:118 rc.cpp:614 +#, no-c-format +msgid "Change Factor" +msgstr "Promeni faktor" + +#. i18n: file ./lib/main/titlefactor.ui line 92 +#: po/rc.cpp:617 ui_titlefactor.h:119 rc.cpp:617 +#, no-c-format +msgid "0.00" +msgstr "0.00" + +#. i18n: file ./lib/main/viewmpeg2.ui line 31 +#: po/rc.cpp:620 ui_viewmpeg2.h:133 rc.cpp:620 +#, no-c-format +msgid "Title Preview" +msgstr "Pregled naslova" + +#. i18n: file ./lib/mplayer/mplayer.ui line 54 +#: po/rc.cpp:629 ui_mplayer.h:244 rc.cpp:629 +#, no-c-format +msgid "Subpicture" +msgstr "Prevod" + +#. i18n: file ./lib/mplayer/mplayer.ui line 271 +#: po/rc.cpp:632 ui_mplayer.h:249 rc.cpp:632 +#, no-c-format +msgid "-" +msgstr "-" + +#. i18n: file ./lib/mplayer/mplayer.ui line 391 +#: po/rc.cpp:635 ui_mplayer.h:251 rc.cpp:635 +#, no-c-format +msgid "+" +msgstr "+" + +#. i18n: file ./prefs_base.ui line 16 +#: po/rc.cpp:638 rc.cpp:638 +#, fuzzy, no-c-format +msgid "Background color:" +msgstr "Pozadinska slika" + +#. i18n: file ./prefs_base.ui line 26 +#: po/rc.cpp:641 rc.cpp:641 +#, no-c-format +msgid "Choose a new background color" +msgstr "" + +#. i18n: file ./prefs_base.ui line 32 +#: po/rc.cpp:644 rc.cpp:644 +#, no-c-format +msgid "" +"\n" +"

Change the background color by clicking here and choose the " +"new color in the color dialog.

" +msgstr "" + +#. i18n: file ./prefs_base.ui line 42 +#: po/rc.cpp:650 rc.cpp:650 +#, no-c-format +msgid "Project age:" +msgstr "" + +#. i18n: file ./prefs_base.ui line 52 +#: po/rc.cpp:653 rc.cpp:653 +#, no-c-format +msgid "Foreground color:" +msgstr "" + +#. i18n: file ./prefs_base.ui line 62 +#: po/rc.cpp:656 rc.cpp:656 +#, no-c-format +msgid "Choose a new foreground color" +msgstr "" + +#. i18n: file ./prefs_base.ui line 68 +#: po/rc.cpp:659 rc.cpp:659 +#, no-c-format +msgid "" +"\n" +"

Change the foreground color by clicking here and choose the " +"new color in the color dialog.

" +msgstr "" + +#. i18n: file ./prefs_base.ui line 110 +#: po/rc.cpp:665 rc.cpp:665 +#, no-c-format +msgid "Set the project age (in days)" +msgstr "" + +#. i18n: file ./prefs_base.ui line 113 +#: po/rc.cpp:668 rc.cpp:668 +#, no-c-format +msgid "Change the project age (in days) by choosing a new number of days." +msgstr "" + +#: po/rc.cpp:669 rc.cpp:669 +msgctxt "NAME OF TRANSLATORS" +msgid "Your names" +msgstr "" + +#: po/rc.cpp:670 rc.cpp:670 +msgctxt "EMAIL OF TRANSLATORS" +msgid "Your emails" +msgstr "" + +#~ msgid "lavc" +#~ msgstr "lavc" + +#~ msgid "xvid" +#~ msgstr "xvid" + +#~ msgid "MJPEG" +#~ msgstr "MJPEG" + +#~ msgid "LJPEG" +#~ msgstr "LJPEG" + +#~ msgid "H.261" +#~ msgstr "H.261" + +#~ msgid "H.263" +#~ msgstr "H.263" + +#~ msgid "MPEG-4 (DivX 4/5)" +#~ msgstr "MPEG-4 (DivX 4/5)" + +#~ msgid "DivX 3" +#~ msgstr "DivX 3" + +#~ msgid "MS MPEG-4 v2" +#~ msgstr "MS MPEG-4 v2" + +#~ msgid "WMV7" +#~ msgstr "WMV7" + +#~ msgid "WMV8" +#~ msgstr "WMV8" + +#~ msgid "RealVideo" +#~ msgstr "RealVideo" + +#~ msgid "MPEG-1" +#~ msgstr "MPEG-1" + +#~ msgid "MPEG-2" +#~ msgstr "MPEG-2" + +#~ msgid "HuffYUV" +#~ msgstr "HuffYUV" + +#~ msgid "ffvHuff" +#~ msgstr "ffvHuff" + +#~ msgid "ASUS v1" +#~ msgstr "ASUS v1" + +#~ msgid "ASUS v2" +#~ msgstr "ASUS v2" + +#~ msgid "New Item" +#~ msgstr "Nova stavka" + +#~ msgid "k9Ifo2" +#~ msgstr "k9Ifo2" + +#~ msgid "k9ChapterCell" +#~ msgstr "k9 ćelija sa poglavljem" + +#~ msgid "k9DVDChapter" +#~ msgstr "k9DVD poglavlje" + +#~ msgid "k9BurnDVD" +#~ msgstr "k9 upis DVD-a" + +#~ msgid "k9DVD" +#~ msgstr "k9DVD" + +#~ msgid "k9DVDVideoStream" +#~ msgstr "k9DVD video tok" + +#~ msgid "k9DVDAudioStream" +#~ msgstr "k9DVD zvučni tok" + +#~ msgid "k9DVDSubtitle" +#~ msgstr "k9DVD prevod" + +#~ msgid "k9DVDTitle" +#~ msgstr "k9DVD naslov" + +#~ msgid "k9DVDTitleset" +#~ msgstr "k9DVD niz naslova" + +#~ msgid "k9DVDAuthor" +#~ msgstr "k9DVD autor" + +#~ msgid "k9DVDSize" +#~ msgstr "k9DVD veličina" + +#~ msgid "Menu Preview" +#~ msgstr "pregled menija" + +#~ msgid "kCDDrive" +#~ msgstr "kCD uređaj" + +#~ msgid "kCDDrives" +#~ msgstr "kCD uređaji" + +#~ msgid "kViewMPEG2" +#~ msgstr "kViewMPEG2" + +#~ msgid "kDecMPEG2" +#~ msgstr "kDecMPEG2" + +#~ msgid "A DVD Backup tool for KDE" +#~ msgstr "Alat za pravljenje DVD rezervnih kopija u KDE okruženju" + +#~ msgid "for internal use" +#~ msgstr "za unutarnju upotrebu" + +#~ msgid "MPEG4 Encoding options" +#~ msgstr "Opcije MPEG4 kodiranja" + +#~ msgid "" +#~ "Insuffisant disk space on %1\n" +#~ "%2 mb expected." +#~ msgstr "" +#~ "Nedovoljno mesta na disku u %1\n" +#~ "%2 MB očekivano" + +#~ msgid "processing" +#~ msgstr "obrada" + +#~ msgid "Create new DVD" +#~ msgstr "Napravi novi DVD" diff -Nru k9copy-2.1.0/src/assistant/astdestination.ui k9copy-2.2.0/src/assistant/astdestination.ui --- k9copy-2.1.0/src/assistant/astdestination.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/astdestination.ui 2009-02-19 22:30:17.000000000 +0100 @@ -6,7 +6,7 @@ 0 0 488 - 214 + 233 @@ -145,7 +145,17 @@ - + + + + Extract audio + + + + + + + Qt::Vertical @@ -268,6 +278,22 @@ + + rbAudio + toggled(bool) + astDestination + rbAudioToggled(bool) + + + 92 + 198 + + + 243 + 162 + + + rbDVDToggled(bool) @@ -276,5 +302,6 @@ rbDVDDiscToggled(bool) rbDVDFolderToggled(bool) rbDVDIsoToggled(bool) + rbAudioToggled(bool) diff -Nru k9copy-2.1.0/src/assistant/asttitles.ui k9copy-2.2.0/src/assistant/asttitles.ui --- k9copy-2.1.0/src/assistant/asttitles.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/asttitles.ui 2009-02-19 22:30:17.000000000 +0100 @@ -21,8 +21,11 @@ 0 - - false + + 10 + + + true false @@ -86,8 +89,25 @@ + + twSource + currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*) + astTitles + CurrentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*) + + + 158 + 149 + + + 311 + 149 + + + itemActivated(QTreeWidgetItem*,int) + CurrentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*) diff -Nru k9copy-2.1.0/src/assistant/cmake_install.cmake k9copy-2.2.0/src/assistant/cmake_install.cmake --- k9copy-2.1.0/src/assistant/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/assistant/k9assistant.cpp k9copy-2.2.0/src/assistant/k9assistant.cpp --- k9copy-2.1.0/src/assistant/k9assistant.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9assistant.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -129,6 +129,9 @@ void k9Assistant::next() { QString err=""; k9astTitles *titles=(k9astTitles*)m_titlesItem->widget(); + k9astStreams *streams=(k9astStreams*)m_streamsItem->widget(); + + k9astMp4 *mp4=(k9astMp4*) m_mp4Item->widget(); titles->stopPreview(); if (currentPage() == m_sourceItem) { @@ -142,10 +145,18 @@ if (!destination->isOk()) err=i18n("The destination of the copy isn't valid"); - k9astStreams *streams=(k9astStreams*)m_streamsItem->widget(); - if (m_destination== dstAvi) { - streams->selectOne(); - } + streams->selectOne(false); + if (destination->isMatroska()) + mp4->setMatroskaCodecs(); + if ((m_destination== dstAvi) && !destination->isMatroska()) { + streams->selectOne(true); + streams->hideSubtitles(false); + mp4->setAviCodecs(); + } else if (m_destination==dstAudio) { + mp4->setAudio(); + streams->hideSubtitles(true); + } else + streams->hideSubtitles(false); streams->updateColumns(); } else if (currentPage() == m_titlesItem) { titles->updateTitles(); @@ -153,8 +164,6 @@ err=i18n("You must select at least on title !"); else titles->stopPreview(); - k9astStreams *streams=(k9astStreams*)m_streamsItem->widget(); - streams->updateColumns(); } else if (currentPage() == m_DVDOptionItem) { k9astDVDOption *options=(k9astDVDOption*)m_DVDOptionItem->widget(); @@ -162,10 +171,10 @@ k9astMpeg * mpeg=(k9astMpeg*)m_mpegItem->widget(); mpeg->updateFactor(); } else if (currentPage() == m_streamsItem) { - k9astStreams *streams=(k9astStreams*)m_streamsItem->widget(); streams->updateStreams(); switch (destination()) { case dstAvi: + case dstAudio: setAppropriate(m_DVDOptionItem,false); setAppropriate(m_mpegItem,false); setAppropriate(m_mp4Item,true); @@ -186,9 +195,10 @@ } } - if (err=="") + if (err=="") { KAssistantDialog::next(); - else + streams->updateColumns(); + } else k9Dialogs::error(err,i18n("cannot continue")); } @@ -231,6 +241,8 @@ case dstMpeg: execCopy.extractMPEG2(); break; + case dstAudio: + execCopy.extractAudio(); default: break; } diff -Nru k9copy-2.1.0/src/assistant/k9assistant.h k9copy-2.2.0/src/assistant/k9assistant.h --- k9copy-2.1.0/src/assistant/k9assistant.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9assistant.h 2009-02-19 22:30:17.000000000 +0100 @@ -21,7 +21,7 @@ @author */ -enum eDestination {dstDVD,dstAvi,dstMpeg,dstIso,dstFolder}; +enum eDestination {dstDVD,dstAvi,dstMpeg,dstIso,dstFolder,dstAudio}; class k9DVD; class k9CdDrives; diff -Nru k9copy-2.1.0/src/assistant/k9astdestination.cpp k9copy-2.2.0/src/assistant/k9astdestination.cpp --- k9copy-2.1.0/src/assistant/k9astdestination.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9astdestination.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -30,9 +30,11 @@ Ui_astDestination.rbDVD->setChecked(true); Ui_astDestination.urMpeg->setVisible(false); Ui_astDestination.urAvi->setVisible(false); - Ui_astDestination.urAvi->setFilter("*.avi|Audio Video Interleave (*.avi)\n*.mpg|MPEG-1 and MPEG-2 systems (*.mpg)\n*.mp4|MPEG-4 format (*.mp4)\n*.asf|Advanced Streaming Format (*.asf)\n*.swf|Adobe Flash (*.swf)\n*.flv|Adobe Flash video files (*.flv)\n*.rm|RealVideo (*.rm)\n*.mov|QuickTime (*.mov)"); + Ui_astDestination.urAudio->setVisible(false); + Ui_astDestination.urAvi->setFilter("*.avi|Audio Video Interleave (*.avi)\n*.mpg|MPEG-1 and MPEG-2 systems (*.mpg)\n*.mp4|MPEG-4 format (*.mp4)\n*.asf|Advanced Streaming Format (*.asf)\n*.swf|Adobe Flash (*.swf)\n*.flv|Adobe Flash video files (*.flv)\n*.rm|RealVideo (*.rm)\n*.mov|QuickTime (*.mov)\n*.mkv|Matroska (*.mkv)"); Ui_astDestination.urIso->setFilter("*.iso|Iso Image (*.iso)"); Ui_astDestination.urMpeg->setFilter("*.mpg|Mpeg video file (*.mpg)"); + Ui_astDestination.urAudio->setMode(KFile::Directory | KFile::ExistingOnly); m_parent->setDVDdestination(dstDVD); updategbDVD(); } @@ -59,6 +61,7 @@ if (_state) { Ui_astDestination.rbAvi->setChecked(false); Ui_astDestination.rbMpeg->setChecked(false); + Ui_astDestination.rbAudio->setChecked(false); } m_parent->setDestination(dstDVD); } @@ -68,6 +71,7 @@ if (_state) { Ui_astDestination.rbDVD->setChecked(false); Ui_astDestination.rbMpeg->setChecked(false); + Ui_astDestination.rbAudio->setChecked(false); } m_parent->setDestination(dstAvi); } @@ -77,10 +81,20 @@ if (_state) { Ui_astDestination.rbDVD->setChecked(false); Ui_astDestination.rbAvi->setChecked(false); + Ui_astDestination.rbAudio->setChecked(false); } m_parent->setDestination(dstMpeg); } +void k9astDestination::rbAudioToggled(bool _state) { + Ui_astDestination.urAudio->setVisible(_state); + if (_state) { + Ui_astDestination.rbDVD->setChecked(false); + Ui_astDestination.rbAvi->setChecked(false); + Ui_astDestination.rbMpeg->setChecked(false); + } + m_parent->setDestination(dstAudio); +} void k9astDestination::updategbDVD() { Ui_astDestination.cbDrives->setVisible(Ui_astDestination.rbDVDDisc->isChecked()); @@ -124,6 +138,8 @@ m_path=Ui_astDestination.urMpeg->url().path(); else if (Ui_astDestination.rbAvi->isChecked()) m_path=Ui_astDestination.urAvi->url().path(); + else if (Ui_astDestination.rbAudio->isChecked()) + m_path=Ui_astDestination.urAudio->url().path(); return m_path; @@ -134,11 +150,15 @@ } -void k9astDestination::deviceRemoved(k9CdDrive *_drive) { +void k9astDestination::deviceRemoved(k9CdDrive *) { } +bool k9astDestination::isMatroska() { + return getPath().endsWith(".mkv"); +} + k9astDestination::~k9astDestination() { } diff -Nru k9copy-2.1.0/src/assistant/k9astdestination.h k9copy-2.2.0/src/assistant/k9astdestination.h --- k9copy-2.1.0/src/assistant/k9astdestination.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9astdestination.h 2009-02-19 22:30:17.000000000 +0100 @@ -31,6 +31,7 @@ ~k9astDestination(); const QString &getPath(); bool isOk(); + bool isMatroska(); /*$PUBLIC_FUNCTIONS$*/ public slots: /*$PUBLIC_SLOTS$*/ @@ -45,6 +46,7 @@ void rbDVDToggled(bool); void rbAviToggled(bool); void rbMpegToggled(bool); + void rbAudioToggled(bool); void rbDVDDiscToggled(bool); void rbDVDFolderToggled(bool); diff -Nru k9copy-2.1.0/src/assistant/k9astmp4.cpp k9copy-2.2.0/src/assistant/k9astmp4.cpp --- k9copy-2.1.0/src/assistant/k9astmp4.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9astmp4.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -23,17 +23,35 @@ Ui_astMp4.setupUi(this); m_parent=parent; m_dvd=_dvd; - k9MP4Title *mp4title=new k9MP4Title(Ui_astMp4.options); - connect (this,SIGNAL(titleChanged(k9DVDTitle*)),mp4title,SLOT(titleChanged(k9DVDTitle*))); + m_mp4Title =new k9MP4Title(Ui_astMp4.options); + connect (this,SIGNAL(titleChanged(k9DVDTitle*)),m_mp4Title,SLOT(titleChanged(k9DVDTitle*))); cbTitle=Ui_astMp4.cbTitle; QGridLayout *grid = new QGridLayout(Ui_astMp4.options); - grid->addWidget(mp4title,0,0); + grid->addWidget(m_mp4Title,0,0); } k9astMp4::~k9astMp4() { } +void k9astMp4::setMatroskaCodecs() { + QStringList codecs; + codecs << "ffmpeg"; + m_mp4Title->loadCodecs(codecs,codecs); +} + +void k9astMp4::setAviCodecs() { + m_mp4Title->loadCodecs(QStringList(),QStringList()); + +} + +void k9astMp4::setAudio() { + m_mp4Title->setOptions(k9MP4Title::optAudio); + QStringList codecs; + codecs <<"ffmpeg"; + m_mp4Title->loadCodecs(codecs,codecs); +} + void k9astMp4::addTitle(k9DVDTitle *_title) { m_titles.append(_title); if (cbTitle->count()==1) { diff -Nru k9copy-2.1.0/src/assistant/k9astmp4.h k9copy-2.2.0/src/assistant/k9astmp4.h --- k9copy-2.1.0/src/assistant/k9astmp4.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9astmp4.h 2009-02-19 22:30:17.000000000 +0100 @@ -20,6 +20,7 @@ class k9DVD; class k9DVDTitle; +class k9MP4Title; class k9astMp4 : public QWidget { Q_OBJECT @@ -27,6 +28,9 @@ public: k9astMp4(k9Assistant* parent,k9DVD *_dvd ); ~k9astMp4(); + void setAudio(); + void setMatroskaCodecs(); + void setAviCodecs(); /*$PUBLIC_FUNCTIONS$*/ public slots: /*$PUBLIC_SLOTS$*/ @@ -43,6 +47,7 @@ private: Ui::astMp4 Ui_astMp4; k9Assistant *m_parent; + k9MP4Title *m_mp4Title; k9DVD *m_dvd; QComboBox *cbTitle; QListm_titles; diff -Nru k9copy-2.1.0/src/assistant/k9astsource.cpp k9copy-2.2.0/src/assistant/k9astsource.cpp --- k9copy-2.1.0/src/assistant/k9astsource.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9astsource.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -69,7 +69,7 @@ } } -void k9astSource::deviceRemoved(k9CdDrive *_drive) { +void k9astSource::deviceRemoved(k9CdDrive *) { } diff -Nru k9copy-2.1.0/src/assistant/k9aststreams.cpp k9copy-2.2.0/src/assistant/k9aststreams.cpp --- k9copy-2.1.0/src/assistant/k9aststreams.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9aststreams.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -19,49 +19,49 @@ class _k9TitleWidget : public QTreeWidgetItem { public: _k9TitleWidget(QTreeWidget *_parent,k9DVDTitle *_title):QTreeWidgetItem(_parent,QTreeWidgetItem::UserType+5) { - title=_title; - } + title=_title; + } k9DVDTitle *title; bool operator< ( const QTreeWidgetItem & other ) const { - return title->getnumTitle() <((_k9TitleWidget*)&other)->title->getnumTitle(); - } + return title->getnumTitle() <((_k9TitleWidget*)&other)->title->getnumTitle(); + } }; bool _k9StreamWidget::operator < ( const QTreeWidgetItem & other ) const { - bool res=false; - _k9StreamWidget *it1=(_k9StreamWidget*) this; - _k9StreamWidget *it2=(_k9StreamWidget*) &other; - if (it1->type() != it2->type()) { - res=it1->type()==k9astStreams::AUDIO; - } else { - if (it1->type()==k9astStreams::AUDIO) - res=(it1->audioStream->getID() < it2->audioStream->getID()); - else - res=(it1->subtitle->getID().at(0) < it2->subtitle->getID().at(0)); - } - - return res; + bool res=false; + _k9StreamWidget *it1=(_k9StreamWidget*) this; + _k9StreamWidget *it2=(_k9StreamWidget*) &other; + if (it1->type() != it2->type()) { + res=it1->type()==k9astStreams::AUDIO; + } else { + if (it1->type()==k9astStreams::AUDIO) + res=(it1->audioStream->getID() < it2->audioStream->getID()); + else + res=(it1->subtitle->getID().at(0) < it2->subtitle->getID().at(0)); + } + + return res; } -_k9StreamWidget::_k9StreamWidget(k9DVDAudioStream *_stream,QTreeWidgetItem *_treeWidgetItem):QTreeWidgetItem(_treeWidgetItem,k9astStreams::AUDIO),QObject(0) { +_k9StreamWidget::_k9StreamWidget(k9DVDAudioStream *_stream,QTreeWidgetItem *_treeWidgetItem):QObject(0),QTreeWidgetItem(_treeWidgetItem,k9astStreams::AUDIO) { audioStream=_stream; subtitle=NULL; showDefault(false); setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable); setCheckState(0,_stream->getselected()?Qt::Checked:Qt::Unchecked); - setText(0,i18n("%1 %2 %3 ch",_stream->getlanguage(),_stream->getformat(),_stream->getchannels())); + setText(0,i18n("%4 - %1 %2 %3 ch",_stream->getlanguage(),_stream->getformat(),_stream->getchannels(),_stream->getID())); setIcon(0,SmallIcon("sound")) ; //setText(1,i18n("%1 MB",_stream->getsize_mb())); } -_k9StreamWidget::_k9StreamWidget(k9DVDSubtitle *_stream,QTreeWidgetItem *_treeWidgetItem):QTreeWidgetItem(_treeWidgetItem,k9astStreams::SUBTITLE),QObject(0) { +_k9StreamWidget::_k9StreamWidget(k9DVDSubtitle *_stream,QTreeWidgetItem *_treeWidgetItem):QObject(0),QTreeWidgetItem(_treeWidgetItem,k9astStreams::SUBTITLE) { audioStream=NULL; subtitle=_stream; showDefault(false); setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable); setCheckState(0,_stream->getselected()?Qt::Checked:Qt::Unchecked); - setText(0,i18n("%1 %2",_stream->getlanguage(),_stream->getcontent())); + setText(0,i18n("%3 - %1 %2",_stream->getlanguage(),_stream->getcontent(),_stream->getID().first())); setIcon(0,SmallIcon("subtitle")); //setText(1,i18n("%1 MB",_stream->getsize_mb())); } @@ -77,62 +77,63 @@ m_streams->setRootIsDecorated(false); m_streams->setSortingEnabled(true); m_locked=false; + m_selectOne=false; } k9astStreams::~k9astStreams() { } -void k9astStreams::resizeEvent ( QResizeEvent * event ) { - m_streams->setColumnWidth(0,m_streams->viewport()->width()); - m_streams->resizeColumnToContents(1); - m_streams->setColumnWidth(0,m_streams->viewport()->width()-m_streams->columnWidth(1)); - +void k9astStreams::resizeEvent ( QResizeEvent * ) { + if ( ! m_streams->isColumnHidden(1)) { + m_streams->setColumnWidth(0,m_streams->viewport()->width()); + m_streams->resizeColumnToContents(1); + m_streams->setColumnWidth(0,m_streams->viewport()->width()-m_streams->columnWidth(1)); + } } void k9astStreams::itemChanged(QTreeWidgetItem *_item,int _column) { - if (_item->type()==QTreeWidgetItem::UserType+5) - return; - switch(_column) { - case 0: { - _k9StreamWidget *item2=(_k9StreamWidget*)_item; - - if ((!m_locked) && (m_parent->destination())==dstAvi &&(_item->type()==AUDIO || _item->type()==SUBTITLE ) && _item->checkState(0)==Qt::Checked) { - m_locked=true; - QTreeWidgetItem *parent=_item->parent(); - for (int i=0; i childCount();i++) { - _k9StreamWidget *item=(_k9StreamWidget*) parent->child(i); - if ( (item!=item2) && ( item->type()==item2->type())) - item->setCheckState(0,Qt::Unchecked); - } - m_locked=false; - } - if (_item->checkState(0)==Qt::Checked){ - item2->setDefault(false); - item2->showDefault(true); - } - else - item2->showDefault(false); - - } - break; - case 1: { - //only one stream /type /type can be selected - if (_item->checkState(1)==Qt::Checked) { - QTreeWidgetItem *parent=_item->parent(); - for (int i=0; i childCount();i++) { - _k9StreamWidget *item=(_k9StreamWidget*) parent->child(i); - _k9StreamWidget *item2=(_k9StreamWidget*)_item; - //default checkbox is unchecked only if the stream is selected - if ( (item!=_item) && ( item->type()==item2->type()) && (item->checkState(0)==Qt::Checked)) - item->setDefault(false); - } - } - } - break; - default: - break; + if (_item->type()==QTreeWidgetItem::UserType+5) + return; + switch (_column) { + case 0: { + _k9StreamWidget *item2=(_k9StreamWidget*)_item; + + if ((!m_locked) && m_selectOne &&(_item->type()==AUDIO || _item->type()==SUBTITLE ) && _item->checkState(0)==Qt::Checked) { + m_locked=true; + QTreeWidgetItem *parent=_item->parent(); + for (int i=0; i childCount();i++) { + _k9StreamWidget *item=(_k9StreamWidget*) parent->child(i); + if ( (item!=item2) && ( item->type()==item2->type())) + item->setCheckState(0,Qt::Unchecked); + } + m_locked=false; + } + if (_item->checkState(0)==Qt::Checked) { + item2->setDefault(false); + item2->showDefault(true); + } else + item2->showDefault(false); + + } + break; + case 1: { + //only one stream /type /type can be selected + if (_item->checkState(1)==Qt::Checked) { + QTreeWidgetItem *parent=_item->parent(); + for (int i=0; i childCount();i++) { + _k9StreamWidget *item=(_k9StreamWidget*) parent->child(i); + _k9StreamWidget *item2=(_k9StreamWidget*)_item; + //default checkbox is unchecked only if the stream is selected + if ( (item!=_item) && ( item->type()==item2->type()) && (item->checkState(0)==Qt::Checked)) + item->setDefault(false); + } + } + } + break; + default: + break; } } @@ -143,56 +144,59 @@ _k9TitleWidget *item=new _k9TitleWidget(m_streams,_title); item->setText(0,_title->getname()); for (int i=0; i < _title->getaudioStreamCount();i++) { - _k9StreamWidget *audio=new _k9StreamWidget(_title->getaudioStream(i),item); + new _k9StreamWidget(_title->getaudioStream(i),item); } for (int i=0;i <_title->getsubPictureCount();i++) { _k9StreamWidget *subtitle=new _k9StreamWidget(_title->getsubtitle(i),item); + if (m_parent->destination()==dstAudio) + subtitle->setHidden(true); } item->setExpanded(true); m_streams->sortItems(0,Qt::AscendingOrder); - + updateColumns(); } void k9astStreams::removeTitle(k9DVDTitle *_title) { for (int i=0; i< m_streams->topLevelItemCount();i++) { _k9TitleWidget *item=(_k9TitleWidget*)m_streams->topLevelItem(i); if (item->title == _title) { - m_streams->takeTopLevelItem(i); - } + m_streams->takeTopLevelItem(i); + } } } void k9astStreams::updateStreams() { for (int i=0; i< m_streams->topLevelItemCount();i++) { - _k9TitleWidget *itemTitle=(_k9TitleWidget*)m_streams->topLevelItem(i); + _k9TitleWidget *itemTitle=(_k9TitleWidget*)m_streams->topLevelItem(i); itemTitle->title->setDefAudio(NULL); - itemTitle->title->setDefSubtitle(NULL); + itemTitle->title->setDefSubtitle(NULL); for (int c=0;c < itemTitle->childCount();c++) { - if (m_streams->topLevelItem(i)->childCount() ==0) - continue; + if (m_streams->topLevelItem(i)->childCount() ==0) + continue; _k9StreamWidget *w= (_k9StreamWidget*)itemTitle->child(c); if (w->type()==AUDIO) { - bool state=(w->checkState(0)==Qt::Checked)?true:false; + bool state=(w->checkState(0)==Qt::Checked)?true:false; w->audioStream->setselected(state); - if (w->audioStream->getselected() && (w->isDefault())) { - w->audioStream->gettitle()->setDefAudio(w->audioStream); - } - } + if (w->audioStream->getselected() && (w->isDefault())) { + w->audioStream->gettitle()->setDefAudio(w->audioStream); + } + } if (w->type()==SUBTITLE) { - bool state=(w->checkState(0)==Qt::Checked)?true:false; + bool state=(w->checkState(0)==Qt::Checked)?true:false; w->subtitle->setselected(state); - if (w->subtitle->getselected() && (w->isDefault())) { - w->subtitle->gettitle()->setDefSubtitle(w->subtitle); - } - } + if (w->subtitle->getselected() && (w->isDefault())) { + w->subtitle->gettitle()->setDefSubtitle(w->subtitle); + } + } } } } -void k9astStreams::selectOne() { +void k9astStreams::selectOne( bool _value) { + m_selectOne=_value; //keep only the first selected stream from each title (avi) - for (int i=0; i< m_streams->topLevelItemCount();i++) { + for (int i=0;m_selectOne && (i< m_streams->topLevelItemCount());i++) { bool audio=false; bool subp=false; for (int c=0;c < m_streams->topLevelItem(i)->childCount()-1;c++) { @@ -209,13 +213,27 @@ } } +void k9astStreams::hideSubtitles(bool _value) { + for (int i=0;i< m_streams->topLevelItemCount();i++) { + for (int c=0;c < m_streams->topLevelItem(i)->childCount();c++) { + _k9StreamWidget *w=(_k9StreamWidget*)m_streams->topLevelItem(i)->child(c); + if ( w->type()==SUBTITLE) { + w->setHidden(_value); + if (_value) + w->setCheckState(0,Qt::Unchecked); + } + } + } + +} + void k9astStreams::updateColumns() { - bool visible; - visible =((m_parent->destination()==dstDVD) ||(m_parent->destination()==dstFolder) || (m_parent->destination()==dstIso)) ; - m_streams->setColumnHidden(1,!visible); + bool visible; + visible =((m_parent->destination()==dstDVD) ||(m_parent->destination()==dstFolder) || (m_parent->destination()==dstIso)) ; + m_streams->setColumnHidden(1,!visible); if (visible) { - m_streams->setColumnWidth(0,m_streams->viewport()->width()); - m_streams->resizeColumnToContents(1); - m_streams->setColumnWidth(0,m_streams->viewport()->width()-m_streams->columnWidth(1)); + m_streams->setColumnWidth(0,m_streams->viewport()->width()); + m_streams->resizeColumnToContents(1); + m_streams->setColumnWidth(0,m_streams->viewport()->width()-m_streams->columnWidth(1)); } } diff -Nru k9copy-2.1.0/src/assistant/k9aststreams.h k9copy-2.2.0/src/assistant/k9aststreams.h --- k9copy-2.1.0/src/assistant/k9aststreams.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9aststreams.h 2009-02-19 22:30:17.000000000 +0100 @@ -31,8 +31,10 @@ ~k9astStreams(); enum eStreamType {AUDIO,SUBTITLE}; void updateStreams(); - void selectOne(); + void selectOne(bool); void updateColumns(); + void hideSubtitles(bool _value); + /*$PUBLIC_FUNCTIONS$*/ public slots: /*$PUBLIC_SLOTS$*/ @@ -50,6 +52,7 @@ QTreeWidget *m_streams; k9DVD *m_dvd; bool m_locked; + bool m_selectOne; }; diff -Nru k9copy-2.1.0/src/assistant/k9asttitles.cpp k9copy-2.2.0/src/assistant/k9asttitles.cpp --- k9copy-2.1.0/src/assistant/k9asttitles.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9asttitles.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -24,13 +24,19 @@ title=_title; setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable); setCheckState(0,Qt::Unchecked); + setTextAlignment(2,Qt::AlignRight); connect (title,SIGNAL(selectionChanged()),this,SLOT(titleChanged())); break; - default: - break; } } +_k9ItemWidget::_k9ItemWidget(k9DVDChapter *_chapter,QTreeWidgetItem *_treeWidget,int _type):QObject(0),QTreeWidgetItem(_treeWidget,_type) { + chapter=_chapter; + setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable); + setCheckState(0,Qt::Unchecked); + connect (chapter,SIGNAL(selectionChanged()),this,SLOT(chapterChanged())); + setTextAlignment(2,Qt::AlignRight); +} void _k9ItemWidget::titleChanged() { if (title->isSelected()) { @@ -42,15 +48,25 @@ } } +void _k9ItemWidget::chapterChanged() { + if (chapter->getSelected()) + setCheckState(0,Qt::Checked); + else + setCheckState(0,Qt::Unchecked); +} + bool _k9ItemWidget::operator< ( const QTreeWidgetItem & other ) const { + _k9ItemWidget *it=(_k9ItemWidget*)&other; + if (it->type()!= k9astTitles::TITLE) + return true; switch (treeWidget()->sortColumn()) { - case 1: - return title->getnumTitle() <((_k9ItemWidget*)&other)->title->getnumTitle(); - case 2: - return title->gettotalsize_mb() <((_k9ItemWidget*)&other)->title->gettotalsize_mb(); - default: - return 1; - } + case 1: + return title->getnumTitle() <((_k9ItemWidget*)&other)->title->getnumTitle(); + case 2: + return title->gettotalsize_mb() <((_k9ItemWidget*)&other)->title->gettotalsize_mb(); + default: + return true; + } } k9astTitles::k9astTitles(QWidget* parent,k9DVD *_dvd) @@ -59,6 +75,7 @@ m_dvd=_dvd; m_src=Ui_astTitles.twSource; m_preview=NULL; + m_currentItem=NULL; loadPlayer(); QTreeWidgetItem *header=m_src->headerItem(); header->setText(0,""); @@ -66,7 +83,8 @@ QCheckBox *ck=new QCheckBox(w); ck->setChecked(true); connect(ck,SIGNAL(toggled( bool )),this,SLOT(selectAll(bool))); - + connect(m_src,SIGNAL(itemChanged(QTreeWidgetItem*,int)),this,SLOT(ItemChanged(QTreeWidgetItem*,int))); + QGridLayout *layout=new QGridLayout(w); w->setContentsMargins(0,0,0,0); layout->addWidget(ck,0,0); @@ -82,22 +100,21 @@ m_useMplayer=config.getUseMplayer(); if (m_preview) { - delete m_preview; + delete m_preview; delete m_layout; } if (m_useXine) { - m_preview=new k9xine(Ui_astTitles.wPreview); - } - else if (m_usePhonon) { - m_preview=new k9Phonon(Ui_astTitles.wPreview); - }else if (m_useMplayer) - m_preview=new K9Mplayer(Ui_astTitles.wPreview); + m_preview=new k9xine(Ui_astTitles.wPreview); + } else if (m_usePhonon) { + m_preview=new k9Phonon(Ui_astTitles.wPreview); + } else if (m_useMplayer) + m_preview=new K9Mplayer(Ui_astTitles.wPreview); else m_preview=new kViewMPEG2(Ui_astTitles.wPreview); - connect(this,SIGNAL(sigshowPreview( k9DVD*, k9DVDTitle*,int )),m_preview,SLOT(open( k9DVD*, k9DVDTitle*,int ))); - connect(this,SIGNAL(sigstopPreview()),m_preview,SLOT(bStopClick())); + connect(this,SIGNAL(sigshowPreview( k9DVD*, k9DVDTitle*,int )),m_preview,SLOT(open( k9DVD*, k9DVDTitle*,int ))); + connect(this,SIGNAL(sigstopPreview()),m_preview,SLOT(bStopClick())); m_layout=new QGridLayout(Ui_astTitles.wPreview); m_layout->addWidget(m_preview,0,0); @@ -106,25 +123,75 @@ } void k9astTitles::itemActivated(QTreeWidgetItem* _item,int) { - _k9ItemWidget *item=(_k9ItemWidget*)_item; - if (item) { - // emit sigstopPreview();; - emit sigshowPreview(m_dvd,item->title,1); - } - + _k9ItemWidget *item=(_k9ItemWidget*)_item; + if (item) { + if (item->type()==TITLE) + emit sigshowPreview(m_dvd,item->title,1); + } + +} + +void k9astTitles::CurrentItemChanged(QTreeWidgetItem *_new,QTreeWidgetItem *_old) { + if (m_updating) + return; + _k9ItemWidget *previous,*current; + previous=(_k9ItemWidget*)_old; + current=(_k9ItemWidget*)_new; + if (current) { + if (current->type() ==TITLE) { +/* for (int i=0;i topLevelItemCount();i++) { + _k9ItemWidget *item=(_k9ItemWidget*) m_src->topLevelItem(i); + if (item != current) + item->setExpanded(false); + else + item->setExpanded(true); + } +*/ + m_currentItem=current; + itemActivated(current,0); + } + } +} + +void k9astTitles::ItemChanged(QTreeWidgetItem *_item,int col) { + Q_UNUSED(col); + if (m_updating) + return; + m_updating=true; + _k9ItemWidget *item=(_k9ItemWidget*)_item; + if ((item->type()==TITLE)) { + for (int i=0;i< item->childCount();i++) { + _k9ItemWidget *it=(_k9ItemWidget*)item->child(i); + it->setCheckState(0,item->checkState(0)); + } + + } else if (item->type()==CHAPTER) { + _k9ItemWidget *it=(_k9ItemWidget*)_item->parent(); + bool selected=false; + for (int i=0;ichildCount();i++) { + _k9ItemWidget *it2=(_k9ItemWidget*)it->child(i); + if (it2->checkState(0)==Qt::Checked) + selected=true; + } + if (!selected) + it->setCheckState(0,Qt::Unchecked); + else + it->setCheckState(0,Qt::Checked); + } + m_updating=false; } k9astTitles::~k9astTitles() { - emit sigstopPreview(); + emit sigstopPreview(); } void k9astTitles::unloadPreview() { - delete m_preview; + delete m_preview; } /*$SPECIALIZATION$*/ void k9astTitles::stopPreview() { - emit sigstopPreview(); + emit sigstopPreview(); } void k9astTitles::titleSelected(k9DVDTitle *_title) { @@ -138,42 +205,42 @@ } void k9astTitles::selectAll(bool _state) { - bool oldState; - for(int i=0; i < m_src->topLevelItemCount();i++) { - _k9ItemWidget *item=(_k9ItemWidget*) m_src->topLevelItem(i); - oldState=item->title->isSelected(); - if (_state) { - m_updating=true; - // all streams are checked by default + bool oldState; + for (int i=0; i < m_src->topLevelItemCount();i++) { + _k9ItemWidget *item=(_k9ItemWidget*) m_src->topLevelItem(i); + oldState=item->title->isSelected(); + if (_state) { + m_updating=true; + // all streams are checked by default for (int j=0;j < item->title->getaudioStreamCount();j++) { item->title->getaudioStream(j)->setselected(true); - if (j==0) - item->title->setDefAudio(item->title->getaudioStream(j)); - } + if (j==0) + item->title->setDefAudio(item->title->getaudioStream(j)); + } for (int j=0;j < item->title->getsubPictureCount();j++) { item->title->getsubtitle(j)->setselected(true); - if (j==0) - item->title->setDefSubtitle(item->title->getsubtitle(j)); - } - item->title->setvideoSelected(true); - m_updating=false; - if (_state!=oldState) - emit addTitle(item->title); - }else { - m_updating=true; + if (j==0) + item->title->setDefSubtitle(item->title->getsubtitle(j)); + } + item->title->setvideoSelected(true); + m_updating=false; + if (_state!=oldState) + emit addTitle(item->title); + } else { + m_updating=true; item->title->setSelected(false); - item->title->setDefSubtitle(NULL); - item->title->setDefAudio(NULL); - m_updating=false; - if(_state!=oldState) - emit removeTitle(item->title); - } - } + item->title->setDefSubtitle(NULL); + item->title->setDefAudio(NULL); + m_updating=false; + if (_state!=oldState) + emit removeTitle(item->title); + } + } } void k9astTitles::fill() { m_src->clear(); - + m_currentItem=NULL; for (int i=0;i < m_dvd->gettitleCount();i++) { k9DVDTitle *title=m_dvd->gettitle(i); @@ -185,7 +252,10 @@ item->setText(0,""); item->setText(1,QString("%1").arg(title->getname())); item->setText(2,QString("%1 %2").arg(title->gettotalsize_mb(),0,'f',2).arg(i18n("MB"))); - + if (!m_currentItem) { + m_currentItem=item; + } + addChapters(item,title); // all streams are checked by default title->setSelected(true); m_updating=false; @@ -195,13 +265,40 @@ m_src->sortItems(1,Qt::AscendingOrder); } +void k9astTitles::addChapters(QTreeWidgetItem *_parent,k9DVDTitle *_title) { + + //_parent->setExpanded(true); + + int ch=0; + for (int i=0;i< _title->getchapterCount();i++) { + _k9ItemWidget *it =new _k9ItemWidget(_title->getChapter(i),_parent,k9astTitles::CHAPTER); + it->setText(1,i18n("chapter %1",++ch)); + QString s; -void k9astTitles::resizeEvent ( QResizeEvent * event ) { - m_src->setColumnWidth(1,m_src->viewport()->width()); + s=QString("%1").arg((double)(_title->getChapter(i)->getsectors()) /512,0,'f',2); + it->setText(2,i18n("%1 MB",s)); + } + for (int j=0;j <_title->getTitles().count();j++) { + k9DVDTitle *title2=_title->getTitles().at(j); + for (int i=0;i< title2->getchapterCount();i++) { + _k9ItemWidget *it =new _k9ItemWidget(title2->getChapter(i),_parent,k9astTitles::CHAPTER); + it->setText(1,i18n("chapter %1",++ch)); + QString s; + s=QString("%1").arg((double)(title2->getChapter(i)->getsectors()) /512,0,'f',2); + + it->setText(2,i18n("%1 MB",s)); + } + + } + +} + +void k9astTitles::resizeEvent ( QResizeEvent * ) { + m_src->setColumnWidth(1,m_src->viewport()->width()); m_src->resizeColumnToContents(0); m_src->resizeColumnToContents(2); - m_src->setColumnWidth(1,m_src->viewport()->width()-m_src->columnWidth(0)-m_src->columnWidth(2)); + m_src->setColumnWidth(1,m_src->viewport()->width()-m_src->columnWidth(0)-m_src->columnWidth(2)-10); } @@ -214,9 +311,16 @@ } else if (!item->title->isSelected()) { m_updating=true; - item->title->setSelected(true); - m_updating=false; + + for(int iChapter=0;iChapterchildCount();iChapter++) { + _k9ItemWidget *itc=(_k9ItemWidget*)item->child(iChapter); + itc->chapter->setSelected(itc->checkState(0)==Qt::Checked); + } + item->title->setSelected(true); emit addTitle(item->title); + + m_updating=false; + } } //reselectionner les titres qui ont été recochés @@ -226,10 +330,10 @@ bool ok=false; for (int i=0;i < m_dvd->gettitleCount();i++) { k9DVDTitle *title=m_dvd->gettitle(i); - ok= (title->getIndexed() && title->isSelected())?true:ok; - - } - return ok; + ok= (title->getIndexed() && title->isSelected())?true:ok; + + } + return ok; } diff -Nru k9copy-2.1.0/src/assistant/k9asttitles.h k9copy-2.2.0/src/assistant/k9asttitles.h --- k9copy-2.1.0/src/assistant/k9asttitles.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/assistant/k9asttitles.h 2009-02-19 22:30:17.000000000 +0100 @@ -20,12 +20,13 @@ class _k9ItemWidget; class k9DVD; class k9DVDTitle; +class k9DVDChapter; class k9astTitles : public QWidget { Q_OBJECT public: - enum itemType {TITLE,AUDIO,SUBTITLE,VIDEO}; + enum itemType {TITLE,CHAPTER,AUDIO,SUBTITLE,VIDEO}; k9astTitles(QWidget* parent,k9DVD *_dvd); ~k9astTitles(); @@ -44,10 +45,12 @@ protected: /*$PROTECTED_FUNCTIONS$*/ void resizeEvent ( QResizeEvent * event ); - + void addChapters(QTreeWidgetItem *_parent,k9DVDTitle *_title); protected slots: /*$PROTECTED_SLOTS$*/ void itemActivated(QTreeWidgetItem*,int); + void CurrentItemChanged(QTreeWidgetItem *_new,QTreeWidgetItem *_old); + void ItemChanged(QTreeWidgetItem*,int); void selectAll(bool); private: bool m_useXine,m_usePhonon,m_useMplayer; @@ -57,6 +60,7 @@ bool m_updating; QWidget *m_preview; QGridLayout *m_layout; + _k9ItemWidget *m_currentItem; signals: void addTitle(k9DVDTitle *_title); void removeTitle(k9DVDTitle *_title); @@ -69,11 +73,14 @@ Q_OBJECT public: _k9ItemWidget(k9DVDTitle *_title,QTreeWidget *_treeWidget,int _type); + _k9ItemWidget(k9DVDChapter *_chapter,QTreeWidgetItem *_treeWidget,int _type); k9DVDTitle *title; + k9DVDChapter *chapter; k9astTitles *astTitle; bool operator< ( const QTreeWidgetItem & other ) const ; private slots: void titleChanged(); + void chapterChanged(); }; diff -Nru k9copy-2.1.0/src/backup/k9backupdlg.cpp k9copy-2.2.0/src/backup/k9backupdlg.cpp --- k9copy-2.1.0/src/backup/k9backupdlg.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9backupdlg.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -35,14 +35,13 @@ #include "k9drawimage.h" k9BackupDlg::k9BackupDlg(QWidget* parent) - : QDialog(parent) { + : QDialog(parent),k9InternalPlayer() { ui_backupDlg.setupUi(this); setModal(true); setWindowTitle(KDialog::makeStandardCaption(i18n("Backup progression"),this)); Abort=false; timer = new QTimer( this ); - time = new QTime(0,0); - time->start(); + time.start(); connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) ); connect(ui_backupDlg.bPlay,SIGNAL(toggled( bool )),this,SLOT(bPlayToggled(bool))); timer->start(500 ); @@ -53,28 +52,27 @@ m_totalSteps=0; m_factor=""; m_progress=0; - connect(&m_decoder, SIGNAL(pixmapReady(QImage *)), this, SLOT(drawPixmap(QImage *))); +// connect(&m_decoder, SIGNAL(pixmapReady(QImage *)), this, SLOT(drawPixmap(QImage *))); + m_decoder.setBackupDlg(this); m_stop=false; m_playmovie=true; - m_cpt=0; m_wimage=new k9DrawImage(ui_backupDlg.image); QGridLayout *l=new QGridLayout(ui_backupDlg.image); l->addWidget(m_wimage,0,0); ui_backupDlg.bPlay->setDown(true); ui_backupDlg.bAbort->setGuiItem(KStandardGuiItem::Stop); - m_data=NULL; - m_dataSize=0; + m_timer.start(); } -void k9BackupDlg::drawPixmap(QImage *_image) { - m_count++; - if (m_count ==4) { - - //m_wimage->setImage(*_image); +void k9BackupDlg::drawImage(QImage *_image) { + //m_wimage->setImage(*_image); + static int cpt=0; + if (cpt>4) { m_image=*_image; m_wimage->setImage(m_image); - m_stop=true; - } + cpt=0; + } else + cpt++; } void k9BackupDlg::bPlayToggled( bool state) { @@ -82,62 +80,45 @@ } void k9BackupDlg::playMovie(uchar *_data,uint32_t _size) { - if (!m_playmovie || m_dataSize) - return; - m_count=0; - m_dataSize=_size; - m_data=new uchar[_size]; - tc_memcpy(m_data,_data,_size); + if (!m_playmovie || (m_timer.elapsed() <3000)) + return;; + if (m_mutex.tryLock()) { + uint32_t maxSize=_size; + for (uint32_t i=0;i< maxSize-2048;i+=2048) { + m_decoder.addData(_data+i ,2048); + } + // m_decoder.Stop(); + m_mutex.unlock(); + } + m_timer.restart(); } k9BackupDlg::~k9BackupDlg() { delete timer; - delete time; } -void k9BackupDlg::update() { +void k9BackupDlg::updateMe() { ui_backupDlg.lblStep->setText(m_progressLabel); ui_backupDlg.pbTotal->setValue(m_progressTotal); ui_backupDlg.pbStep->setMaximum(m_totalSteps); ui_backupDlg.lblFactor->setText(m_factor); ui_backupDlg.pbStep->setValue(m_progress); - if (m_data) { - if (m_stop) - m_decoder.start(); - m_stop=false; - for (uint32_t i=0;iisDown(); - } QTime time2(0,0); - time2=time2.addMSecs(time->elapsed()); + time2=time2.addMSecs(time.elapsed()); QString remain("--:--:--"); if (m_progressTotal>0) { QTime time3(0,0); - time3=time3.addMSecs((time->elapsed()/m_progressTotal)*ui_backupDlg.pbTotal->maximum()); + time3=time3.addMSecs((time.elapsed()/m_progressTotal)*ui_backupDlg.pbTotal->maximum()); remain=time3.toString("hh:mm:ss"); } ui_backupDlg.lblTime->setText(time2.toString("hh:mm:ss") +" / " +remain); - update(); + updateMe(); } void k9BackupDlg::setTotalSteps(uint32_t _totalSteps) { diff -Nru k9copy-2.1.0/src/backup/k9backupdlg.h k9copy-2.2.0/src/backup/k9backupdlg.h --- k9copy-2.1.0/src/backup/k9backupdlg.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9backupdlg.h 2009-02-19 22:30:17.000000000 +0100 @@ -24,11 +24,11 @@ #include "k9common.h" #include "ui_backupdlg.h" #include -#include "kdecmpeg2.h" - +#include "k9decodethread.h" +#include "k9internalplayer.h" class k9DrawImage; -class k9BackupDlg : public QDialog +class k9BackupDlg : public QDialog,k9InternalPlayer { Q_OBJECT @@ -49,29 +49,29 @@ private : bool Abort; QTimer *timer; - QTime *time; + QTime time; + QTime m_timer; uint64_t totalCopied,m_progressTotal;; QString m_progressLabel; uint32_t m_totalSteps,m_progress; QString m_factor; bool m_stop; - void update(); - kDecMPEG2 m_decoder; + void updateMe(); + k9DecodeThread m_decoder; uint m_count; - QMutex mutex; + QMutex m_mutex; bool m_playmovie; - uint m_cpt; k9DrawImage *m_wimage; Ui::backupDlg ui_backupDlg; QImage m_image; - uchar *m_data; - uint32_t m_dataSize; protected: /*$PROTECTED_FUNCTIONS$*/ +public: + void drawImage(QImage *image); protected slots: /*$PROTECTED_SLOTS$*/ void timerDone(); - void drawPixmap(QImage *image); + void bAbortClick(); void bPlayToggled(bool state); diff -Nru k9copy-2.1.0/src/backup/k9convertaudio.cpp k9copy-2.2.0/src/backup/k9convertaudio.cpp --- k9copy-2.1.0/src/backup/k9convertaudio.cpp 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9convertaudio.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,197 @@ +// +// C++ Implementation: k9convertaudio +// +// Description: +// +// +// Author: <>, (C) 2008 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "k9convertaudio.h" +#include "k9process.h" +#include +#include +#include + + + + +k9ConvertAudio::~k9ConvertAudio() { + delete m_fifo; +} + + +k9ConvertAudio::k9ConvertAudio(const QString &_output,const QStringList &_cmd):QThread(NULL) { + if (_output !="") { + m_fileName=_output; + QFile::remove(_output); + } + m_fifo=new k9MemoryFifo(); + m_cmd=_cmd; + m_debug=false; + m_error=false; +} + +void k9ConvertAudio::finished ( int exitCode, QProcess::ExitStatus exitStatus ) { + Q_UNUSED(exitCode); + Q_UNUSED(exitStatus); + if (!m_nodata) + m_error=true; +} + + +void _k9ConvertOutput::finished ( int exitCode, QProcess::ExitStatus exitStatus ) { + m_parent->finished(exitCode,exitStatus); +} + +_k9ConvertOutput::_k9ConvertOutput(k9ConvertAudio *parent):QObject(){ + m_parent=parent; +} + +void _k9ConvertOutput::getStdout(KProcess *, char *buffer, int buflen) { + QString tmp( QByteArray(buffer,buflen)); + if (! tmp.isEmpty()) { + m_parent->getOutput() << tmp; + if (m_parent->getOutput().count() > 10) + m_parent->getOutput().removeAt(0); + } + if (m_parent->getCmd().at(0).contains("mencoder")) { + + + int pos=tmp.indexOf("Pos:"); + if (pos!=-1) { + QString tmp2=tmp.mid(pos); + float t; + int frame; + int fps; + sscanf(tmp2.toUtf8(),"Pos: %f%*s%d",&t,&frame); + tmp2=tmp2.mid(tmp2.indexOf("(")+1); + tmp2=tmp2.mid(tmp2.indexOf(")")+1); + sscanf(tmp2.toUtf8(),"%d",&fps); + + m_parent->setFps(QString::number(fps)); + } + } + if (m_parent->getCmd().at(0).contains("ffmpeg")) { + int pos=tmp.indexOf("fps="); + if (pos!=-1) { + QString tmp2=tmp.mid(pos+4); + pos=tmp2.indexOf("q"); + if (pos!=-1) + m_parent->setFps(tmp2.mid(0,pos)); + } + + } + +} + + +void k9ConvertAudio::run() { + _k9ConvertOutput *output=new _k9ConvertOutput(this); + m_nodata=false; + m_error=false; + m_process=new k9Process(0,0); + connect(m_process, SIGNAL(finished ( int , QProcess::ExitStatus )),output,SLOT(finished(int, QProcess::ExitStatus))); + connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)),output, SLOT(getStdout(KProcess *, char *, int) )); + connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)),output, SLOT(getStdout(KProcess *, char *, int) )); + m_process->setDebugOutput(m_debug); + if (m_fileName!="") { + *m_process << "ffmpeg" << "-i" << "/dev/stdin" << m_fileName; + } else { + foreach (QString s, m_cmd) + *m_process << s; + } + qDebug() << m_process->debug(); + m_process->start(); + + + while (m_process->isRunning()) { + int size=m_fifo->count(); + size=qMin(size,4096); + + if (size >0 ) { + while ((m_process->bytesToWrite() >size) && m_process->isRunning()) + m_process->waitForBytesWritten(10); + + uchar buffer[size]; + //m_fifo->dequeue(buffer,size); + m_fifo->readData(buffer,size); + if (m_process->isRunning()) + m_process->write((char*)buffer,size); + //m_dataReady.wakeAll(); + + } else if (m_nodata) { + while (m_process->bytesToWrite() >0) + m_process->waitForBytesWritten(); + m_process->closeWriteChannel(); + m_process->wait(); + } else { + m_process->waitForFinished(10); + } + } + delete output; +} + +void k9ConvertAudio::addData(uchar *_buffer,int _size) { +/* m_nodata=false; + + if (!isRunning()) + start(); + while (_size >m_fifo->freespace()) { + QMutex m; + m_dataReady.wait(&m); + } + m_fifo->enqueue(_buffer,_size); +*/ + if (m_error) + return; + + if (!isRunning()) + start(); + m_fifo->addData(_buffer,_size); +} +void k9ConvertAudio::end(bool _wait) { + m_nodata=true; + m_fifo->setNoData(); + while (isRunning() && _wait) { + wait(100); + qApp->processEvents(); + } +} + +void k9ConvertAudio::test() { + +} + + +QString k9ConvertAudio::getFps() const { + return m_fps; +} + + +void k9ConvertAudio::setFps(const QString& theValue) { + m_fps = theValue; +} + + +QStringList k9ConvertAudio::getCmd() const { + return m_cmd; +} + + +void k9ConvertAudio::setDebug(bool theValue) { + m_debug = theValue; +} + + +bool k9ConvertAudio::Error() const { + return m_error; +} + + +QStringList &k9ConvertAudio::getOutput() { + return m_output; +} diff -Nru k9copy-2.1.0/src/backup/k9convertaudio.h k9copy-2.2.0/src/backup/k9convertaudio.h --- k9copy-2.1.0/src/backup/k9convertaudio.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9convertaudio.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,71 @@ +// +// C++ Interface: k9convertaudio +// +// Description: +// +// +// Author: <>, (C) 2008 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef K9CONVERTAUDIO_H +#define K9CONVERTAUDIO_H + +#include "k9process.h" +#include +#include "k9fifo.h" +#include +#include + + + +class k9ConvertAudio: public QThread { + Q_OBJECT +public: + k9ConvertAudio(const QString &_output,const QStringList &_cmd) ; + ~k9ConvertAudio(); + void addData(uchar *_buffer,int _size); + void end(bool _wait=true); + static void test(); + + QString getFps() const; + void setFps(const QString& theValue); + QStringList getCmd() const; + void setDebug(bool theValue); + +protected: + virtual void run(); +public slots: + void finished ( int exitCode, QProcess::ExitStatus exitStatus ); + bool Error() const; + + QStringList & getOutput() ; + + +private: + k9Process *m_process; + QString m_fileName; + k9MemoryFifo *m_fifo; + bool m_nodata; + QStringList m_cmd; + QStringList m_output; + QWaitCondition m_dataReady; + QEventLoop m_eventLoop; + QString m_fps; + bool m_debug; + bool m_error; +}; + +class _k9ConvertOutput: public QObject { + Q_OBJECT +public: + _k9ConvertOutput(k9ConvertAudio *parent); +private: + k9ConvertAudio *m_parent; +public slots: + void getStdout(KProcess *, char *buffer, int buflen) ; + void finished ( int exitCode, QProcess::ExitStatus exitStatus ); + +}; +#endif diff -Nru k9copy-2.1.0/src/backup/k9dvdauthor.cpp k9copy-2.2.0/src/backup/k9dvdauthor.cpp --- k9copy-2.1.0/src/backup/k9dvdauthor.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9dvdauthor.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -372,7 +372,7 @@ e.setAttribute("file",file); if (first) - e.setAttribute("chapters",l_chap->gettime().toString("0")); + e.setAttribute("chapters",l_chap->getTime().toString("0")); pgc.appendChild(e); first=false; } diff -Nru k9copy-2.1.0/src/backup/k9dvdbackup.cpp k9copy-2.2.0/src/backup/k9dvdbackup.cpp --- k9copy-2.1.0/src/backup/k9dvdbackup.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9dvdbackup.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -98,7 +98,8 @@ vamps=new k9vamps(this); m_withMenu=false; m_forcedFactor=false; - m_preserve=true; + m_preserve=true; + m_userOps=false; } @@ -220,6 +221,7 @@ void k9DVDBackup::copyCell(int _VTS,k9Cell * _cell,bool _empty) { + if (error) return; @@ -334,9 +336,7 @@ void k9DVDBackup::getOutput(uchar * buffer, uint32_t buflen) { if (error) return; - mutex.lock(); backupDlg->playMovie(buffer,buflen); - mutex.unlock(); if (!m_forcedFactor) m_cellCopyList->addOutbytes( buflen); @@ -808,9 +808,7 @@ else m_cellCopyList->addFrcinbytes( nsectors*DVD_VIDEO_LB_LEN); - mutex.lock(); qApp->processEvents(); - mutex.unlock(); return (end+1); } @@ -929,7 +927,8 @@ pgc->command_tbl->nr_of_post=0; pgc->command_tbl->nr_of_cell=0; } - + if (m_userOps) + memset(&(pgc->prohibited_ops),0,sizeof(user_ops_t)); cell_playback_t *cell_playback =pgc->cell_playback; uint32_t nr= pgc->nr_of_cells; @@ -1023,7 +1022,8 @@ for (uint i2=0 ; i2 nr_of_pgci_srp;i2++) { pgci_srp_t * pgci_srp=&pgcit->pgci_srp[i2]; pgc_t *pgc=pgci_srp->pgc; - + if (m_userOps) + memset(&(pgc->prohibited_ops),0,sizeof(user_ops_t)); if (! m_withMenu && pgc->command_tbl!=0) { pgc->command_tbl->nr_of_pre=0; @@ -1169,6 +1169,9 @@ //update first play PGC if (hifo->first_play_pgc !=NULL ) { pgc_t *pgc=hifo->first_play_pgc; + if (m_userOps) + memset(&(pgc->prohibited_ops),0,sizeof(user_ops_t)); + if (! m_withMenu && pgc->command_tbl!=0) { pgc->command_tbl->nr_of_pre=0; pgc->command_tbl->nr_of_post=0; @@ -1228,6 +1231,8 @@ for (uint32_t i = 0; i < pgcit->nr_of_pgci_srp; i++) { pgc_t *pgc=pgcit->pgci_srp[i].pgc; int numTitle=pgcit->pgci_srp[i].entry_id & 0x7F; + if (m_userOps) + memset(&(pgc->prohibited_ops),0,sizeof(user_ops_t)); if (! m_withMenu) { k9Script *script=new k9Script(hifo,DVD); @@ -1439,6 +1444,8 @@ //vobu=remapVobu(&dsiPack.dsi_gi.nv_pck_lbn ); sector=vobu->oldSector; dsiPack.dsi_gi.nv_pck_lbn=vobu->newSector; + if (m_userOps) + memset(&(pciPack.pci_gi.vobu_uop_ctl),0,sizeof(user_ops_t)); if (vobu != NULL) { dsiPack.dsi_gi.vobu_ea = vobu->size; emptyPgc=vobu->empty; @@ -1693,6 +1700,7 @@ void k9DVDBackup::execute() { + QString sOutput=output; output=QDir::cleanPath(output +"/" + DVD->getDVDTitle()); @@ -1775,3 +1783,8 @@ k9Dialogs::error(errMsg,"DVD Backup"); //m_dvdread->close(); } + + +void k9DVDBackup::setUserOps(bool theValue) { + m_userOps = theValue; +} diff -Nru k9copy-2.1.0/src/backup/k9dvdbackup.h k9copy-2.2.0/src/backup/k9dvdbackup.h --- k9copy-2.1.0/src/backup/k9dvdbackup.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9dvdbackup.h 2009-02-19 22:30:17.000000000 +0100 @@ -80,6 +80,10 @@ virtual QWidget *getDialog() {return (QWidget*)backupDlg;}; public slots: void getOutput(uchar *buffer,uint32_t size); + void getOutput(eStreamType streamType,int streamNumber,uchar *buffer,uint32_t size){Q_UNUSED(streamType); Q_UNUSED(streamNumber); Q_UNUSED(buffer); Q_UNUSED(size);}; + + void setUserOps(bool theValue); + protected: QString device; @@ -90,6 +94,7 @@ bool m_copyMenu; bool m_withMenu; bool m_forcedFactor; + bool m_userOps; k9DVD *DVD; QString errMsg; QString vampsMsg; diff -Nru k9copy-2.1.0/src/backup/k9execcopy.cpp k9copy-2.2.0/src/backup/k9execcopy.cpp --- k9copy-2.1.0/src/backup/k9execcopy.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9execcopy.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -1,7 +1,7 @@ // // C++ Implementation: k9execcopy // -// Description: +// Description: // // // Author: <>, (C) 2008 @@ -22,6 +22,16 @@ #include "k9dvdtitle.h" #include "k9titleencopt.h" #include "k9burndvd.h" +#include "k9play.h" +#include +#include +#include "k9audiocodecs.h" +#include "k9videocodecs.h" + +k9ExecCopy::k9ExecCopy():QObject(0) { + m_speed= i18n("default"); +} + void k9ExecCopy::copyDVD() { k9Config config; @@ -40,13 +50,13 @@ if (m_output==oISO) { filename=m_path; - } else{ - if (m_output==oFolder) - outputDir= m_path; - QDir dir(m_path); - if (!dir.exists()) { - dir.mkpath(m_path); - } + } else { + if (m_output==oFolder) + outputDir= m_path; + QDir dir(m_path); + if (!dir.exists()) { + dir.mkpath(m_path); + } } long fs=k9Tools::getFreeSpace(outputDir); @@ -63,6 +73,7 @@ backup->setOutput(outputDir); backup->setDevice(m_dvd->getDevice()); backup->setWithMenus( m_copyMenus); + backup->setUserOps(config.getPrefUserOps()); backup->execute(); burn=backup->getErrMsg()==""; delete backup; @@ -83,17 +94,20 @@ b.setUseK3b(config.getPrefK3b()); b.setAutoBurn(config.getPrefAutoBurn()); b.setvolId(m_dvd->getDVDTitle()); - b.setSpeed( i18n("default")); + + b.setSpeed(m_speed); if (m_output==oDVD) { b.setburnDevice(m_path); m_dvd->close(); - if (m_dvd->getDevice()==m_path) + if (m_dvd->getDevice()==m_path) { b.setAutoBurn(false); + b.setEject(true); + } } else b.makeIso(m_path); b.burn(); } else if (burn && m_output==oFolder) - k9Dialogs::information( i18n("Selected titles have been successfully extracted"), i18n("DVD Copy") ); + k9Dialogs::information( i18n("Selected titles have been successfully extracted"), i18n("DVD Copy") ); } @@ -117,22 +131,23 @@ for (int i=0; i < m_dvd->gettitleCount();i++) { k9DVDTitle *t=m_dvd->gettitle(i); - + if (t->isSelected() && t->getIndexed() ) { QString name; if (filename=="") - filename=k9Dialogs::getSaveFileName (QDir::homePath(),"*.avi|Audio Video Interleave (*.avi)\n*.mpg|MPEG-1 and MPEG-2 systems (*.mpg)\n*.mp4|MPEG-4 format (*.mp4)\n*.asf|Advanced Streaming Format (*.asf)\n*.swf|Adobe Flash (*.swf)\n*.flv|Adobe Flash video files (*.flv)\n*.rm|RealVideo (*.rm)\n*.mov|QuickTime (*.mov)", 0,i18n("Save file to disk")); + filename=k9Dialogs::getSaveFileName (QDir::homePath(),"*.avi|Audio Video Interleave (*.avi)\n*.mpg|MPEG-1 and MPEG-2 systems (*.mpg)\n*.mp4|MPEG-4 format (*.mp4)\n*.asf|Advanced Streaming Format (*.asf)\n*.swf|Adobe Flash (*.swf)\n*.flv|Adobe Flash video files (*.flv)\n*.rm|RealVideo (*.rm)\n*.mov|QuickTime (*.mov)\n*.mkv|Matroska (*.mkv)", 0,i18n("Save file to disk")); if (filename=="") { bStop=true; break; } - + QString path=filename; + bool matroska=filename.endsWith(".mkv"); k9MP4Enc *mp4=new k9MP4Enc(); if (cpt >0) { QString ext=filename.section(".",-1); if (ext!="") ext="."+ext; - QString path=filename.left(filename.length()-ext.length()); + path=filename.left(filename.length()-ext.length()); path=path+QString::number(cpt)+ext; mp4->setFilename(path); } else @@ -143,8 +158,8 @@ mp4->setDevice(m_dvd->getDevice()); mp4->setAudioBitrate(opt->getAudioBr()); mp4->setVideoBitrate(opt->getVideoBr()); - mp4->setCodec( opt->getCodec()); - mp4->setAudioCodec(opt->getAudioCodec()); + mp4->setCodec(k9VideoCodecs::getAbsCodecNum(opt->getCodec(),opt->getEncoder())); + mp4->setAudioCodec(k9AudioCodecs::getAbsCodecNum(opt->getAudioCodec(), opt->getEncoder())); mp4->setSize(QString::number(opt->getMaxSize())); mp4->setAudioGain(QString::number(opt->getAudioGain())); mp4->setNumberCD(QString::number(opt->getNumParts())); @@ -152,8 +167,24 @@ mp4->setHeight(opt->getHeight()); mp4->set2Passes( opt->get2Passes()); mp4->setUseCache(opt->getUseCache()); + + if (matroska) { + if ( ! k9Tools::checkProgram("mkvmerge") ) { + k9Dialogs::error (i18n("Unable to run %1","mkvmerge") , i18n("Encoding error")); + delete mp4; + return ; + } + mp4->setExtractAudio(false); + mp4->setExtractMkv(true); + mp4->setExtractSubtitle(true); + mp4->setSplitChapters(false); + mp4->setFilename(config.getPrefOutput()+"/"+KRandom::randomString(8)); + } mp4->execute(t); bStop=mp4->isCanceled(); + if (matroska && !bStop) { + createMkv(t,path,mp4->getResultingFiles(),opt->getNumParts()); + } delete mp4; if (bStop) break; @@ -164,11 +195,117 @@ } +void k9ExecCopy::MkvStdout(KProcess *, char *buffer, int size) { + QByteArray ba(buffer,size); + m_outputMsg << ba; + if (m_outputMsg.count() > 50) + m_outputMsg.removeFirst(); + QStringList sl=QString(ba).split("\r"); + foreach(QString s,sl) { + if (s.contains("gress:")) { + int p =s.indexOf("%"); + if (p!=-1) { + QString pos=s.mid(p-3,3).trimmed(); + m_mkvPos=pos.toInt(); + m_progressDialog->progressBar()->setValue(m_mkvPos); + } + } + } +} + +void k9ExecCopy::finished(int, QProcess::ExitStatus _status) { + m_progressDialog->progressBar()->setValue(100); +} + +void k9ExecCopy::createMkv(k9DVDTitle *_title,const QString &_filename,QMultiMap< int, k9ResultingFile* > _files,int _nbParts) { + k9Process process; + process << "mkvmerge" << "-o" << _filename; + process.setDebugOutput(false); + int streamId=1; + k9Config config; + + QFile mkvChapter(config.getPrefOutput()+"/"+KRandom::randomString(8)); + mkvChapter.open(QIODevice::ReadWrite); + + QList chapters=_title->getChapters(); + short int num=1; + QTime startTime(0,0,0); + foreach (k9DVDChapter *chapter ,chapters) { + if (chapter->getSelected()) { + QString start=QString("CHAPTER%1=%2\n").arg(num,2,10,QChar('0')).arg(startTime.toString("hh:mm:ss.zzz")); + startTime=startTime.addMSecs(QTime().msecsTo(chapter->getLength())); + mkvChapter.write(start.toUtf8()); + QString name=QString("CHAPTER%1NAME=Chapter %2\n").arg(num,2,10,QChar('0')).arg(num); + mkvChapter.write(name.toUtf8()); + num++; + } + } + QList titles=_title->getTitles(); + + foreach (k9DVDTitle *title,titles) { + chapters=title->getChapters(); + foreach (k9DVDChapter *chapter,chapters) { + if (chapter->getSelected()) { + QString start=QString("CHAPTER%1=%2\n").arg(num,2,10,QChar('0')).arg(startTime.toString("hh:mm:ss.zzz")); + startTime=startTime.addMSecs(QTime().msecsTo(chapter->getLength())); + mkvChapter.write(start.toUtf8()); + QString name=QString("CHAPTER%1NAME=Chapter %2\n").arg(num,2,10,QChar('0')).arg(num); + mkvChapter.write(name.toUtf8()); + num++; + } + } + } + mkvChapter.close(); + for (int i=0;i<_title->getaudioStreamCount();i++) { + if (_title->getaudioStream(i)->getselected()) { + process <<"--language" << QString("%1:%2").arg(streamId++).arg(_title->getaudioStream(i)->getlangCod()); + } + } + + process << "--chapters" << mkvChapter.fileName(); + + qint64 totalSize=0; + + connect(&process,SIGNAL(receivedStdout(KProcess*, char*, int)),this,SLOT(MkvStdout(KProcess*, char*, int))); + connect(&process, SIGNAL(finished ( int , QProcess::ExitStatus )),this,SLOT(finished(int, QProcess::ExitStatus))); + foreach (k9ResultingFile *rf,_files) { + process << rf->filename; + QString fname= rf->filename; + if (fname.endsWith(".idx")) + fname=fname.replace(".idx",".sub"); + QFileInfo inf(fname); + totalSize+=inf.size(); + } + totalSize/=(1024*1024); + if (_nbParts >1) + process << "--split"<< QString("size:%1m").arg((int)(totalSize/_nbParts)); + qDebug() << process.debug(); + + m_progressDialog=new KProgressDialog(k9Dialogs::getMainWidget() ); + m_progressDialog->showCancelButton(false); + m_progressDialog->progressBar()->setMaximum(100); + m_progressDialog->setAutoClose(true); + m_progressDialog->setLabelText(i18n("Muxing Matroska file")); + process.start(); + //process.sync(); + m_progressDialog->exec(); + process.wait(); + + delete m_progressDialog; + foreach (k9ResultingFile *rf,_files) { + QFile f(rf->filename); + f.remove(); + } + mkvChapter.remove(); + if ( m_mkvPos !=100) + k9Dialogs::error(i18n("An error occured while running mkvmerge"),i18n("Muxing Matroska"),m_outputMsg); + m_outputMsg.clear(); +} void k9ExecCopy::extractMPEG2() { - k9Config config; - - if (!m_dvd->getopened()) { + k9Config config; + + if (!m_dvd->getopened()) { k9Dialogs::error( i18n("DVD is not opened"), i18n("MPEG-4 Encoding")); return; } @@ -207,7 +344,67 @@ cpt++; mp4->setDevice(m_dvd->getDevice()); - mp4->setUseCache(false); + mp4->setUseCache(false); + mp4->execute(t); + bStop=mp4->isCanceled(); + delete mp4; + if (bStop) + break; + } + } + if (!bStop) + k9Dialogs::information( i18n("Selected titles have been successfully extracted"), i18n("Encoding") ); + + +} + +void k9ExecCopy::extractAudio() { + k9Config config; + + if (!m_dvd->getopened()) { + k9Dialogs::error( i18n("DVD is not opened"), i18n("Audio Extraction")); + return; + } + QString filename=m_path; + int cpt=0; + bool bStop=false; + + QDir dir(config.getPrefOutput()); + if (!dir.exists()) { + dir.mkpath(config.getPrefOutput()); + } + + for (int i=0; i < m_dvd->gettitleCount();i++) { + k9DVDTitle *t=m_dvd->gettitle(i); + + if (t->isSelected() && t->getIndexed() ) { + QString name; + if (filename=="") + filename=k9Dialogs::getSaveFileName (QDir::homePath(),"*.mpg|MPEG-1 and MPEG-2 systems (*.mpg)", 0,i18n("Save file to disk")); + if (filename=="") { + bStop=true; + break; + } + k9TitleEncOpt * opt=t->getEncOpt(); + + k9MP4Enc *mp4=new k9MP4Enc(); + mp4->setExtractAudio(true); + mp4->setSplitChapters(true); + mp4->setAudioCodec(k9AudioCodecs::getAbsCodecNum( opt->getAudioCodec(),opt->getEncoder()) ); + + if (cpt >0) { + QString ext=filename.section(".",-1); + if (ext!="") + ext="."+ext; + QString path=filename.left(filename.length()-ext.length()); + path=path+QString::number(cpt)+ext; + mp4->setFilename(path); + } else + mp4->setFilename(filename); + + cpt++; + mp4->setDevice(m_dvd->getDevice()); + mp4->setUseCache(false); mp4->execute(t); bStop=mp4->isCanceled(); delete mp4; @@ -222,3 +419,7 @@ } + +void k9ExecCopy::setSpeed(const QString& theValue) { + m_speed = theValue; +} diff -Nru k9copy-2.1.0/src/backup/k9execcopy.h k9copy-2.2.0/src/backup/k9execcopy.h --- k9copy-2.1.0/src/backup/k9execcopy.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9execcopy.h 2009-02-19 22:30:17.000000000 +0100 @@ -12,38 +12,55 @@ #ifndef K9EXECCOPY #define K9EXECCOPY #include "k9dvd.h" +#include +#include -class k9ExecCopy { +class k9ResultingFile; +class k9ExecCopy:public QObject { +Q_OBJECT public: enum eOutput {oDVD,oISO,oFolder}; + + k9ExecCopy(); void copyDVD(); void CreateMP4(); void extractMPEG2(); - + void extractAudio(); void setDvd(k9DVD* theValue) { m_dvd = theValue; } - void setOutput(const eOutput& theValue) { - m_output = theValue; - } - - void setCopyMenus(bool theValue) { - m_copyMenus = theValue; - } - - void setPath(const QString& theValue) { - m_path = theValue; - } - - + void setOutput(const eOutput& theValue) { + m_output = theValue; + } + + void setCopyMenus(bool theValue) { + m_copyMenus = theValue; + } + + void setPath(const QString& theValue) { + m_path = theValue; + } + + void setSpeed(const QString& theValue); + + + private: k9DVD *m_dvd; + QString m_speed; QString m_path; eOutput m_output; bool m_copyMenus; + KProgressDialog *m_progressDialog; + void createMkv(k9DVDTitle *_title,const QString &_filename,QMultiMap< int, k9ResultingFile* > _files,int _nbParts) ; + QStringList m_outputMsg; + int m_mkvPos; +protected slots: + void MkvStdout(KProcess *, char *, int ); + void finished(int, QProcess::ExitStatus); }; diff -Nru k9copy-2.1.0/src/backup/k9mp4dlg.cpp k9copy-2.2.0/src/backup/k9mp4dlg.cpp --- k9copy-2.1.0/src/backup/k9mp4dlg.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9mp4dlg.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -30,7 +30,8 @@ l->addWidget(m_wimage,0,0); m_timer.start(); Ui_MP4Dlg.bCancel->setGuiItem(KStandardGuiItem::Stop); - + Ui_MP4Dlg.bPlay->setIcon(SmallIcon("media-playback-start")); + Ui_MP4Dlg.bPlay->setChecked(true); } k9MP4Dlg::~k9MP4Dlg() { @@ -74,7 +75,10 @@ void k9MP4Dlg::setImage(QString _fileName) { - m_wimage->setImage(_fileName); + if (m_showImage) + m_wimage->setImage(_fileName); } - +void k9MP4Dlg::bPlayToggled(bool _state) { + m_showImage=_state; +} diff -Nru k9copy-2.1.0/src/backup/k9mp4dlg.h k9copy-2.2.0/src/backup/k9mp4dlg.h --- k9copy-2.1.0/src/backup/k9mp4dlg.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9mp4dlg.h 2009-02-19 22:30:17.000000000 +0100 @@ -41,9 +41,11 @@ k9DrawImage *m_wimage; QTime m_timer; Ui::MP4Dlg Ui_MP4Dlg; + bool m_showImage; protected slots: /*$PROTECTED_FUNCTIONS$*/ void Cancel(); + void bPlayToggled(bool _state); }; diff -Nru k9copy-2.1.0/src/backup/k9mp4enc.cpp k9copy-2.2.0/src/backup/k9mp4enc.cpp --- k9copy-2.1.0/src/backup/k9mp4enc.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9mp4enc.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -24,30 +24,39 @@ #include "k9tools.h" #include "k9audiocodecs.h" #include "k9videocodecs.h" +#include "k9convertaudio.h" #include #include "k9dialogs.h" #include - +#include +#include +#include "k9ifo2.h" +#include "k9cell.h" #define SERVICE_NAME "k9copy.free.fr.player" +#define BASE_CONV_AUDIO 0 +#define BASE_CONV_VIDEO 10 +#define BASE_CONV_SUBTITLE 20 + + k9MP4Enc::k9MP4Enc(QObject *parent) - : QObject(parent) { + : k9DVDBackupInterface(parent) { m_fourcc=m_height=m_width=m_audioBitrate=m_videoBitrate=m_filename=""; m_codec=0; //lavc_mp4; m_audioCodec=0; m_cpt=-1; m_parts=1; m_mpeg2=false; + m_extractAudio=false; + m_extractMkv=false; + m_extractSubtitle=false; QStringList laudio; QStringList llabels; QStringList lvideo; k9Config config; - m_lstAudio=config.getCodecAudio(); - m_lstCodecs=config.getCodecLabels(); - m_lstVideo=config.getCodecVideo(); - m_mpegChapters=config.getMpegChapters(); + m_splitChapters=config.getMpegChapters(); timer = new QTimer( this ); connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) ); @@ -100,20 +109,63 @@ return -1; } +bool k9MP4Enc::check() { + if (m_mpeg2) + return true; + + QString sCodecA,sCodecV; + + k9AudioCodecs *audioCodecs=new k9AudioCodecs(0); + sCodecA=audioCodecs->getEncoder(m_audioCodec); + + if (m_extractAudio && sCodecA !="ffmpeg") { + k9Dialogs::error(i18n("Audio extraction can only be done with ffmpeg"),i18n("Encoding error")); + return false; + } + + k9VideoCodecs *videoCodecs=new k9VideoCodecs(0); + sCodecV=videoCodecs->getEncoder (m_codec); + + if (m_extractMkv && sCodecV!="ffmpeg") { + k9Dialogs::error(i18n("Matroska encoding can only be done with ffmpeg"),i18n("Encoding error")); + return false; + } + + if (!m_extractAudio) { + if ( ! k9Tools::checkProgram(sCodecV) ) { + k9Dialogs::error (i18n("Unable to run %1",sCodecV) , i18n("Encoding error")); + m_error = TRUE; + return false; + } + } + + + if ((sCodecA!=sCodecV) || m_extractAudio) { + if ( ! k9Tools::checkProgram(sCodecA) ) { + k9Dialogs::error (i18n("Unable to run %1",sCodecA) , i18n("Encoding error")); + m_error = TRUE; + return false; + } + } + + + return true; +} void k9MP4Enc::execute(k9DVDTitle *_title) { + m_currentChapter=0; m_error=false; - if (m_mpeg2) { + m_outputFile=NULL; + m_converters[BASE_CONV_VIDEO]=NULL; + if (m_mpeg2 || m_extractAudio) { m_parts=1; m_2pass=false; } - if ( ! k9Tools::checkProgram("mencoder") && ! m_mpeg2) { - k9Dialogs::error (i18n("Unable to run %1","mencoder") , i18n("Encoding error")); - m_error = TRUE; + m_error = !check(); + if (m_error) return; - } time = new QTime(0,0); m_percent=m_totalBytes=m_offset=0; @@ -135,26 +187,25 @@ int pass=0; //build the cell list for mpeg2 extraction - QMultiMap chapterCells; - QMultiMap::iterator ichapterCells; + QMultiMap chapterCells; QStringList chapters; - if (m_mpeg2 && m_mpegChapters) { - m_parts=0; - chapters=getChapterList(_title).split(","); - foreach (QString chapter,chapters) { - int iCell=0; -// k9DVDChapter *chap=_title->getChapter(chapter.toInt()-1); -// foreach(k9ChapterCell *cell ,chap->cells) { - iCell++; - chapterCells.insert(chapter,iCell); - m_parts++; -// } - } - ichapterCells = chapterCells.begin(); - } + /* if ((m_extractSubtitle) && m_splitChapters) { + m_parts=0; + chapters=getChapterList(_title).split(","); + foreach (QString chapter,chapters) { + int iCell=0; + // k9DVDChapter *chap=_title->getChapter(chapter.toInt()-1); + // foreach(k9ChapterCell *cell ,chap->cells) { + iCell++; + chapterCells.insert(chapter.toInt(),iCell); + m_parts++; + // } + } + ichapterCells = chapterCells.begin(); + } + */ - - for (int m_part =1 ; (m_part <=m_parts) && !m_error ;m_part++) { + for ( m_part =1 ; (m_part <=m_parts) && !m_error ;m_part++) { if (m_2pass) { maxPass=2; pass=1; @@ -166,8 +217,11 @@ passLogFile.open(); passLogFileName=passLogFile.fileName(); passLogFile.close(); + m_passLogFile=passLogFileName; do { + m_player=new k9play(this); + uint32_t nbSectors= m_totalSize / m_parts ; uint32_t startSector= nbSectors*(m_part-1); @@ -177,10 +231,19 @@ //FIXME Mettre en place la sélection par chapitres m_stderr=""; m_title=_title; - if (m_height=="" || m_height=="0") - m_height="-2"; - if (m_width=="") - m_width="640"; + if (m_width=="") { + m_width=_title->getwidth(); + } + if (m_width.toInt() % 2 !=0) + m_width=QString::number(m_width.toInt()+1); + + if (m_height=="" || m_height=="0") { + double height=_title->getheight().toDouble()*( m_width.toDouble()/_title->getwidth().toDouble()); + m_height=QString::number((int)round(height+0.1)); + } + if (m_height.toInt()%2 !=0) + m_height=QString::number(m_height.toInt()+1); + if (m_audioBitrate=="") m_audioBitrate="128"; if (m_size=="") @@ -195,49 +258,57 @@ d.remove(m_filename); m_progress->setbitrate(QString::number(getBitRate(_title))); - if (!m_mpeg2) + if (!m_mpeg2 && !m_extractAudio && !m_extractMkv) { m_progress->setsize(m_size +i18n("MB") +" X " +QString::number(m_parts)); - else + m_player->setendSector(QString::number(endSector)); + } else m_progress->setsize(m_size +i18n("MB") +" X "); - m_process=new k9Process(this,0 ); + + QStringList cmd; - cmd << "k9play" << "--play" << "--endsector" << QString::number(endSector) ; - cmd << "--inject" << KShell::quoteArg(injectName); //"/tmp/kde-jmp/inject"; - cmd << "--input" << KShell::quoteArg(m_device); - cmd << "--dvdtitle" << QString::number(_title->getnumTitle()); - if (m_mpegChapters && m_mpeg2) { - cmd << "--chapter" << ichapterCells.key();//chapters.at(m_part-1); - // cmd << "--cell" << QString::number(ichapterCells.value()); - } else - cmd << "--chapterlist" << getChapterList( _title); - if (m_part==1 || m_mpeg2) - cmd << "--initstatus"; - else - cmd << "--continue"; + m_player->setinject(injectName); + m_player->setDevice(m_device); + m_player->setTitle(_title->getnumTitle()); + + m_player->setchapterList(getChapterList( _title)); + if (m_part==1 || m_mpeg2 ||m_extractAudio ) { + m_player->setinitStatus(true); + m_player->setcontinue(false); + } else { + m_player->setcontinue(true); + m_player->setinitStatus(false); + } if (pass==1) - cmd << "--firstpass"; + m_player->setfirstPass(true); + else + m_player->setfirstPass(false); - QStringList streams; - for (int i=0;i<_title->getaudioStreamCount();i++) { - if (_title->getaudioStream(i)->getselected()) { - streams <getaudioStream(i)->getID()); + if (pass !=1) { + QStringList streams; + for (int i=0;i<_title->getaudioStreamCount();i++) { + if (_title->getaudioStream(i)->getselected()) { + streams <getaudioStream(i)->getID()); + } } - } - if (streams.count() >0) - cmd << "--audiofilter" <0) + m_player->setaudioFilter(streams.join(",")); + - if (getselectedSubp( _title) !=-1) { - cmd << "--subpicturefilter" ; - QString s=""; - for (int i=1; i<=_title->getsubPictureCount();i++) - s+= (i>1?",":"") + QString::number(i); - cmd << s; + if (getselectedSubp( _title) !=-1) { + streams.clear(); + for (int i=0; i<_title->getsubPictureCount();i++) { + if (_title->getsubtitle(i)->getselected()) { + streams << QString::number(_title->getsubtitle(i)->getID().first()); + } + + } + m_player->setsubpictureFilter(streams.join(",")); + } } + m_player->setuseCache(m_usecache); - if (m_usecache) - cmd << "--usecache"; if (m_mpeg2) { m_offset+=m_totalBytes; m_progress->setbitrate("--"); @@ -245,185 +316,411 @@ if (_title->getforceFactor()) { size = _title->getChaptersSize_mb(true)/_title->getfactor(); - cmd << "--vampsfactor" << QString::number(_title->getfactor()) << "--ffactor"; + m_player->setvampsFactor(QString::number(_title->getfactor())); + m_player->setforcedFactor(true); } else size = _title->getChaptersSize_mb(true); m_progress->setsize(QString::number(size) +i18n("MB")); - QString path=m_filename; + /* QString path=m_filename; - if (m_parts>1) { - QString ext=m_filename.section(".",-1); - if (ext!="") - ext="."+ext; - path=m_filename.left(m_filename.length()-ext.length()); - //path=QString("%1-chapter%2-cell%3%4").arg(path).arg(ichapterCells.key()).arg(ichapterCells.value()).arg(ext); - path=QString("%1-chapter%2%3").arg(path).arg(ichapterCells.key()).arg(ext); - ++ichapterCells; + if (m_parts>1) { + QString ext=m_filename.section(".",-1); + if (ext!="") + ext="."+ext; + path=m_filename.left(m_filename.length()-ext.length()); + //path=QString("%1-chapter%2-cell%3%4").arg(path).arg(ichapterCells.key()).arg(ichapterCells.value()).arg(ext); + path=QString("%1-chapter%2%3").arg(path).arg(ichapterCells.key()).arg(ext); + } + */ + if (!m_splitChapters) { + m_outputFile=new QFile(m_filename); + //removes an existing file; + m_outputFile->remove(); + m_outputFile->open(QIODevice::WriteOnly); } - cmd << "> "+path; + } else if (m_extractAudio) { + // m_offset+=m_totalBytes; + // buildAudioCmd(_title); + if (!m_splitChapters) + buildAudioCmd(_title); } else { + //cmd << "-of" << "avi"; + if (m_extractSubtitle && pass!=1) + buildSubtitleCmd(_title); + buildVideoCmd(pass,m_part,_title,passLogFileName,cmd); + } + if ((m_parts >1 ) && (m_mpeg2|| m_extractAudio)) + ++ichapterCells; - cmd << "| mencoder" << "/dev/stdin"; - cmd << "-passlogfile" << passLogFileName; - - bool audio=false; - QString sPass=""; - QString sCodec=""; - - k9AudioCodecs *audioCodecs=new k9AudioCodecs(0); - k9VideoCodecs *videoCodecs=new k9VideoCodecs(0); - - QString sVOption; - m_pass=pass; - switch (pass) { - case 1: - sVOption=replaceParams(videoCodecs->getOptions1(m_codec)); - break; - case 2: - sVOption=replaceParams(videoCodecs->getOptions2(m_codec)); - break; - default: - sVOption=replaceParams(videoCodecs->getOptions0(m_codec)); - break; - } - sCodec=videoCodecs->getCodecName(m_codec); - sVOption=sVOption.trimmed(); - int pos; - - cmd << sVOption; - - QString sAOption=replaceParams(audioCodecs->getOptions(m_audioCodec)).trimmed(); - - - - if (pass >0) - m_progress->setTitleLabel(i18n("Encoding %1",sCodec)+" - "+i18n("pass %1",pass)); - else - m_progress->setTitleLabel(i18n("Encoding %1",sCodec)); - - if (m_fourcc !="") - cmd << "-ffourcc" << m_fourcc; - else if (videoCodecs->getFourcc(m_codec)!="") - cmd << "-ffourcc" << videoCodecs->getFourcc(m_codec); - delete audioCodecs; - delete videoCodecs; + time->start(); - //looking for first audio selected - for (int i=0;i<_title->getaudioStreamCount();i++) { - if (_title->getaudioStream(i)->getselected()) { - //cmd << "-oac" << sAOption; - pos=sAOption.indexOf("-af"); - if (pos==-1) - cmd << QString("-af volume=%1").arg(m_audioGain); - else - sAOption=sAOption.insert(pos+4,QString("volume=%1,").arg(m_audioGain)); - cmd << sAOption; + connect(m_progress,SIGNAL(sigCancel()),this,SLOT(slotCancel())); + m_canceled=false; + m_progress->show(); - audio=true; - break; - } - } + timer->start(500); - if (getselectedSubp( _title) !=-1) { - cmd << "-sid" << QString::number(getselectedSubp( _title)); - cmd << "-ffactor" << "1" << "-spualign" << "2" << "-sub-bg-alpha" << "1"; - } - if (!audio) - cmd << "-nosound"; + //connect(m_player,SIGNAL(sigPosition(uint, uint)),this,SLOT(getPosition(uint, uint))); - QString path=m_filename; + QEventLoop eventLoop; - if (m_parts>1) { - QString ext=m_filename.section(".",-1); - if (ext!="") - ext="."+ext; - path=m_filename.left(m_filename.length()-ext.length()); - path=path+QString::number(m_part)+ext; + //enters an new event loop which is stopped at end of the playing thread + m_eventLoop= &eventLoop; + m_player->setEventLoop(&eventLoop); + m_player->execute(); + //eventLoop.exec(); + Flush(); + + foreach (k9ConvertAudio *c,m_converters) { + if (c) { + c->end(); } - if (pass==1) - cmd << "-o" << "/dev/null"; - else - cmd <<"-o" << KShell::quoteArg(path); - if (path.toUpper().endsWith("MPEG") || path.toUpper().endsWith("MPG")) - cmd << "-of" << "mpeg"; - else if (path.toUpper().endsWith("AVI")) - cmd << "-of" << "avi"; - else { - cmd << "-of" << "lavf"; - cmd << "-lavfopts" << "i_certify_that_my_video_stream_does_not_use_b_frames"; + } + foreach(k9Subtitle2Pgm *s,m_subtitles) { + if (s) { + s->end(); } - //cmd << "-of" << "avi"; } - time->start(); - m_timer3.start(); - connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)),this, SLOT(getStdout(KProcess *, char *, int) )); - connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(getStderr(KProcess *, char *, int) )); - //connect(m_process, SIGNAL(processExited(KProcess*)),this,SLOT(exited(KProcess*))); - connect(m_progress,SIGNAL(sigCancel()),this,SLOT(slotCancel())); - m_canceled=false; - m_progress->show(); - m_process->setShellCommand(cmd.join(" ")); - qDebug () << cmd.join(" "); - //DBUS Connection with player - connect(QDBusConnection::sessionBus().interface(),SIGNAL(serviceOwnerChanged(QString,QString,QString)),this,SLOT(ready(QString,QString,QString))); - - - m_process->start(); - timer->start(500); - m_process->sync(); - //if application is exiting, kill the encoding process - if (m_process->isRunning()) { - m_process->kill(); - return; - } + qDeleteAll(m_subtitles); if (m_canceled) { //KMessageBox::information (NULL,i18n("MPEG-4 Encoding cancelled"), i18n("MPEG-4 Encoding")); m_error=true; - } else if (!m_process->normalExit()) { - k9Dialogs::error (""+i18n("Error while running mencoder :") +"
"+m_stderr, i18n("Encoding error")); - m_error=true; } + /*else if (!m_process->normalExit()) { + k9Dialogs::error (""+i18n("Error while running mencoder :") +"
"+m_stderr, i18n("Encoding error")); + m_error=true; + } + */ if (maxPass >0) pass++; + delete m_player; + m_player = NULL; } while (pass<=maxPass && !m_error && m_2pass); } + if (m_mpeg2 && m_outputFile) { + m_outputFile->close(); + delete m_outputFile; + } + foreach (k9ConvertAudio *c,m_convertersToDelete) { + c->end(); + delete c; + } + + if (!m_msgError.isEmpty()) + k9Dialogs::error (m_msgError, i18n("Encoding error"),m_ErrorDetail); + } -void k9MP4Enc::ready(const QString &name, const QString &oldValue, const QString &newValue) { - Q_UNUSED(oldValue); +void k9MP4Enc::buildSubtitleCmd(k9DVDTitle *title) { + for (int i=0; i< title->getsubPictureCount();i++) { + if (title->getsubtitle(i)->getselected()) { + QStringList cmd; + QString path=QDir::cleanPath( QString("%1/title%2-part%3-subtitle%4%5").arg(m_filename).arg(m_title->getnumTitle()).arg(m_part).arg(i+1).arg("")); + QString path2=QDir::cleanPath( QString("%1/title%2-part%3-subtitle%4%5").arg(m_filename).arg(m_title->getnumTitle()).arg(m_part).arg(i+1).arg("mpg")); - if (name != SERVICE_NAME || newValue.isEmpty()) - return; + QFile::remove(path+".sub"); + QFile::remove(path+".idx"); + k9Subtitle2Pgm *subtitle2pgm=new k9Subtitle2Pgm(this); + m_subtitles[title->getsubtitle(i)->getID().first()]=subtitle2pgm; + subtitle2pgm->setBaseName(path); + for (int ipalette=0;ipalette<16;ipalette++) { + QString s; + title->getpalette(ipalette,s); + subtitle2pgm->setPalette(ipalette,s.toUInt()); + } + subtitle2pgm->setLangCod(title->getsubtitle(i)->getlangCod()); + subtitle2pgm->setTrackCod(0x20+title->getsubtitle(i)->getID().first()-1); + + k9ResultingFile *rf=new k9ResultingFile(this); + rf->title=m_title->getnumTitle(); + rf->filename=path+".idx"; + rf->subtitle=true; + m_resultingFiles.insert(rf->title,rf); + + } + + } - // find our remote - m_iface = new QDBusInterface(SERVICE_NAME, "/", "k9copy.free.fr.player", - QDBusConnection::sessionBus(), this); - if (!m_iface->isValid()) { - qDebug() << qPrintable(QDBusConnection::sessionBus().lastError().message()); +} + +void k9MP4Enc::buildAudioCmd(k9DVDTitle *title) { + k9AudioCodecs *audioCodecs=new k9AudioCodecs(0); + + for (int i=0;igetaudioStreamCount();i++) { + if (title->getaudioStream(i)->getselected()) { + + k9DVDAudioStream *stream = title->getaudioStream(i); + QStringList cmd; + QString sCodec=""; + + sCodec=audioCodecs->getCodecName(m_audioCodec); + + QString sAOption=replaceParams(audioCodecs->getOptions(m_audioCodec)).trimmed(); + + m_progress->setTitleLabel(i18n("Encoding %1",sCodec)); + QString path,ext=audioCodecs->getExtension(m_audioCodec) ; + if (!ext.startsWith(".")) + ext="."+ext; + + QDir().mkpath(m_filename); + path=QDir::cleanPath( QString("%1/title%2-part%3-audio%4-%6-%5").arg(m_filename).arg(m_title->getnumTitle()).arg(m_currentChapter).arg(i+1).arg(ext).arg(stream->getlanguage()) ); + QFile::remove(path); + + + cmd << audioCodecs->getEncoder(m_audioCodec)<< "-i" << "/dev/stdin" <getOptions1(m_codec)); + break; + case 2: + sVOption=replaceParams(videoCodecs->getOptions2(m_codec)); + break; + default: + sVOption=replaceParams(videoCodecs->getOptions0(m_codec)); + break; + } + + + sCodec=videoCodecs->getCodecName(m_codec); + sVOption=sVOption.trimmed(); + cmd << videoCodecs->getEncoder(m_codec) << "-i" << "/dev/stdin"; + + cmd << sVOption.split(" "); + + if (pass >0) + m_progress->setTitleLabel(i18n("Encoding %1",sCodec)+" - "+i18n("pass %1",pass)); + else + m_progress->setTitleLabel(i18n("Encoding %1",sCodec)); + + if (m_fourcc !="") + cmd << "-vtag" << m_fourcc; + else if (videoCodecs->getFourcc(m_codec)!="") + cmd << "-vtag" << videoCodecs->getFourcc(m_codec); + + QString sAOption=""; + sAOption=replaceParams(audioCodecs->getOptions(m_audioCodec)).trimmed(); + + QStringList slNewAudio; + delete audioCodecs; + delete videoCodecs; + bool audio=false; + //looking for first audio selected + int nbAudio=0; + if (m_pass != 1 ) { + for (int i=0;igetaudioStreamCount();i++) { + if (title->getaudioStream(i)->getselected()) { + if (nbAudio>0) + slNewAudio << "-newaudio"; + else + cmd << sAOption.split(" "); + audio=true; + nbAudio++; + } + } + } + + QString path=m_filename; + + if (m_pass==1) { + path="/dev/null"; + } else if (m_extractMkv) { + QString ext(".avi"); + QDir().mkpath(m_filename); + path=QDir::cleanPath( QString("%1/title%2-part%3-video%4").arg(m_filename).arg(m_title->getnumTitle()).arg(m_part).arg(ext)); + QFile::remove(path); + + k9ResultingFile *rf=new k9ResultingFile(this); + rf->title=m_title->getnumTitle(); + rf->filename=path; + rf->video=true; + m_resultingFiles.insert(rf->title,rf); + }else { + if (m_parts>1) { + QString ext=m_filename.section(".",-1); + if (ext!="") + ext="."+ext; + path=m_filename.left(m_filename.length()-ext.length()); + path=path+QString::number(m_part)+ext; + } + } + + if (path.toUpper().endsWith("MPEG") || path.toUpper().endsWith("MPG")) + cmd << "-f" << "mpeg"; + else if (path.toUpper().endsWith("AVI") || m_pass==1) + cmd << "-f" << "avi"; + else { + // cmd << "-of" << "lavf"; + // cmd << "-lavfopts" << "i_certify_that_my_video_stream_does_not_use_b_frames"; + } + cmd << "-y" << KShell::quoteArg(path); + + cmd << slNewAudio; +// if (m_extractMkv) { + k9ConvertAudio *converter=new k9ConvertAudio("",cmd); + //converter->setDebug(true); + m_converters[BASE_CONV_VIDEO]=converter; + m_convertersToDelete << converter; + if (m_extractMkv && m_pass!=1) + for (int i=0;igetaudioStreamCount();i++) + if (title->getaudioStream(i)->getselected()) + m_converters[BASE_CONV_AUDIO+i+1]=converter; +// } +} + + + +void k9MP4Enc::buildMEncoderCmd(int pass,int part,k9DVDTitle *title,const QString &passLogFileName,QStringList &cmd) { + + bool audio=false; + QString sPass=""; + QString sCodec=""; + + k9AudioCodecs *audioCodecs=new k9AudioCodecs(0); + k9VideoCodecs *videoCodecs=new k9VideoCodecs(0); + + QString sVOption; + m_pass=pass; + switch (pass) { + case 1: + sVOption=replaceParams(videoCodecs->getOptions1(m_codec)); + break; + case 2: + sVOption=replaceParams(videoCodecs->getOptions2(m_codec)); + break; + default: + sVOption=replaceParams(videoCodecs->getOptions0(m_codec)); + break; + } + sCodec=videoCodecs->getCodecName(m_codec); + sVOption=sVOption.trimmed(); + int pos; + cmd << "mencoder" << "/dev/stdin"; + if (pass >0) + cmd << "-passlogfile" << passLogFileName; + + cmd << sVOption.split(" "); + + QString sAOption=""; + sAOption=replaceParams(audioCodecs->getOptions(m_audioCodec)).trimmed(); + + + if (pass >0) + m_progress->setTitleLabel(i18n("Encoding %1",sCodec)+" - "+i18n("pass %1",pass)); + else + m_progress->setTitleLabel(i18n("Encoding %1",sCodec)); + + if (m_fourcc !="") + cmd << "-ffourcc" << m_fourcc; + else if (videoCodecs->getFourcc(m_codec)!="") + cmd << "-ffourcc" << videoCodecs->getFourcc(m_codec); + + delete audioCodecs; + delete videoCodecs; + + //looking for first audio selected + for (int i=0;igetaudioStreamCount();i++) { + if (title->getaudioStream(i)->getselected()) { + //cmd << "-oac" << sAOption; + pos=sAOption.indexOf("-af"); + if (pos==-1) + cmd << "-af" <1) { + QString ext=m_filename.section(".",-1); + if (ext!="") + ext="."+ext; + path=m_filename.left(m_filename.length()-ext.length()); + path=path+QString::number(part)+ext; + } + if (pass==1) + cmd << "-o" << "/dev/null"; + else + cmd <<"-o" << KShell::quoteArg(path); + if (path.toUpper().endsWith("MPEG") || path.toUpper().endsWith("MPG")) + cmd << "-of" << "mpeg"; + else if (path.toUpper().endsWith("AVI")) + cmd << "-of" << "avi"; + else { + // cmd << "-of" << "lavf"; + // cmd << "-lavfopts" << "i_certify_that_my_video_stream_does_not_use_b_frames"; + } + k9ConvertAudio *converter=new k9ConvertAudio("",cmd); + m_converters[BASE_CONV_VIDEO]=converter; + m_convertersToDelete << converter; +} void k9MP4Enc::slotCancel() { m_canceled=true; - if (m_iface) { - m_iface->call("abort"); - qApp->processEvents(); - } else - m_process->kill(); + timer->stop(); + m_player->abort(); + foreach (k9ConvertAudio *c,m_converters) { + if (c) { + c->end(false); + } + } + } QString k9MP4Enc::replaceParams(QString _value) { QString str=_value; + str.replace("$PASSLOGFILE",m_passLogFile); str.replace("$PASS",QString::number(m_pass)); str.replace("$WIDTH",m_width); str.replace("$HEIGHT",m_height); @@ -446,94 +743,197 @@ m_progress->setsize(QString::number(size) +i18n("MB") +" x " +QString::number(m_parts)); QTime t1(0,0); int sec=t1.secsTo(_title->getSelectedLength()); - //int bitrate=(int)( ((size*m_parts) * 8388.608)/sec - m_audioBitrate.toInt()); - int bitrate=8*(((size*m_parts*1024)-(m_audioBitrate.toInt()*sec/8))/sec); + if (sec==0) return 0; + int nbAudioStreams=0; + for (int i=0;i<_title->getaudioStreamCount();i++) + if (_title->getaudioStream(i)->getselected()) + nbAudioStreams++; + + nbAudioStreams=1; + + int bitrate=((8*size*m_parts*1024)-(m_audioBitrate.toInt()*nbAudioStreams*sec))/sec; + +// qDebug() << "bitrate:" << bitrate << " sec:" <setfps(QString::number(fps)); - } +void k9MP4Enc::timerDone() { + if (m_player) { + uint32_t totalBytes,totalSize; + m_player->getPosition(&totalBytes,&totalSize); + if (m_converters[BASE_CONV_VIDEO]) + m_progress->setfps(m_converters[BASE_CONV_VIDEO]->getFps()); + if (totalSize !=0) + m_percent=(float)(m_offset+totalBytes) / (float)m_totalSize; + m_totalBytes=totalBytes; + + QTime time2(0,0); + time2=time2.addMSecs(time->elapsed()); + if (m_percent>0) { + QTime time3(0,0); + time3=time3.addMSecs((uint32_t)(time->elapsed()*(1/m_percent))); + m_remain=time3.toString("hh:mm:ss"); + } + + m_percent*=100; + m_progress->setProgress((int)m_percent); + m_progress->setremain(time2.toString("hh:mm:ss") +" / " +m_remain); + m_progress->setImage(m_player->getSaveImage()->getFileName()); + } +} +bool k9MP4Enc::isCanceled() { + return (m_canceled || m_error); } -void k9MP4Enc::getStderr(KProcess *proc, char *buffer, int buflen) { - //m_stderr=QString::fromLatin1(buffer,buflen); - QString cstderr(QByteArray(buffer,buflen+1)); - if (cstderr.indexOf("FATAL:")!=-1) { - proc->kill(); - } +void k9MP4Enc::getOutput(eStreamType streamType,int streamNumber,uchar *buffer,uint32_t size) { + if (m_error) + return; + if ((streamType==NAV) && !m_mpeg2) { + pci_t pci_pack; - int pos=cstderr.indexOf("INFOPOS:"); - if (pos!=-1 ) { - if (m_timer3.elapsed()>500) { - m_timer3.restart(); - QString tmp=cstderr.mid(pos); - uint32_t totalBytes,totalSize; - sscanf(tmp.toUtf8(),"INFOPOS: %d %d",&totalBytes,&totalSize); - if (totalSize !=0) - m_percent=(float)(m_offset+totalBytes) / (float)m_totalSize; - m_totalBytes=totalBytes; + k9Ifo2::navRead_PCI(&pci_pack,buffer-14+ 0x2d); + k9DVDChapter *ch=m_title->getChapterFromSector(pci_pack.pci_gi.nv_pck_lbn); + bool chapterChanged=ch->getnum()!=m_currentChapter; + m_currentChapter=ch->getnum(); + if (m_extractAudio && m_splitChapters && chapterChanged) { + foreach( k9ConvertAudio *c, m_convertersToDelete) { + if (!c->isRunning()) { + m_convertersToDelete.removeOne(c); + delete c; + } - QTime time2(0,0); - time2=time2.addMSecs(time->elapsed()); - if (m_percent>0) { - QTime time3(0,0); - time3=time3.addMSecs((uint32_t)(time->elapsed()*(1/m_percent))); - m_remain=time3.toString("hh:mm:ss"); } - m_percent*=100; - m_progress->setProgress((int)m_percent); - m_progress->setremain(time2.toString("hh:mm:ss") +" / " +m_remain); + foreach (k9ConvertAudio *c,m_converters) { + if (c) { + c->end(false); + } + } + buildAudioCmd(m_title); + } + } + + if (m_converters.contains(streamNumber+BASE_CONV_AUDIO) && (streamType==AUDIO)) { + k9ConvertAudio *c=m_converters[BASE_CONV_AUDIO+streamNumber]; + if (!c->Error()) + c->addData(buffer,size); + else { + m_player->setAborted(true); + m_error=true; + m_msgError=i18n("An error occured while encoding the %1 stream",i18n("audio")); + m_ErrorDetail=c->getOutput(); } - } else { - pos=cstderr.indexOf("INFOIMAGE:"); - if (pos!=-1) { - m_progress->setImage(cstderr.mid(pos+10)); - } else - qDebug("[%s]",buffer); } - m_stderr=cstderr; + + if (streamType==NAV) { + foreach(k9Subtitle2Pgm *sub,m_subtitles) { + sub->addData(buffer,size); + } + + } else if ((streamType==VIDEO) ||( !m_mpeg2 && !m_extractAudio && !m_extractMkv)) { + k9ConvertAudio *c=m_converters[BASE_CONV_VIDEO]; + if (c) { + if (!c->Error()) + c->addData(buffer,size); + else { + m_player->setAborted(true); + m_error=true; + m_msgError=i18n("An error occured while encoding the %1 stream",i18n("video")); + m_ErrorDetail=c->getOutput(); + } + } + } + + + if ((streamType==SUBPICTURE) && (m_subtitles.contains(streamNumber))) { + + //k9ConvertAudio *c=m_converters[BASE_CONV_SUBTITLE+streamNumber]; + //c->addData(buffer,size); + m_subtitles[streamNumber]->addData(buffer,size); + //m_outputFile->write((char *) buffer,size); + } } -void k9MP4Enc::timerDone() { - QTime time2(0,0); - time2=time2.addMSecs(time->elapsed()); - m_progress->setremain(time2.toString("hh:mm:ss") +" / " +m_remain); +void k9MP4Enc::getOutput(uchar *buffer,uint32_t size) { + if (m_mpeg2 ) { + //waiting for free space in the fifo buffer (readen by mencoder process) + m_fifo.addData(buffer,size); + //Exits the eventloop executed by flush when fifo buffer is empty + m_eventLoop->exit(); + } } -bool k9MP4Enc::isCanceled() { - return (m_canceled || m_error); + +void k9MP4Enc::Flush() { + QIODevice *output; + output=NULL; + uchar buffer[40960]; + int size; + do { + while (m_fifo.count()>0) { + size=m_fifo.readData(buffer,2048); + + if (m_mpeg2 && m_splitChapters && k9Cell::isNavPack(buffer)) { + pci_t pci_pack; + + k9Ifo2::navRead_PCI(&pci_pack,buffer+ 0x2d); + k9DVDChapter *ch=m_title->getChapterFromSector(pci_pack.pci_gi.nv_pck_lbn); + + if ((ch->getnum() != m_currentChapter) || !output) { + m_currentChapter=ch->getnum(); + QString path=m_filename; + + QString ext=m_filename.section(".",-1); + if (ext!="") + ext="."+ext; + path=m_filename.left(m_filename.length()-ext.length()); + //path=QString("%1-chapter%2-cell%3%4").arg(path).arg(ichapterCells.key()).arg(ichapterCells.value()).arg(ext); + path=QString("%1-chapter%2%3").arg(path).arg(m_currentChapter).arg(ext); + + if (m_outputFile) + m_outputFile->close(); + m_outputFile=new QFile(path); + //removes an existing file; + m_outputFile->remove(); + m_outputFile->open(QIODevice::WriteOnly); + output=m_outputFile; + } + } + + if (output) + output->write((char*)buffer,size); + } + if (!m_player->terminated() && !m_canceled) + m_eventLoop->exec(); + } while (!m_player->terminated() && !m_canceled && m_mpeg2); + + m_player->wait(); } + k9MP4Enc::~k9MP4Enc() { m_progress->close(); } + + +QMultiMap< int, k9ResultingFile* > k9MP4Enc::getResultingFiles() const { + return m_resultingFiles; +} + + +void k9MP4Enc::setSplitChapters(bool theValue) { + m_splitChapters = theValue; +} + diff -Nru k9copy-2.1.0/src/backup/k9mp4enc.h k9copy-2.2.0/src/backup/k9mp4enc.h --- k9copy-2.1.0/src/backup/k9mp4enc.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9mp4enc.h 2009-02-19 22:30:17.000000000 +0100 @@ -13,21 +13,42 @@ #define K9MP4ENC_H #include "k9common.h" #include "k9dvdtitle.h" - +#include "k9dvdbackupinterface.h" +#include "k9subtitle2pgm.h" #include #include #include #include -#include #include +#include "k9play.h" +#include +#include class k9MP4Dlg; + +class k9ResultingFile:public QObject { +public: + k9ResultingFile(QObject *parent):QObject(parent) { + title=0; + audio=false; + video=false; + subtitle=false; + filename=""; + }; + + int title; + bool audio; + bool video; + bool subtitle; + QString filename; +}; + +class k9ConvertAudio; /** @author Jean-Michel PETIT */ -class k9MP4Enc : public QObject { +class k9MP4Enc : public k9DVDBackupInterface { Q_OBJECT private: - k9Process *m_process; k9MP4Dlg *m_progress; k9DVDTitle *m_title; int getBitRate(k9DVDTitle *_title); @@ -42,7 +63,8 @@ QString m_audioGain; QString m_fourcc; QString m_stderr; - int m_parts; + QString m_passLogFile; + int m_parts,m_part; float m_percent; QTimer *timer; QString m_remain; @@ -53,25 +75,48 @@ int m_pass; bool m_canceled; bool m_error; + QString m_msgError; + QStringList m_ErrorDetail; int m_codec; int m_audioCodec; bool m_usecache; bool m_mpeg2; - bool m_mpegChapters; - QStringList m_lstVideo,m_lstAudio,m_lstCodecs; + bool m_extractAudio; + bool m_extractSubtitle; + bool m_extractMkv; + bool m_splitChapters; + int m_cpt; - QTime *time,m_timer3; + int m_currentChapter; + QTime *time; QString replaceParams(QString _input); + void Flush(); + bool check(); + void buildMEncoderCmd(int pass,int part,k9DVDTitle *title,const QString &passLogFileName,QStringList &cmd) ; + void buildVideoCmd(int pass,int part,k9DVDTitle *title,const QString &passLogFileName,QStringList &cmd) ; + void buildFFMpegCmd(int pass,k9DVDTitle *title,QStringList &cmd) ; + void buildAudioCmd(k9DVDTitle *title); + void buildSubtitleCmd(k9DVDTitle *title); QString round16(QString _wh); QString getChapterList(k9DVDTitle *_title); int getselectedSubp(k9DVDTitle *_title); - QDBusInterface *m_iface; + k9play *m_player; + QEventLoop *m_eventLoop; + k9MemoryFifo m_fifo; + QWaitCondition m_dataRead; + QFile *m_outputFile; + QMap m_converters; + QList m_convertersToDelete; + QMap m_subtitles; + QMultiMap::iterator ichapterCells; + QMultiMap m_resultingFiles; private slots: - void ready(const QString &name, const QString &oldValue, const QString &newValue); - void getStdout(KProcess *proc, char *buffer, int buflen); - void getStderr(KProcess *proc, char *buffer, int buflen); + void timerDone(); void slotCancel(); +public slots: + virtual void getOutput(uchar *buffer,uint32_t size) ; + virtual void getOutput(eStreamType streamType,int streamNumber,uchar *buffer,uint32_t size); public: k9MP4Enc(QObject *parent = 0); @@ -80,8 +125,8 @@ virtual void execute(k9DVDTitle *_title ); virtual void setNumberCD(const QString & _value) { - m_parts = _value.toInt(); - if (m_parts==0) m_parts=1; + m_parts = _value.toInt(); + if (m_parts==0) m_parts=1; } virtual void setDevice(const QString& _value) { @@ -106,30 +151,55 @@ m_videoBitrate = _value.trimmed(); }; virtual void setAudioGain(const QString& _value) { - m_audioGain = _value.trimmed(); + m_audioGain = _value.trimmed(); }; virtual void setfourcc(const QString& _value) { m_fourcc = _value.trimmed(); }; virtual void set2Passes(bool _value) { - m_2pass=_value; + m_2pass=_value; } virtual void setUseCache(bool _value) { - m_usecache=_value; + m_usecache=_value; } virtual void setMpeg2(bool _value) { - m_mpeg2=_value; + m_mpeg2=_value; + } + + virtual void setExtractAudio(bool _value) { + m_extractAudio=_value; + } + + virtual void setExtractSubtitle(bool _value) { + m_extractSubtitle=_value; + } + + virtual void setExtractMkv(bool _value) { + m_extractMkv=_value; } - virtual void setCodec(const int& _value) {m_codec = _value;}; - virtual void setAudioCodec(const int& _value) {m_audioCodec = _value;}; - - virtual QWidget *getDialog() {return (QWidget*)m_progress;}; + virtual void setCodec(const int& _value) { + m_codec = _value; + }; + + virtual void setAudioCodec(const int& _value) { + m_audioCodec = _value; + }; + + virtual QWidget *getDialog() { + return (QWidget*)m_progress; + }; virtual bool isCanceled(); + + QMultiMap< int, k9ResultingFile* > getResultingFiles() const; + + void setSplitChapters(bool theValue); + + }; #endif diff -Nru k9copy-2.1.0/src/backup/k9script.cpp k9copy-2.2.0/src/backup/k9script.cpp --- k9copy-2.1.0/src/backup/k9script.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/k9script.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -299,7 +299,7 @@ void k9Script::JumpVmg(vm_cmd_t * command) { char *cmd=(char*) command; if (cmd[0]==0x30) { - cmd[1]=cmd[1] & 0xF0 + 0x08; //0x20 =conditionnal jump + cmd[1]=(cmd[1] & 0xF0) + 0x08; //0x20 =conditionnal jump cmd[2]=cmd[3]=0; cmd[4]=0x01; cmd[5]=0x42; @@ -386,7 +386,7 @@ for (int i=command_tbl->nr_of_pre-2;i>=0;i--) { memcpy(&(command_tbl->pre_cmds[i+1]),&(command_tbl->pre_cmds[i]),sizeof(vm_cmd_t)); char *cmd=(char*)&(command_tbl->pre_cmds[i+1]); - if (cmd[0]==0 && cmd[1]&0x01==0x01) + if (cmd[0]==0 && (cmd[1]&0x01==0x01)) cmd[7]++; } diff -Nru k9copy-2.1.0/src/backup/mp4dlg.ui k9copy-2.2.0/src/backup/mp4dlg.ui --- k9copy-2.1.0/src/backup/mp4dlg.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/backup/mp4dlg.ui 2009-02-19 22:30:17.000000000 +0100 @@ -1,12 +1,12 @@ - + MP4Dlg 0 0 - 416 - 475 + 422 + 479 @@ -15,7 +15,7 @@ Encoding - + @@ -41,192 +41,6 @@ - - - - WaitCursor - - - - - - - - 0 - 0 - - - - WaitCursor - - - QFrame::NoFrame - - - QFrame::Plain - - - - - - WaitCursor - - - - - - Qt::AlignVCenter - - - false - - - - - - - WaitCursor - - - - - - Qt::AlignVCenter - - - false - - - - - - - WaitCursor - - - - - - false - - - - - - - WaitCursor - - - - - - false - - - - - - - WaitCursor - - - fps - - - false - - - - - - - WaitCursor - - - Elapsed Time - - - false - - - - - - - WaitCursor - - - Bitrate - - - false - - - - - - - WaitCursor - - - Size - - - false - - - - - - - - - - - 0 - 0 - - - - ArrowCursor - - - 26 - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 225 - 21 - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 16 - - - - @@ -319,6 +133,234 @@ + + + + 0 + + + + + + 0 + 0 + + + + WaitCursor + + + QFrame::NoFrame + + + QFrame::Plain + + + + 4 + + + + + WaitCursor + + + + + + Qt::AlignVCenter + + + false + + + + + + + WaitCursor + + + + + + Qt::AlignVCenter + + + false + + + + + + + WaitCursor + + + + + + false + + + + + + + WaitCursor + + + + + + false + + + + + + + WaitCursor + + + fps + + + false + + + + + + + WaitCursor + + + Elapsed Time + + + false + + + + + + + WaitCursor + + + Bitrate + + + false + + + + + + + WaitCursor + + + Size + + + false + + + + + + + + + + ArrowCursor + + + ... + + + true + + + false + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 40 + + + + + + + + + + WaitCursor + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 16 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 225 + 21 + + + + + + + + + 0 + 0 + + + + ArrowCursor + + + 26 + + + @@ -326,7 +368,7 @@ KPushButton - QWidget + QPushButton
kpushbutton.h
@@ -348,5 +390,24 @@ + + bPlay + toggled(bool) + MP4Dlg + bPlayToggled(bool) + + + 404 + 334 + + + 210 + 239 + + + + + bPlayToggled(bool) +
diff -Nru k9copy-2.1.0/src/core/cmake_install.cmake k9copy-2.2.0/src/core/cmake_install.cmake --- k9copy-2.1.0/src/core/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/core/k9audiocodecs.cpp k9copy-2.2.0/src/core/k9audiocodecs.cpp --- k9copy-2.1.0/src/core/k9audiocodecs.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9audiocodecs.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -12,65 +12,78 @@ #include "k9audiocodecs.h" #include +#include class _k9AudioCodec { public: - _k9AudioCodec():name(""),options("") {}; - _k9AudioCodec(QString _name,QString _options) { + _k9AudioCodec():name(""),options(""),encoder(""),extension("") {}; + _k9AudioCodec(QString _name,QString _options,QString _encoder,QString _extension="") { name=_name; options=_options; + encoder=_encoder; + extension=_extension; } QString name; QString options; + QString encoder; + QString extension; }; k9AudioCodecs::k9AudioCodecs(QObject *parent) : QObject(parent) { m_config=new k9Config(); - QStringList slLabels=m_config->getCodecLabelsAudio(); - QStringList slCodecs=m_config->getCodecAudio(); + + KConfig *config= m_config->getConfig(); + KConfigGroup group=config->group("codecs"); + int nbAudio=group.readEntry("AudioCount",0); + //adds default codecs - if (slLabels.count()==0) { + if (nbAudio==0) { reset(); m_config=new k9Config(); - slLabels=m_config->getCodecLabelsAudio(); - slCodecs=m_config->getCodecAudio(); } - QStringList::iterator c=slCodecs.begin(); - int cpt=0; - for (QStringList::iterator i=slLabels.begin();i!=slLabels.end() ;++i) { - QString o1=(*c); - c++; - m_codecs[cpt++]=_k9AudioCodec((*i),o1); + + for (int cpt=0;cpt group(QString("audiocodec%1").arg(cpt)); + m_codecs[cpt] = _k9AudioCodec(group.readEntry("name"),group.readEntry("opt",""),group.readEntry("encoder","mencoder"),group.readEntry("extension")); } + delete m_config; } void k9AudioCodecs::reset() { - m_codecs[0]=_k9AudioCodec("copy","-oac copy"); - m_codecs[1]=_k9AudioCodec("mp3","-oac lavc -lavcopts acodec=mp3:abitrate=$AUDBR"); - m_codecs[2]=_k9AudioCodec("mp2","-oac lavc -lavcopts acodec=mp2:abitrate=$AUDBR"); - m_codecs[3]=_k9AudioCodec("ac3","-oac lavc -lavcopts acodec=ac3:abitrate=$AUDBR"); - m_codecs[4]=_k9AudioCodec("IMA Adaptive PCM","-oac lavc -lavcopts acodec=adpcm_ima_wav:abitrate=$AUDBR"); - m_codecs[5]=_k9AudioCodec("sonic","-oac lavc -lavcopts acodec=sonic:abitrate=$AUDBR"); - m_codecs[6]=_k9AudioCodec("aac","-oac faac -faacopts br=$AUDBR"); - m_codecs[7]=_k9AudioCodec("mp3 (lame)","-oac mp3lame -lameopts abr:br=$AUDBR"); + m_codecs[0]=_k9AudioCodec("copy","-oac copy","mencoder"); + m_codecs[1]=_k9AudioCodec("mp3","-oac lavc -lavcopts acodec=mp3:abitrate=$AUDBR","mencoder"); + m_codecs[2]=_k9AudioCodec("mp2","-oac lavc -lavcopts acodec=mp2:abitrate=$AUDBR","mencoder"); + m_codecs[3]=_k9AudioCodec("ac3","-oac lavc -lavcopts acodec=ac3:abitrate=$AUDBR","mencoder"); + m_codecs[4]=_k9AudioCodec("IMA Adaptive PCM","-oac lavc -lavcopts acodec=adpcm_ima_wav:abitrate=$AUDBR","mencoder"); + m_codecs[5]=_k9AudioCodec("sonic","-oac lavc -lavcopts acodec=sonic:abitrate=$AUDBR","mencoder"); + m_codecs[6]=_k9AudioCodec("aac","-oac faac -faacopts br=$AUDBR","mencoder"); + m_codecs[7]=_k9AudioCodec("mp3 (lame)","-oac mp3lame -lameopts abr:br=$AUDBR","mencoder"); + m_codecs[8]=_k9AudioCodec("mp3 (ffmpeg)","-acodec libmp3lame -ab $AUDBRk -ac 2","ffmpeg",".mp3"); save(); } void k9AudioCodecs::save() { m_config=new k9Config(); - QStringList labels; - QStringList options; + KConfig *config= m_config->getConfig(); + KConfigGroup group=config->group("codecs"); + + int cpt=0; for (QMap::iterator i=m_codecs.begin();i!=m_codecs.end();++i) { - labels << i.value().name; - options << i.value().options; + group=config->group(QString("audiocodec%1").arg(cpt)); + group.writeEntry("name",i.value().name); + group.writeEntry("opt", i.value().options); + group.writeEntry("encoder", i.value().encoder); + group.writeEntry("extension",i.value().extension); + cpt++; } - m_config->setCodecLabelsAudio(labels); - m_config->setCodecAudio(options); + group=config->group("codecs"); + group.writeEntry("AudioCount",cpt); + m_config->save(); delete m_config; } @@ -86,10 +99,19 @@ m_codecs[_num].options=_value; } + +void k9AudioCodecs::setEncoder(int _num,QString _value) { + m_codecs[_num].encoder=_value; +} + void k9AudioCodecs::setCodecName(int _num,QString _value) { m_codecs[_num].name=_value; } +void k9AudioCodecs::setExtension(int _num,QString _value) { + m_codecs[_num].extension=_value; +} + QString k9AudioCodecs::getOptions(int _num) { return m_codecs[_num].options; } @@ -98,6 +120,32 @@ return m_codecs[_num].name; } +int k9AudioCodecs::getAbsCodecNum(int _num,const QString &_encoder) { + k9AudioCodecs a(0); + int nb=a.count(); + int num=0; + for (int i=0;i0) { diff -Nru k9copy-2.1.0/src/core/k9audiocodecs.h k9copy-2.2.0/src/core/k9audiocodecs.h --- k9copy-2.1.0/src/core/k9audiocodecs.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9audiocodecs.h 2009-02-19 22:30:17.000000000 +0100 @@ -32,10 +32,17 @@ int count(); void setOptions(int _num,QString _value); void setCodecName(int _num,QString _value); + void setEncoder(int _num,QString _value); + void setExtension(int _num,QString _value); QString getOptions(int _num); QString getCodecName(int _num); + QString getEncoder(int _num); + QString getExtension(int _num); void remove(int _num); void reset(); + static int getAbsCodecNum(int _num,const QString &_encoder); + + private: QMap m_codecs; k9Config *m_config; diff -Nru k9copy-2.1.0/src/core/k9burndvd.cpp k9copy-2.2.0/src/core/k9burndvd.cpp --- k9copy-2.1.0/src/core/k9burndvd.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9burndvd.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -30,12 +30,13 @@ #include #include #include "k9dialogs.h" - +#include "k9cddrive.h" k9BurnDVD::k9BurnDVD() : QObject(NULL) { cancelled=false; useK3b=false; autoBurn=false; + m_eject=false; volId="K9Copy"; iso=false; m_filename=""; @@ -217,6 +218,8 @@ proc2->start(); proc2->sync(); getWodimCmd(procCmd); + if (m_eject) + eject(burnDevice); if (!autoBurn) { if ( k9Dialogs::warningContinueCancel ( i18n("Insert a recordable DVD"), i18n("DVD burning"))!=KMessageBox::Continue) @@ -231,16 +234,19 @@ k9Dialogs::error( i18n("Error burning DVD :\n")+i18n("Unable to run %1","genisoimage"), i18n("DVD burning") ); cancelled=true; } else { - if (proc->exitStatus()==0) { + + if ((proc->exitStatus()==0)&& (proc->exitCode()==0)) { bok=true; k9Dialogs::information( i18n("DVD Burning finished"), i18n("DVD burning") ); //delete temporary files // clearOutput(workDir+"dvd"); } else { QString c; + if(!iso) + eject(burnDevice); - c=i18n("An error occured while Burning DVD: %1",lastMsg) +"\n" +i18n("Insert an other DVD"); - if ( k9Dialogs::warningContinueCancel ( c, i18n("authoring"))!=KMessageBox::Continue) { + c=i18n("An error occured while Burning DVD") +"\n" +i18n("Insert an other DVD"); + if ( k9Dialogs::warningContinueCancel ( c, i18n("authoring"),lastMsg)!=KMessageBox::Continue) { cancelled=true; } } @@ -315,6 +321,7 @@ k9Dialogs::error( i18n("Error burning DVD :\n")+i18n("Unable to run %1",progname), i18n("DVD burning") ); cancelled=true; } else { + if (proc->exitStatus()==0) { bok=true; k9Dialogs::information( i18n("DVD Burning finished"), i18n("DVD burning") ); @@ -322,9 +329,8 @@ // clearOutput(workDir+"dvd"); } else { QString c; - - c=i18n("An error occured while Burning DVD: %1",lastMsg) +"\n" +i18n("Insert an other DVD"); - if ( k9Dialogs::warningContinueCancel ( c, i18n("authoring"))!=KMessageBox::Continue) { + c=i18n("An error occured while Burning DVD") +"\n" +i18n("Insert an other DVD"); + if ( k9Dialogs::warningContinueCancel ( c, i18n("authoring"),lastMsg)!=KMessageBox::Continue) { cancelled=true; } } @@ -337,12 +343,14 @@ /** No descriptions */ void k9BurnDVD::growisoStderr(KProcess *, char *buffer, int buflen) { - QString c=QString::fromLatin1( buffer,buflen);// (proc->readStderr()); - qDebug() << c; + QString c(QByteArray( buffer,buflen));// (proc->readStderr()); + //qDebug() << c; char s[255]; int a,b; int pos; - lastMsg=c; + lastMsg << c; + if (lastMsg.count() >50) + lastMsg.removeFirst(); if (c.contains("Current Write Speed")) { sscanf(c.toUtf8(),"%s \"Current Write Speed\" is %d.%d",s,&a,&b); burnSpeed=a+b/10; @@ -386,3 +394,20 @@ progress->setLabelText(c); } } + + +void k9BurnDVD::eject(const QString &device) { + k9Process *process =new k9Process(); + if (k9Tools::checkProgram("kdeeject")) + *process <<"kdeeject" << device; + else + *process <<"eject" << device; + process->start(); + process->wait(); + delete process; + +} + +void k9BurnDVD::setEject(bool theValue) { + m_eject = theValue; +} diff -Nru k9copy-2.1.0/src/core/k9burndvd.h k9copy-2.2.0/src/core/k9burndvd.h --- k9copy-2.1.0/src/core/k9burndvd.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9burndvd.h 2009-02-19 22:30:17.000000000 +0100 @@ -47,6 +47,9 @@ void makeIso(QString _filename); void setSpeed(const QString& _value) { m_speed = _value;} + + void setEject(bool theValue); + private: QTime *time; @@ -56,11 +59,12 @@ QString volId; float burnSpeed; QString burnDevice; - QString lastMsg; + QStringList lastMsg; QString workDir; QString m_filename; bool cancelled; bool useK3b; + bool m_eject; bool autoBurn; bool iso; bool m_cdrkit; @@ -70,6 +74,7 @@ void getWodimCmd(QStringList &_cmd); void burnWithK3b(); + void eject(const QString &device); const QString &getImageSize(); QString imageSize; QString m_speed; diff -Nru k9copy-2.1.0/src/core/k9config.cpp k9copy-2.2.0/src/core/k9config.cpp --- k9copy-2.1.0/src/core/k9config.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9config.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -42,12 +42,14 @@ m_keepMenus=group.readEntry("keepMenus",true); m_prefDelTmpFiles=group.readEntry("deltmpfiles",false); m_prefReadAhead=group.readEntry("readahead",-1); + m_prefUserOps=group.readEntry("userops",false); group=m_config->group("mp4"); m_prefMp4Codec=group.readEntry("codec",0); + m_prefMp4Encoder=group.readEntry("encoder","mencoder"); m_prefMp4Size=group.readEntry("size",700); m_prefMp4NumberCD=group.readEntry("numberCD",1); - m_prefMp4Width=group.readEntry("width","640"); + m_prefMp4Width=group.readEntry("width","720"); m_prefMp4Height=group.readEntry("height",""); m_prefMp4AspectRatio=group.readEntry("aspectRatio",true); m_prefMp42Passes=group.readEntry("2passes",false); @@ -58,14 +60,6 @@ m_prefUseCellCache=group.readEntry("usecellcache",true); m_prefMpegChapters=group.readEntry("mpegchapters",true); - group=m_config->group("mencoder"); - m_prefVersion=group.readEntry("version",""); - m_codecAudio=group.readEntry ("audio",QStringList()); - m_codecLabels=group.readEntry ("labels",QStringList()); - m_codecLabelsAudio=group.readEntry("audiolabels",QStringList()); - - - m_codecVideo=group.readEntry("video",QStringList()); group=m_config->group("devices"); m_devices=group.readEntry("dev",QStringList()); @@ -112,9 +106,11 @@ group.writeEntry("keepMenus",m_keepMenus); group.writeEntry("deltmpfiles",m_prefDelTmpFiles); group.writeEntry("readahead",m_prefReadAhead); + group.writeEntry("userops",m_prefUserOps); group=m_config->group("mp4"); group.writeEntry("codec",m_prefMp4Codec); + group.writeEntry("encoder",m_prefMp4Encoder); group.writeEntry("size",m_prefMp4Size); group.writeEntry("numberCD",m_prefMp4NumberCD); group.writeEntry("width",m_prefMp4Width); @@ -128,12 +124,6 @@ group.writeEntry("usecellcache",m_prefUseCellCache); group.writeEntry("mpegchapters",m_prefMpegChapters); - group=m_config->group("mencoder"); - group.writeEntry("version",m_prefVersion); - group.writeEntry("audio",m_codecAudio); - group.writeEntry("labels",m_codecLabels); - group.writeEntry("audiolabels",m_codecLabelsAudio); - group.writeEntry("video",m_codecVideo); group=m_config->group("devices"); group.writeEntry("dev",m_devices); @@ -168,3 +158,10 @@ } + + +KConfig* k9Config::getConfig() { + if (m_config ==NULL) + read(); + return m_config; +} diff -Nru k9copy-2.1.0/src/core/k9config.h k9copy-2.2.0/src/core/k9config.h --- k9copy-2.1.0/src/core/k9config.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9config.h 2009-02-19 22:30:17.000000000 +0100 @@ -35,6 +35,7 @@ bool m_prefMenu; bool m_prefAutoBurn; int m_prefMp4Codec; + QString m_prefMp4Encoder; int m_prefMp4AudioCodec; int m_prefMp4AudioGain; int m_prefMp4Size; @@ -48,15 +49,12 @@ bool m_prefDelTmpFiles; bool m_prefUseCellCache; bool m_prefMpegChapters; + bool m_prefUserOps; QString m_prefMp4Width; QString m_prefMp4Height; QString m_prefMp4AudioBitrate; QString m_prefMp4VideoBitrate; QString m_prefAudioFormat; - QStringList m_codecAudio; - QStringList m_codecLabelsAudio; - QStringList m_codecLabels; - QStringList m_codecVideo; QString m_prefCodecAudio,m_prefCodecVideo,m_prefCodecLabel; QStringList m_devices; @@ -218,6 +216,14 @@ return m_prefMp4Codec; } + void setPrefMp4Encoder(const QString& _value) { + m_prefMp4Encoder = _value; + } + + QString getPrefMp4Encoder() const { + return m_prefMp4Encoder; + } + void setPrefMp4AudioCodec(const int& _value) { m_prefMp4AudioCodec = _value; } @@ -290,43 +296,6 @@ return m_prefMp4VideoBitrate; } - void setCodecAudio(const QStringList& _value) { - m_codecAudio = _value; - } - - - QStringList getCodecAudio() const { - return m_codecAudio; - } - - void setCodecLabels(const QStringList& _value) { - m_codecLabels = _value; - } - - - QStringList getCodecLabels() const { - return m_codecLabels; - } - - void setCodecVideo(const QStringList& _value) { - m_codecVideo = _value; - } - - - QStringList getCodecVideo() const { - return m_codecVideo; - } - - - void setCodecLabelsAudio(const QStringList& _value) { - m_codecLabelsAudio = _value; - } - - - QStringList getCodecLabelsAudio() const { - return m_codecLabelsAudio; - } - void setDevices(const QStringList& _value) { m_devices = _value; @@ -510,6 +479,19 @@ return m_prefReadAhead; } + KConfig* getConfig() ; + + void setPrefUserOps(bool theValue) { + m_prefUserOps = theValue; + } + + + bool getPrefUserOps() const { + return m_prefUserOps; + } + + + }; diff -Nru k9copy-2.1.0/src/core/k9dialogs.cpp k9copy-2.2.0/src/core/k9dialogs.cpp --- k9copy-2.1.0/src/core/k9dialogs.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dialogs.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -55,7 +55,8 @@ k9Dialogs::~k9Dialogs() { } void k9Dialogs::receivedStdout (KProcess *, char *buffer, int buflen) { - QString res=QString(buffer); + + QString res(QByteArray(buffer,buflen)); if (res!="" && res !="\n") m_result=res.trimmed(); @@ -138,11 +139,11 @@ } -void k9Dialogs::error(const QString &_message,const QString &_title) { +void k9Dialogs::error(const QString &_message,const QString &_title,const QStringList &_detail) { QWidget *activeWindow=QApplication::activeWindow(); if (activeWindow==0) activeWindow=k9MainWidget; - KMessageBox::error(activeWindow,_message,_title); + KMessageBox::errorList(activeWindow,_message,_detail,_title); } void k9Dialogs::information(const QString &_message, const QString &_title) { @@ -151,9 +152,9 @@ activeWindow=k9MainWidget; KMessageBox::information(activeWindow,_message,_title); } -int k9Dialogs::warningContinueCancel(const QString & _message,const QString & _title) { +int k9Dialogs::warningContinueCancel(const QString & _message,const QString & _title,const QStringList &_detail) { QWidget *activeWindow=QApplication::activeWindow(); if (activeWindow==0) activeWindow=k9MainWidget; - return KMessageBox::warningContinueCancel(activeWindow,_message,_title); + return KMessageBox::warningContinueCancelList(activeWindow,_message,_detail,_title); } diff -Nru k9copy-2.1.0/src/core/k9dialogs.h k9copy-2.2.0/src/core/k9dialogs.h --- k9copy-2.1.0/src/core/k9dialogs.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dialogs.h 2009-02-19 22:30:17.000000000 +0100 @@ -41,9 +41,9 @@ static QString getExistingDirectory (const QString &_initialDir) ; static bool useGTK(); static void useGTK(bool _useIt); - static void error(const QString &_message,const QString &_title) ; + static void error(const QString &_message,const QString &_title,const QStringList &_detail=QStringList()) ; static void information(const QString &_message,const QString &_title) ; - static int warningContinueCancel(const QString & _message,const QString & _title); + static int warningContinueCancel(const QString & _message,const QString & _title,const QStringList &_detail=QStringList()); static void setMainWidget(QWidget *_widget); static QWidget *getMainWidget(); public slots: diff -Nru k9copy-2.1.0/src/core/k9drawimage.cpp k9copy-2.2.0/src/core/k9drawimage.cpp --- k9copy-2.1.0/src/core/k9drawimage.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9drawimage.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -13,35 +13,58 @@ #include #include -k9DrawImage::k9DrawImage(QWidget *parent) - : QWidget(parent) { +k9DrawImage::k9DrawImage ( QWidget *parent ) + : QWidget ( parent ) { + + m_repaint=false; + connect ( &m_timer,SIGNAL ( timeout() ),this,SLOT ( timerDone() ) ); + m_timer.start ( 500 ); } k9DrawImage::~k9DrawImage() { } -void k9DrawImage::setImage(const QImage &_image) { - m_pixmap=QPixmap::fromImage(_image); - repaint(); +void k9DrawImage::timerDone() { + if ( m_repaint ) { + update(); + m_repaint=false; + } } -void k9DrawImage::setImage(QString _fileName) { - m_pixmap.load(_fileName); - repaint(); +void k9DrawImage::setImage ( const QImage &_image ) { + m_mutex.lock(); +// m_pixmap=QPixmap::fromImage(_image); + + m_image=_image; + m_mutex.unlock(); + m_repaint=true; } -void k9DrawImage::paintEvent ( QPaintEvent * ) { - int top,left; - QPainter p(this); - - double wratio=(double)width()/(double)m_pixmap.width(); - double hratio=(double)height()/(double)m_pixmap.height(); - double ratio= wratio < hratio ? wratio:hratio; - - top =(int) (height() -m_pixmap.height()*ratio)/2+1; - left =(int) (width() -m_pixmap.width()*ratio)/2 ; +void k9DrawImage::setImage ( QString _fileName ) { + m_mutex.lock(); + m_image.load ( _fileName ); + m_mutex.unlock(); + m_repaint=true; + +} - p.scale(ratio,ratio); - p.drawPixmap((int)(left/ratio),(int)(top/ratio),m_pixmap); +void k9DrawImage::paintEvent ( QPaintEvent * ) { + int top,left; + QPainter p ( this ); + + if ( m_mutex.tryLock() ) { + m_pixmap=QPixmap::fromImage ( m_image ); + double wratio= ( double ) width() / ( double ) m_pixmap.width(); + double hratio= ( double ) height() / ( double ) m_pixmap.height(); + double ratio= wratio < hratio ? wratio:hratio; + + top = ( int ) ( height() -m_pixmap.height() *ratio ) /2+1; + left = ( int ) ( width() -m_pixmap.width() *ratio ) /2 ; + + p.scale ( ratio,ratio ); + p.drawPixmap ( ( int ) ( left/ratio ), ( int ) ( top/ratio ),m_pixmap ); + m_repaint=false; + m_mutex.unlock(); + } } diff -Nru k9copy-2.1.0/src/core/k9drawimage.h k9copy-2.2.0/src/core/k9drawimage.h --- k9copy-2.1.0/src/core/k9drawimage.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9drawimage.h 2009-02-19 22:30:17.000000000 +0100 @@ -14,7 +14,9 @@ #include #include - +#include +#include +#include /** @author Jean-Michel PETIT */ @@ -28,9 +30,14 @@ ~k9DrawImage(); private: QPixmap m_pixmap; - + QImage m_image; + QMutex m_mutex; + bool m_repaint; + QTimer m_timer; protected: void paintEvent ( QPaintEvent *); +protected slots: + void timerDone(); }; #endif diff -Nru k9copy-2.1.0/src/core/k9dvdbackupinterface.h k9copy-2.2.0/src/core/k9dvdbackupinterface.h --- k9copy-2.1.0/src/core/k9dvdbackupinterface.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdbackupinterface.h 2009-02-19 22:30:17.000000000 +0100 @@ -25,12 +25,13 @@ { Q_OBJECT public: + enum eStreamType { AUDIO,SUBPICTURE,VIDEO,NAV}; k9DVDBackupInterface(QObject *parent = 0); ~k9DVDBackupInterface(); public slots: virtual void getOutput(uchar *buffer,uint32_t size) =0; - + virtual void getOutput(eStreamType streamType,int streamNumber,uchar *buffer,uint32_t size)=0; }; #endif diff -Nru k9copy-2.1.0/src/core/k9dvdchapter.cpp k9copy-2.2.0/src/core/k9dvdchapter.cpp --- k9copy-2.1.0/src/core/k9dvdchapter.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdchapter.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -18,8 +18,8 @@ return num; } /** Read property of QTime length. */ -const QTime& k9DVDChapter::getlength() { - return length; +const QTime& k9DVDChapter::getLength() { + return m_length; } /** Read property of int sectors. */ @@ -27,8 +27,8 @@ return sectors; } -const QTime& k9DVDChapter::gettime() { - return time; +const QTime& k9DVDChapter::getTime() { + return m_time; } k9DVDTitle *k9DVDChapter::getTitle() { return m_title; @@ -45,14 +45,14 @@ clearCells(); } -k9DVDChapter::k9DVDChapter() { - length.setHMS(0,0,0); +k9DVDChapter::k9DVDChapter():QObject() { + m_length.setHMS(0,0,0); num=0; sectors=0; startSector=0; endSector=0; m_selected=false; - time.setHMS(0,0,0); + m_time.setHMS(0,0,0); } @@ -63,9 +63,19 @@ void k9DVDChapter::setSelected(bool _value) { if (_value && !m_title->isSelected() ) { - m_title->setvideoSelected( true); - m_title->selectChapters( false); + m_title->setvideoSelected( true,false); + // m_title->selectChapters( false); } m_selected = _value; + emit selectionChanged(); +} + + +void k9DVDChapter::setLength(const QTime& theValue) { + m_length = theValue; +} + +void k9DVDChapter::setTime(const QTime& theValue) { + m_time = theValue; } diff -Nru k9copy-2.1.0/src/core/k9dvdchapter.h k9copy-2.2.0/src/core/k9dvdchapter.h --- k9copy-2.1.0/src/core/k9dvdchapter.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdchapter.h 2009-02-19 22:30:17.000000000 +0100 @@ -22,68 +22,103 @@ enum angleBlock_t {angleNone=0,angleInside=1,angleStart=3,angleEnd=5}; class k9DVDTitle; -class k9ChapterCell -{ +class k9ChapterCell { public: - k9ChapterCell(uint _id,uint _angle){ m_id=_id;m_angle=_angle;m_angleBlock=angleNone;}; - uint getid() {return m_id;}; - uint getangle(){return m_angle;}; - uchar getangleBlock() {return m_angleBlock;}; - void setangleBlock(uchar _angleBlock) {m_angleBlock=_angleBlock;}; - void setstartSector(uint32_t _value) { m_startSector=_value;}; - uint32_t getstartSector() { return m_startSector;}; - void setlastSector(uint32_t _value) { m_lastSector=_value;}; - uint32_t getlastSector() { return m_lastSector;}; + k9ChapterCell(uint _id,uint _angle) { + m_id=_id; + m_angle=_angle; + m_angleBlock=angleNone; + }; + uint getid() { + return m_id; + }; + uint getangle() { + return m_angle; + }; + uchar getangleBlock() { + return m_angleBlock; + }; + void setangleBlock(uchar _angleBlock) { + m_angleBlock=_angleBlock; + }; + void setstartSector(uint32_t _value) { + m_startSector=_value; + }; + uint32_t getstartSector() { + return m_startSector; + }; + void setlastSector(uint32_t _value) { + m_lastSector=_value; + }; + uint32_t getlastSector() { + return m_lastSector; + }; private: - uint m_id; - uint m_angle; - uchar m_angleBlock; - uint32_t m_startSector,m_lastSector; + uint m_id; + uint m_angle; + uchar m_angleBlock; + uint32_t m_startSector,m_lastSector; }; -class k9DVDChapter -{ - friend class k9DVDTitle; - friend class k9DVD; +class k9DVDChapter:public QObject { + Q_OBJECT + friend class k9DVDTitle; + friend class k9DVD; private: // Private attributes - /** */ - int num; - int id; - /** */ - QTime length; - QTime time; - /** */ - int sectors; - unsigned long startSector; - unsigned long endSector; - k9DVDTitle *m_title; - bool m_selected; - static int getcptChapter() { cptChapter ++; return cptChapter;}; - static void setcptChapter(int _newValue) { cptChapter=_newValue;}; - void clearCells(); + /** */ + int num; + int id; + /** */ + QTime m_length; + QTime m_time; + /** */ + int sectors; + unsigned long startSector; + unsigned long endSector; + k9DVDTitle *m_title; + bool m_selected; + static int getcptChapter() { + cptChapter ++; + return cptChapter; + }; + static void setcptChapter(int _newValue) { + cptChapter=_newValue; + }; + void clearCells(); public: // Public methods - k9DVDChapter(); - ~k9DVDChapter(); - /** Read property of int num. */ - virtual const int& getnum(); - /** Read property of QTime length. */ - virtual const QTime& getlength(); - /** Read property of int sectors. */ - virtual const int& getsectors(); - QList cells; - QList startSectors; - virtual const QTime & gettime(); - virtual k9DVDTitle * getTitle(); - unsigned long getstartSector() { return startSector;}; - unsigned long getendSector() {return endSector;}; + k9DVDChapter(); + ~k9DVDChapter(); + /** Read property of int num. */ + virtual const int& getnum(); + /** Read property of QTime length. */ + virtual const QTime& getLength(); + /** Read property of int sectors. */ + virtual const int& getsectors(); + QList cells; + QList startSectors; + virtual const QTime & getTime(); + virtual k9DVDTitle * getTitle(); + unsigned long getstartSector() { + return startSector; + }; + unsigned long getendSector() { + return endSector; + }; - void setSelected(bool _value); - + void setSelected(bool _value); + + + bool getSelected() const; - bool getSelected() const; + void setLength(const QTime& theValue); + + void setTime(const QTime& theValue); + +signals: + void selectionChanged(); }; #endif diff -Nru k9copy-2.1.0/src/core/k9dvd.cpp k9copy-2.2.0/src/core/k9dvd.cpp --- k9copy-2.1.0/src/core/k9dvd.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvd.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -584,15 +584,14 @@ l_track->vobusize_mb += calcVobuSize(ifo,l_chap); total_sectors += sectors; - l_chap->length.setHMS(hour,minute,second); + l_chap->setLength(QTime(hour,minute,second)); l_chap->sectors=sectors; if (l_pchap!=NULL) { - QTime t; + QTime t(0,0,0); int position; - t.setHMS(0,0,0); - position=t.secsTo(l_chap->length); - t=l_pchap->time.addSecs(position); - l_chap->time=t; + position=t.secsTo(l_pchap->getLength()); + t=l_pchap->getTime().addSecs(position); + l_chap->setTime(t); } l_pchap=l_chap; } @@ -703,8 +702,10 @@ if (!_indexed) { for (int i=0;inumTitle==num && tmp->indexed) + if (tmp->numTitle==num && tmp->indexed) { tmp->m_titles.append(track); + track->m_mainTitle=tmp; + } } } diff -Nru k9copy-2.1.0/src/core/k9dvdprogress.cpp k9copy-2.2.0/src/core/k9dvdprogress.cpp --- k9copy-2.1.0/src/core/k9dvdprogress.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdprogress.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -23,7 +23,7 @@ #include #include -k9DVDProgress::k9DVDProgress(QWidget* parent) +k9DVDProgress::k9DVDProgress(QWidget* ) { Ui_DVDProgress.setupUi(this); setWindowTitle(KDialog::makeStandardCaption(i18n("DVD Analyze"),this)); diff -Nru k9copy-2.1.0/src/core/k9dvdtitle.cpp k9copy-2.2.0/src/core/k9dvdtitle.cpp --- k9copy-2.1.0/src/core/k9dvdtitle.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdtitle.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -80,7 +80,7 @@ title->gettitleset()->updateSelection(); bool after=title->isSelected(); if (after!=before) - title->selectChapters( after); + title->selectChapters( after); } /** Read property of QString langCod. */ @@ -93,7 +93,7 @@ } k9DVDTitle * k9DVDAudioStream::gettitle() { - return title; + return title; } int k9DVDAudioStream::getID() { @@ -136,7 +136,7 @@ title->gettitleset()->updateSelection(); bool after=title->isSelected(); if (after!=before) - title->selectChapters(after); + title->selectChapters(after); } /** Read property of float size_mb. */ @@ -145,7 +145,7 @@ } k9DVDTitle * k9DVDSubtitle::gettitle() { - return title; + return title; } @@ -240,8 +240,8 @@ float k9DVDTitle::gettotalsize_mb() { float size =size_mb; for (uint i=0;igetsize_mb(); + k9DVDTitle *tmp=m_titles.at(i); + size +=tmp->getsize_mb(); } return size; @@ -249,33 +249,33 @@ //If _selected=true, returns the size of selected chapters, otherwise returns size of //unselected ones -float k9DVDTitle::getChaptersSize_mb(bool _selected){ - return (getChaptersSize(_selected)/512); +float k9DVDTitle::getChaptersSize_mb(bool _selected) { + return (getChaptersSize(_selected)/512); } //If _selected=true, returns the size of selected chapters, otherwise returns size of //unselected ones -uint64_t k9DVDTitle::getChaptersSize(bool _selected){ - uint64_t total=0; - for (int i=0;igetSelected()==_selected) { - total+= chap->getsectors(); - } - } - for (uint i=0;igetChaptersSize(_selected); - } - return total; +uint64_t k9DVDTitle::getChaptersSize(bool _selected) { + uint64_t total=0; + for (int i=0;igetSelected()==_selected) { + total+= chap->getsectors(); + } + } + for (uint i=0;igetChaptersSize(_selected); + } + return total; } float k9DVDTitle::gettotalvideosize_mb() { float size =videosize_mb; - for (uint i=0;igetvideosize_mb(); + for (int i=0;igetvideosize_mb(); } return size; @@ -284,11 +284,11 @@ QTime k9DVDTitle::gettotallength() { QTime totalTime=getlength(); - for (uint i=0;igetlength()); - totalTime=totalTime.addMSecs(msecs); + for (int i=0;igetlength()); + totalTime=totalTime.addMSecs(msecs); } return totalTime; @@ -297,24 +297,24 @@ QTime k9DVDTitle::getSelectedLength() { QTime totalTime(0,0); foreach (k9DVDChapter *chapter,chapters) { - if (chapter->getSelected()) { - QTime t; - int msecs= t.msecsTo(chapter->getlength()); - totalTime=totalTime.addMSecs(msecs); - } + if (chapter->getSelected()) { + QTime t; + int msecs= t.msecsTo(chapter->getLength()); + totalTime=totalTime.addMSecs(msecs); + } } - - - for (uint i=0;i tchapters=tmp->getChapters(); - foreach (k9DVDChapter *chapter,tchapters) { - if (chapter->getSelected()) { - QTime t; - int msecs= t.msecsTo(chapter->getlength()); - totalTime=totalTime.addMSecs(msecs); - } - } + + + for (int i=0;i tchapters=tmp->getChapters(); + foreach (k9DVDChapter *chapter,tchapters) { + if (chapter->getSelected()) { + QTime t; + int msecs= t.msecsTo(chapter->getLength()); + totalTime=totalTime.addMSecs(msecs); + } + } } return totalTime; @@ -372,7 +372,7 @@ bool k9DVDTitle::isSelected() { k9DVDAudioStream *l_auds; k9DVDSubtitle *l_sub; - uint i; + int i; if (forceSelection) return true; @@ -393,15 +393,15 @@ return(false); } - void k9DVDTitle::setvideoSelected(bool _state) { - bool before=isSelected(); - forceSelection = _state; - gettitleset()->updateSelection(); - bool after=isSelected(); - if (after!=before) { - selectChapters(after); +void k9DVDTitle::setvideoSelected(bool _state,bool _updateChapters) { + bool before=isSelected(); + forceSelection = _state; + gettitleset()->updateSelection(); + bool after=isSelected(); + if ((after!=before) && _updateChapters) { + selectChapters(after); // emit selectionChanged(); - } + } } @@ -466,15 +466,15 @@ } void k9DVDTitle::clearSubtitles() { - //while (!subtitles.isEmpty()) delete subtitles.takeFirst(); - qDeleteAll(subtitles); - subtitles.clear(); + //while (!subtitles.isEmpty()) delete subtitles.takeFirst(); + qDeleteAll(subtitles); + subtitles.clear(); } void k9DVDTitle::clearChapters() { // while (!chapters.isEmpty()) delete chapters.takeFirst(); - qDeleteAll(chapters); - chapters.clear(); + qDeleteAll(chapters); + chapters.clear(); } k9DVDTitle::k9DVDTitle() { @@ -493,43 +493,61 @@ m_forceFactor=false; m_factor=0; m_encOpt=NULL; + m_mainTitle=NULL; } k9DVDTitle::~k9DVDTitle() { - clearAudioStreams(); - clearChapters(); - clearSubtitles(); + clearAudioStreams(); + clearChapters(); + clearSubtitles(); } -k9TitleEncOpt* k9DVDTitle::getEncOpt() { - if (!m_encOpt) - m_encOpt=new k9TitleEncOpt(this); - return m_encOpt; - +k9TitleEncOpt* k9DVDTitle::getEncOpt() { + if (!m_encOpt) + m_encOpt=new k9TitleEncOpt(this); + return m_encOpt; + } void k9DVDTitle::setSelected(bool _state) { - for (int i=0;i < getaudioStreamCount();i++) - getaudioStream(i)->setselected(_state); - for (int i=0;i < getsubPictureCount();i++) - getsubtitle(i)->setselected(_state); - setvideoSelected(_state); + for (int i=0;i < getaudioStreamCount();i++) + getaudioStream(i)->setselected(_state); + for (int i=0;i < getsubPictureCount();i++) + getsubtitle(i)->setselected(_state); + setvideoSelected(_state); } void k9DVDTitle::selectChapters(bool _state) { for (int i=0;i < chapterCount;i++) { - getChapter(i)->setSelected( _state); + getChapter(i)->setSelected( _state); } - + for (uint iTitle=0;iTitleselectChapters(_state); + k9DVDTitle * title=m_titles.at(iTitle); + title->selectChapters(_state); } emit selectionChanged(); } +#define BETWEEN(a,min,max) (a>=min && a<=max)?true:false +k9DVDChapter *k9DVDTitle::getChapterFromSector(uint32_t _sector) { + foreach(k9DVDChapter *chapter,chapters) { + if (BETWEEN(_sector,chapter->getstartSector(),chapter->getendSector())) + return chapter; + } + foreach (k9DVDTitle *title,m_titles) + foreach(k9DVDChapter *chapter,title->chapters) + if (BETWEEN(_sector,chapter->getstartSector(),chapter->getendSector())) + return chapter; + + //default : no corresponding chapter + return NULL; +} +k9DVDTitle* k9DVDTitle::getMainTitle() const { + return m_mainTitle; +} diff -Nru k9copy-2.1.0/src/core/k9dvdtitle.h k9copy-2.2.0/src/core/k9dvdtitle.h --- k9copy-2.1.0/src/core/k9dvdtitle.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9dvdtitle.h 2009-02-19 22:30:17.000000000 +0100 @@ -28,234 +28,265 @@ //#include class k9DVDTitleSet; - + class k9DVDVideoStream { -friend class k9DVDTitle; + friend class k9DVDTitle; private: // Private attributes public: // Public methods }; - + class k9DVDAudioStream { -friend class k9DVDTitle; -friend class k9DVD; + friend class k9DVDTitle; + friend class k9DVD; private: // Private attributes - /** */ - QString langCod; - /** */ - QString language; - /** */ - QString format; - /** */ - QString frequency; - /** */ - QString quantization; - /** */ - int channels; - /** */ - int appMode; - /** */ - QString content; - /** */ - float size_mb; - /** */ - bool selected; + /** */ + QString langCod; + /** */ + QString language; + /** */ + QString format; + /** */ + QString frequency; + /** */ + QString quantization; + /** */ + int channels; + /** */ + int appMode; + /** */ + QString content; + /** */ + float size_mb; + /** */ + bool selected; int id; - k9DVDTitle *title; - int m_streamId; + k9DVDTitle *title; + int m_streamId; public: // Public methods - k9DVDAudioStream(); - /** Read property of QString langCod. */ - virtual const QString& getlangCod(); - /** Read property of QString language. */ - virtual const QString& getlanguage(); - /** Read property of QString format. */ - virtual const QString& getformat(); - /** Read property of QString frequency. */ - virtual const QString& getfrequency(); - /** Read property of QString quantization. */ - virtual const QString& getquantization(); - /** Read property of int channels. */ - virtual const int& getchannels(); - /** Read property of int appMode. */ - virtual const int& getappMode(); - /** Read property of QString content. */ - virtual const QString& getcontent(); - /** Read property of float size_mb. */ - virtual const float& getsize_mb(); - /** Write property of bool selected. */ - virtual void setselected( const bool& _newVal); - /** Read property of bool selected. */ - virtual const bool& getselected(); - - virtual k9DVDTitle* gettitle(); - virtual int getID(); - - virtual int getStreamId() const {return m_streamId;}; - virtual ~k9DVDAudioStream() {}; - + k9DVDAudioStream(); + /** Read property of QString langCod. */ + virtual const QString& getlangCod(); + /** Read property of QString language. */ + virtual const QString& getlanguage(); + /** Read property of QString format. */ + virtual const QString& getformat(); + /** Read property of QString frequency. */ + virtual const QString& getfrequency(); + /** Read property of QString quantization. */ + virtual const QString& getquantization(); + /** Read property of int channels. */ + virtual const int& getchannels(); + /** Read property of int appMode. */ + virtual const int& getappMode(); + /** Read property of QString content. */ + virtual const QString& getcontent(); + /** Read property of float size_mb. */ + virtual const float& getsize_mb(); + /** Write property of bool selected. */ + virtual void setselected( const bool& _newVal); + /** Read property of bool selected. */ + virtual const bool& getselected(); + + virtual k9DVDTitle* gettitle(); + virtual int getID(); + + virtual int getStreamId() const { + return m_streamId; + }; + virtual ~k9DVDAudioStream() {}; + }; class k9DVDSubtitle { -friend class k9DVDTitle; -friend class k9DVD; + friend class k9DVDTitle; + friend class k9DVD; private: // Private attributes - /** */ - QString langCod; - /** */ - QString language; - /** */ - int num; - /** */ - QString content; - /** */ - float size_mb; - /** */ - bool selected; - QList id; - k9DVDTitle *title; + /** */ + QString langCod; + /** */ + QString language; + /** */ + int num; + /** */ + QString content; + /** */ + float size_mb; + /** */ + bool selected; + QList id; + k9DVDTitle *title; public: // Public methods - k9DVDSubtitle(); - /** Read property of QString langCod. */ - virtual const QString& getlangCod(); - /** Read property of QString language. */ - virtual const QString& getlanguage(); - /** Read property of int num. */ - virtual const int& getnum(); - /** Read property of QString content. */ - virtual const QString& getcontent(); - /** Read property of float size_mb. */ - virtual const float& getsize_mb(); - /** Write property of bool selected. */ - virtual void setselected( const bool& _newVal); - /** Read property of bool selected. */ - virtual const bool& getselected(); - virtual k9DVDTitle* gettitle(); - virtual QList& getID(); - virtual ~k9DVDSubtitle() {}; + k9DVDSubtitle(); + /** Read property of QString langCod. */ + virtual const QString& getlangCod(); + /** Read property of QString language. */ + virtual const QString& getlanguage(); + /** Read property of int num. */ + virtual const int& getnum(); + /** Read property of QString content. */ + virtual const QString& getcontent(); + /** Read property of float size_mb. */ + virtual const float& getsize_mb(); + /** Write property of bool selected. */ + virtual void setselected( const bool& _newVal); + /** Read property of bool selected. */ + virtual const bool& getselected(); + virtual k9DVDTitle* gettitle(); + virtual QList& getID(); + virtual ~k9DVDSubtitle() {}; }; - + class k9TitleEncOpt; -class k9DVDTitle : public QObject{ -Q_OBJECT -friend class k9DVD; +class k9DVDTitle : public QObject { + Q_OBJECT + friend class k9DVD; private: // Public attributes - unsigned int ts_nr; - int chapterCount; - int streamCount; - int audioStreamCount; - int subPictureCount; - QTime length; - k9DVDVideoStream videoStream; - QList< k9DVDAudioStream*> audioStreams; - QList subtitles; - int VTS; - int TTN; - float FPS; - QString format; - QString aspectRatio; - int numTitle; - QString width; - QString height; - QStringList palette; - QString DF; - float size_mb; - int angleCount; - float videosize_mb; - float vobusize_mb; - QString name; - k9DVDTitle* nextTitle; - int id; - k9DVDTitleset *m_titleset; - k9DVDAudioStream *m_defAudio; - k9DVDSubtitle *m_defSubtitle; - bool m_defAudioSet; - bool m_defSubtitleSet; - QList m_titles; - uint32_t m_sectors; - bool m_forceFactor; - float m_factor; - k9TitleEncOpt *m_encOpt; + unsigned int ts_nr; + int chapterCount; + int streamCount; + int audioStreamCount; + int subPictureCount; + QTime length; + k9DVDVideoStream videoStream; + QList< k9DVDAudioStream*> audioStreams; + QList subtitles; + int VTS; + int TTN; + float FPS; + QString format; + QString aspectRatio; + int numTitle; + QString width; + QString height; + QStringList palette; + QString DF; + float size_mb; + int angleCount; + float videosize_mb; + float vobusize_mb; + QString name; + k9DVDTitle* nextTitle; + int id; + k9DVDTitleset *m_titleset; + k9DVDAudioStream *m_defAudio; + k9DVDSubtitle *m_defSubtitle; + bool m_defAudioSet; + bool m_defSubtitleSet; + QList m_titles; + uint32_t m_sectors; + bool m_forceFactor; + float m_factor; + k9TitleEncOpt *m_encOpt; + k9DVDTitle *m_mainTitle; public: // Public methods - k9DVDTitle(); - ~k9DVDTitle(); - virtual k9DVDTitleset *gettitleset() {return m_titleset;}; - virtual const int& getchapterCount(); - virtual const int& getstreamCount(); - virtual const int& getaudioStreamCount(); - virtual const int& getsubPictureCount(); - virtual const QTime& getlength(); - virtual QTime gettotallength(); - virtual QTime getSelectedLength(); - - virtual const int& getVTS(); - virtual const int& getTTN(); - virtual const float& getFPS(); - virtual const QString& getformat(); - virtual const QString& getaspectRatio(); - virtual const QString& getwidth(); - virtual const QString& getheight(); - virtual void getpalette(int i,QString & c); - virtual const QString& getDF(); - virtual const int& getangleCount(); - virtual const int& getnumTitle(); - virtual k9DVDAudioStream *getaudioStream(int num); - virtual k9DVDSubtitle *getsubtitle(int num); - virtual const float& getsize_mb(); - virtual float gettotalsize_mb(); - virtual float gettotalvideosize_mb(); - virtual float getChaptersSize_mb(bool _selected); - virtual uint64_t getChaptersSize(bool _selected); - virtual const float& getvideosize_mb(); - virtual bool isSelected(); - virtual void setname( const QString& _newVal); - virtual const QString& getname(); - virtual int getpgc(); - virtual void setnextTitle(k9DVDTitle * nTitle); - virtual k9DVDTitle* getnextTitle(); - virtual k9DVDChapter *getChapter(int num); - virtual bool getIndexed() {return indexed;}; - virtual void setvideoSelected(bool _state); - virtual void setSelected(bool _state); - virtual int getId() {return id;}; - virtual void setDefAudio(k9DVDAudioStream* _value); - virtual k9DVDAudioStream* getDefAudio() const; - virtual void setDefSubtitle(k9DVDSubtitle* _value); - virtual k9DVDSubtitle* getDefSubtitle() const; - virtual bool getDefAudioSet() const {return m_defAudioSet;}; - virtual bool getDefSubtitleSet() const {return m_defSubtitleSet;}; - virtual QList< k9DVDTitle* > getTitles() const {return m_titles;}; - virtual uint32_t getsectors() { return m_sectors;}; - virtual float getfactor() { return m_factor;}; - virtual bool getforceFactor() { return m_forceFactor;}; - virtual void selectChapters(bool _state); - virtual QList< k9DVDChapter *> getChapters() const {return chapters;}; - virtual k9TitleEncOpt* getEncOpt() ; - + k9DVDTitle(); + ~k9DVDTitle(); + virtual k9DVDTitleset *gettitleset() { + return m_titleset; + }; + virtual const int& getchapterCount(); + virtual const int& getstreamCount(); + virtual const int& getaudioStreamCount(); + virtual const int& getsubPictureCount(); + virtual const QTime& getlength(); + virtual QTime gettotallength(); + virtual QTime getSelectedLength(); + + virtual const int& getVTS(); + virtual const int& getTTN(); + virtual const float& getFPS(); + virtual const QString& getformat(); + virtual const QString& getaspectRatio(); + virtual const QString& getwidth(); + virtual const QString& getheight(); + virtual void getpalette(int i,QString & c); + virtual const QString& getDF(); + virtual const int& getangleCount(); + virtual const int& getnumTitle(); + virtual k9DVDAudioStream *getaudioStream(int num); + virtual k9DVDSubtitle *getsubtitle(int num); + virtual const float& getsize_mb(); + virtual float gettotalsize_mb(); + virtual float gettotalvideosize_mb(); + virtual float getChaptersSize_mb(bool _selected); + virtual uint64_t getChaptersSize(bool _selected); + virtual const float& getvideosize_mb(); + virtual bool isSelected(); + virtual void setname( const QString& _newVal); + virtual const QString& getname(); + virtual int getpgc(); + virtual void setnextTitle(k9DVDTitle * nTitle); + virtual k9DVDTitle* getnextTitle(); + virtual k9DVDChapter *getChapter(int num); + virtual bool getIndexed() { + return indexed; + }; + virtual void setvideoSelected(bool _state,bool _updateChapters=true); + virtual void setSelected(bool _state); + virtual int getId() { + return id; + }; + virtual void setDefAudio(k9DVDAudioStream* _value); + virtual k9DVDAudioStream* getDefAudio() const; + virtual void setDefSubtitle(k9DVDSubtitle* _value); + virtual k9DVDSubtitle* getDefSubtitle() const; + virtual k9DVDChapter *getChapterFromSector(uint32_t _sector); + virtual bool getDefAudioSet() const { + return m_defAudioSet; + }; + virtual bool getDefSubtitleSet() const { + return m_defSubtitleSet; + }; + virtual QList< k9DVDTitle* > getTitles() const { + return m_titles; + }; + virtual uint32_t getsectors() { + return m_sectors; + }; + virtual float getfactor() { + return m_factor; + }; + virtual bool getforceFactor() { + return m_forceFactor; + }; + virtual void selectChapters(bool _state); + virtual QList< k9DVDChapter *> getChapters() const { + return chapters; + }; + virtual k9TitleEncOpt* getEncOpt() ; + public slots: - virtual void setfactor(float _value) {m_factor=_value;}; - virtual void setforceFactor(bool _value) {m_forceFactor=_value;}; - + virtual void setfactor(float _value) { + m_factor=_value; + }; + virtual void setforceFactor(bool _value) { + m_forceFactor=_value; + }; + + k9DVDTitle* getMainTitle() const; + + signals: - void selectionChanged(); + void selectionChanged(); private: // Private methods - k9DVDAudioStream* addAudioStream(); - k9DVDChapter* addChapter(int num); - k9DVDSubtitle* addSubtitle(int num); - void clearAudioStreams(); - void clearSubtitles(); - void clearChapters(); - QList chapters; - bool indexed; - bool forceSelection; - int pgc; + k9DVDAudioStream* addAudioStream(); + k9DVDChapter* addChapter(int num); + k9DVDSubtitle* addSubtitle(int num); + void clearAudioStreams(); + void clearSubtitles(); + void clearChapters(); + QList chapters; + bool indexed; + bool forceSelection; + int pgc; public: // Public attributes }; - + diff -Nru k9copy-2.1.0/src/core/k9ifo2.cpp k9copy-2.2.0/src/core/k9ifo2.cpp --- k9copy-2.1.0/src/core/k9ifo2.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9ifo2.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -117,7 +117,7 @@ } */ - if (dvdfile->readBytes(buffer,size) != size) { + if (dvdfile->readBytes(buffer,size) != (int)size) { fprintf(stderr, "Error reading IFO for titleset %d\n", 0); free(buffer); dvdfile->close(); @@ -198,11 +198,10 @@ /*! \fn k9Ifo2::updateVMG(uchar * _buffer) */ -void k9Ifo2::updateVMG(uchar * _buffer) { +void k9Ifo2::updateVMG(uchar * ) { vmgi_mat_t vmgi_mat; memcpy(&vmgi_mat,_ifo->vmgi_mat,sizeof(vmgi_mat_t)); uint32_t lastSector=vmgi_mat.vmgi_last_sector; - uint32_t lastByte=vmgi_mat.vmgi_last_byte; //JMP : à vérifier if (m_position !=0) { lastSector=(round(m_position) - DVD_BLOCK_LEN) / DVD_BLOCK_LEN; @@ -300,7 +299,7 @@ /*! \fn k9Ifo2::updatePGC_COMMAND_TBL(uchar *_buffer,pgc_command_tbl_t *_cmd_tbl,int offset) */ -void k9Ifo2::updatePGC_COMMAND_TBL(uchar *_buffer,pgc_command_tbl_t *_cmd_tbl,int _offset) { +void k9Ifo2::updatePGC_COMMAND_TBL(uchar *,pgc_command_tbl_t *_cmd_tbl,int _offset) { struct { uint16_t nr_of_pre; uint16_t nr_of_post; @@ -343,7 +342,7 @@ /*! \fn k9Ifo2::updatePGC_PROGRAM_MAP(uchar *_buffer, pgc_program_map_t *_program_map, int _nr, int_offset */ -void k9Ifo2::updatePGC_PROGRAM_MAP(uchar *_buffer, pgc_program_map_t *_program_map, int _nr, int _offset) { +void k9Ifo2::updatePGC_PROGRAM_MAP(uchar *, pgc_program_map_t *_program_map, int _nr, int _offset) { int size = _nr * sizeof(pgc_program_map_t); memcpy(m_buffer+_offset, _program_map, size); // pad to word boundary @@ -355,7 +354,7 @@ /*! \fn k9Ifo2::updatePGC_CELL_PLAYBACK_TBL(uchar *_buffer, cell_playback_t *_cell_playback,int _nr, int _offset) */ -void k9Ifo2::updatePGC_CELL_PLAYBACK_TBL(uchar *_buffer, cell_playback_t *_cell_playback,int _nr, int _offset) { +void k9Ifo2::updatePGC_CELL_PLAYBACK_TBL(uchar *, cell_playback_t *_cell_playback,int _nr, int _offset) { cell_playback_t *cell_playback; int size = _nr * sizeof(cell_playback_t); //cell_playback=(cell_playback_t*) malloc(size); @@ -380,7 +379,7 @@ /*! \fn k9Ifo2::updatePGC_CELL_POSITION_TBL(uchar *_buffer,cell_position_t *_cell_position,int _nr, int _offset) */ -void k9Ifo2::updatePGC_CELL_POSITION_TBL(uchar *_buffer,cell_position_t *_cell_position,int _nr, int _offset) { +void k9Ifo2::updatePGC_CELL_POSITION_TBL(uchar *,cell_position_t *_cell_position,int _nr, int _offset) { cell_position_t * cell_position; int size = _nr * sizeof(cell_position_t); //cell_position=(cell_position_t*)malloc(size); @@ -536,7 +535,7 @@ } -void k9Ifo2::updatePTL_MAIT(uchar *_buffer) { +void k9Ifo2::updatePTL_MAIT(uchar *) { if(!_ifo->vmgi_mat) return; @@ -620,7 +619,7 @@ } -void k9Ifo2::updateC_ADT_Internal(uchar *_buffer,c_adt_t *_c_adt,int _sector) { +void k9Ifo2::updateC_ADT_Internal(uchar *,c_adt_t *_c_adt,int _sector) { c_adt_t * c_adt; //c_adt =(c_adt_t*) malloc (sizeof(c_adt_t)); c_adt =new c_adt_t; @@ -637,7 +636,7 @@ cell_adr=new cell_adr_t; ptr= _c_adt->cell_adr_table; - for(int i = 0; i < info_length/sizeof(cell_adr_t); i++) { + for(uint i = 0; i < info_length/sizeof(cell_adr_t); i++) { memcpy(cell_adr,&(ptr[i]),sizeof(cell_adr_t)); B2N_16(cell_adr->vob_id); B2N_32(cell_adr->start_sector); @@ -684,7 +683,7 @@ } } -void k9Ifo2::updateVOBU_ADMAP_Internal(uchar *_buffer,vobu_admap_t *_vobu_admap,int _sector) { +void k9Ifo2::updateVOBU_ADMAP_Internal(uchar *,vobu_admap_t *_vobu_admap,int _sector) { vobu_admap_t *vobu_admap; //vobu_admap=(vobu_admap_t*)malloc(sizeof(vobu_admap_t)); vobu_admap=new vobu_admap_t; @@ -699,7 +698,7 @@ vobu_start_sectors=new uint32_t[info_length/sizeof(uint32_t)]; memcpy(vobu_start_sectors,_vobu_admap->vobu_start_sectors,info_length); - for(int i = 0; i < info_length/sizeof(uint32_t); i++) + for(uint i = 0; i < info_length/sizeof(uint32_t); i++) B2N_32(vobu_start_sectors[i]); memcpy(m_buffer+offset,vobu_start_sectors,info_length); @@ -713,7 +712,7 @@ } -void k9Ifo2::updateVTS(uchar *_buffer) { +void k9Ifo2::updateVTS(uchar *) { vtsi_mat_t *vtsi_mat; //vtsi_mat = (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t)); vtsi_mat = new vtsi_mat_t; @@ -795,7 +794,7 @@ */ -void k9Ifo2::updateVTS_TMAPT(uchar *_buffer) { +void k9Ifo2::updateVTS_TMAPT(uchar *) { if(!_ifo->vtsi_mat) return ; diff -Nru k9copy-2.1.0/src/core/k9process.cpp k9copy-2.2.0/src/core/k9process.cpp --- k9copy-2.1.0/src/core/k9process.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9process.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -18,7 +18,7 @@ #include #include #include "k9dialogs.h" -k9Process::k9Process(QObject *parent, const char *name) +k9Process::k9Process(QObject *parent, const char *) : KProcess(parent),m_waitSync(false) { setOutputChannelMode (KProcess::SeparateChannels); @@ -29,6 +29,7 @@ connect(this,SIGNAL(started()),this,SLOT(slotStarted())); connect(this,SIGNAL(error(QProcess::ProcessError)),this,SLOT(slotError(QProcess::ProcessError))); m_shellCmd=false; + m_debugOutput=false; } @@ -57,14 +58,31 @@ void k9Process::slotReadyReadStandardError() { QByteArray ba=readAllStandardError(); + getStderr(ba); emit receivedStderr(this, ba.data(), ba.length()); } void k9Process::slotReadyReadStandardOutput() { QByteArray ba=readAllStandardOutput(); + getStdout(ba); emit receivedStdout(this, ba.data(), ba.length()); } + +void k9Process::getStdout(QByteArray ba) { + if (m_debugOutput) { + qDebug() << ba; + } + +} + +void k9Process::getStderr(QByteArray ba) { + if (m_debugOutput) { + qDebug() << ba; + } + +} + void k9Process::wait() { waitForFinished(-1); } @@ -86,7 +104,7 @@ } } -void k9Process::slotError(QProcess::ProcessError error) { +void k9Process::slotError(QProcess::ProcessError ) { if (m_waitSync) { m_eventLoop->exit(); m_waitSync=false; @@ -116,6 +134,7 @@ QString progName; progName=program().at(0); + if (!k9Tools::checkProgram(progName)) { k9Dialogs::error(i18n("Error starting program %1",progName),i18n("Running program")); return false; @@ -138,3 +157,8 @@ int k9Process::getElapsed() const { return m_elapsed.elapsed(); } + + +void k9Process::setDebugOutput(bool theValue) { + m_debugOutput = theValue; +} diff -Nru k9copy-2.1.0/src/core/k9process.h k9copy-2.2.0/src/core/k9process.h --- k9copy-2.1.0/src/core/k9process.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9process.h 2009-02-19 22:30:17.000000000 +0100 @@ -33,13 +33,19 @@ void wait(); bool isRunning(); bool normalExit(); + void setDebugOutput(bool theValue); + private: bool m_waitSync; bool m_shellCmd; QString m_debug; + bool m_debugOutput; QTime m_elapsed; QEventLoop *m_eventLoop; void syncStart(); +protected: + virtual void getStdout(QByteArray data); + virtual void getStderr(QByteArray data); private slots: void slotReadyReadStandardError (); void slotReadyReadStandardOutput (); diff -Nru k9copy-2.1.0/src/core/k9saveimage.cpp k9copy-2.2.0/src/core/k9saveimage.cpp --- k9copy-2.1.0/src/core/k9saveimage.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9saveimage.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -10,7 +10,7 @@ // // #include "k9saveimage.h" -#include "kdecmpeg2.h" +#include "k9decodethread.h" #include #include @@ -20,7 +20,7 @@ m_cpt++; if (m_cpt ==20) { m_image=*_image; - m_decoder->pause(); + //m_decoder->pause(); } } @@ -32,14 +32,15 @@ m_tempFile->setPrefix(KStandardDirs::locateLocal("tmp", "k9copy/k9p")); m_tempFile->open(); m_tempFile->setAutoRemove(true); - m_decoder=new kDecMPEG2(); + m_decoder=new k9DecodeThread(); m_decoder->setSaveImage(this); - connect(m_decoder, SIGNAL(pixmapReady(QImage*)), this, SLOT(drawImage(QImage*))); + //connect(m_decoder, SIGNAL(pixmapReady(QImage*)), this, SLOT(drawImage(QImage*))); } k9SaveImage::~k9SaveImage() { + wait(); delete m_decoder; delete m_tempFile; } @@ -48,12 +49,12 @@ m_cpt=0; m_stop=false; m_timer.start(); - m_decoder->start(); + m_decoder->start(LowestPriority); } void k9SaveImage::stop() { m_stop=true; wait(); - m_decoder->stop(); + //m_decoder->stop(); } void k9SaveImage::addData(uchar *_buffer, uint32_t _size) { @@ -62,7 +63,7 @@ m_size=_size; m_buffer=new uchar[m_size]; - tc_memcpy(m_buffer,_buffer,m_size); + memcpy(m_buffer,_buffer,m_size); m_mutex.unlock(); start(LowestPriority); } @@ -74,14 +75,23 @@ void k9SaveImage::run() { m_mutex.lock(); m_cpt=0; - m_decoder->decode(m_buffer ,m_buffer+m_size,0); + m_decoder->addData(m_buffer ,m_size); delete m_buffer; QString sFileName=m_tempFile->fileName(); m_image.save(sFileName,"PNG"); + m_fileName=sFileName; sFileName="\rINFOIMAGE:"+sFileName; fprintf(stderr,sFileName.toUtf8()); m_mutex.unlock(); } + + +QString k9SaveImage::getFileName() { + m_mutex.lock(); + QString ret( m_fileName.isNull() ? QString(""):m_fileName); + m_mutex.unlock(); + return ret; +} diff -Nru k9copy-2.1.0/src/core/k9saveimage.h k9copy-2.2.0/src/core/k9saveimage.h --- k9copy-2.1.0/src/core/k9saveimage.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9saveimage.h 2009-02-19 22:30:17.000000000 +0100 @@ -26,7 +26,7 @@ */ typedef enum { FrameType_B=0x18,FrameType_I=0x08,FrameType_P=0x10,FrameType_D=0x20} eFrameType; -class kDecMPEG2; +class k9DecodeThread; class k9SaveImage : public QThread { Q_OBJECT @@ -42,8 +42,11 @@ public slots: void drawImage(QImage*); + QString getFileName() ; + + private: - kDecMPEG2 *m_decoder; + k9DecodeThread *m_decoder; k9MemoryFifo m_fifo; bool m_stop; QTime m_timer; @@ -53,6 +56,7 @@ uint32_t m_size; QMutex m_mutex; QImage m_image; + QString m_fileName; }; #endif diff -Nru k9copy-2.1.0/src/core/k9titleencopt.cpp k9copy-2.2.0/src/core/k9titleencopt.cpp --- k9copy-2.1.0/src/core/k9titleencopt.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9titleencopt.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -58,6 +58,7 @@ m_useCache=config.getPrefUseCellCache(); + m_encoder=config.getPrefMp4Encoder(); } int k9TitleEncOpt::getMaxSize() { @@ -154,3 +155,10 @@ m_useCache=_value; } +void k9TitleEncOpt::setEncoder(const QString &_value) { + m_encoder=_value; +} + +const QString & k9TitleEncOpt::getEncoder() { + return m_encoder; +} diff -Nru k9copy-2.1.0/src/core/k9titleencopt.h k9copy-2.2.0/src/core/k9titleencopt.h --- k9copy-2.1.0/src/core/k9titleencopt.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9titleencopt.h 2009-02-19 22:30:17.000000000 +0100 @@ -67,6 +67,8 @@ void setAudioCodec(int); + const QString & getEncoder(); + void setEncoder(const QString &); private: int m_maxSize; int m_numParts; @@ -78,7 +80,7 @@ int m_codec,m_audioCodec; int m_audioGain; bool m_useCache; - + QString m_encoder; public slots: void load(); diff -Nru k9copy-2.1.0/src/core/k9videocodecs.cpp k9copy-2.2.0/src/core/k9videocodecs.cpp --- k9copy-2.1.0/src/core/k9videocodecs.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9videocodecs.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -11,23 +11,25 @@ // #include "k9videocodecs.h" #include - +#include class _k9VideoCodec { public: - _k9VideoCodec():name(""),fourcc(""),optPass1(""),optPass2(""),optOnePass(""){}; - _k9VideoCodec(QString _name,QString _fourcc,QString _optOnePass,QString _optPass1,QString _optPass2) { + _k9VideoCodec():name(""),fourcc(""),optPass1(""),optPass2(""),optOnePass(""),encoder(""){}; + _k9VideoCodec(QString _name,QString _fourcc,QString _optOnePass,QString _optPass1,QString _optPass2,QString _encoder) { name=_name; fourcc=_fourcc; optOnePass=_optOnePass; optPass1=_optPass1; optPass2=_optPass2; + encoder=_encoder; } QString name; QString fourcc; QString optOnePass; QString optPass1; QString optPass2; + QString encoder; }; @@ -35,61 +37,53 @@ : QObject(parent) { m_config=new k9Config(); - QStringList slLabels=m_config->getCodecLabels(); - QStringList slCodecs=m_config->getCodecVideo(); + + KConfig *config= m_config->getConfig(); + KConfigGroup group=config->group("codecs"); + int nbVideo=group.readEntry("VideoCount",0); + + bool bReset; - bReset=slLabels.count()==0; - if (!bReset) - bReset=slCodecs.count() != slLabels.count()*4; + bReset=(nbVideo==0); //adds default codecs if (bReset) { reset(); m_config=new k9Config(); - slLabels=m_config->getCodecLabels(); - slCodecs=m_config->getCodecVideo(); } + for (int cpt=0;cpt group(QString("videocodec%1").arg(cpt)); + m_codecs[cpt] = _k9VideoCodec(group.readEntry("name"), group.readEntry("fourcc",""),group.readEntry("opt1",""),group.readEntry("opt2",""),group.readEntry("opt3",""),group.readEntry("encoder","mencoder")); + } - QStringList::iterator c=slCodecs.begin(); - int cpt=0; - for (QStringList::iterator i=slLabels.begin();i!=slLabels.end() ;++i) { - QString fourcc=(*c); - c++; - QString o1=(*c); - c++; - QString o2=(*c); - c++; - QString o3=(*c); - c++; - m_codecs[cpt++]=_k9VideoCodec((*i),fourcc,o1,o2,o3); - } delete m_config; } void k9VideoCodecs::reset() { - m_codecs[0]=_k9VideoCodec("copy","","-ovc copy","-ovc copy","-ovc copy"); - m_codecs[1]=_k9VideoCodec("XviD","","-ovc xvid -xvidencopts bitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc xvid -xvidencopts bitrate=$VIDBR:turbo:pass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc xvid -xvidencopts bitrate=$VIDBR:turbo:pass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[2]=_k9VideoCodec("x264","","-ovc x264 -x264encopts bitrate=$VIDBR:threads=0 -vf scale=$WIDTH:$HEIGHT","-ovc x264 -x264encopts bitrate=$VIDBR:turbo=1:pass=$PASS:threads=0 -vf scale=$WIDTH:$HEIGHT","-ovc x264 -x264encopts bitrate=$VIDBR:turbo=1:pass=$PASS:threads=0 -vf scale=$WIDTH:$HEIGHT"); - m_codecs[3]=_k9VideoCodec("MJPEG","","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[4]=_k9VideoCodec("LJPEG","","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[5]=_k9VideoCodec("H261","","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[6]=_k9VideoCodec("H263","","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[7]=_k9VideoCodec("H263+","","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[8]=_k9VideoCodec("MPEG-4 (DivX 4/5)","DIVX","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[9]=_k9VideoCodec("MS MPEG-4 (DivX 3)","DIVX","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[10]=_k9VideoCodec("MS MPEG-4 v2","","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[11]=_k9VideoCodec("WMV7","","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[12]=_k9VideoCodec("WMV8","","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - - m_codecs[13]=_k9VideoCodec("RealVideo","","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[14]=_k9VideoCodec("MPEG-1 Video","","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[15]=_k9VideoCodec("MPEG-2 Video","","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[16]=_k9VideoCodec("Huffmann yuv","","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:format=422p -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR::format=422p:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR::format=422p:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[17]=_k9VideoCodec("ffv Huffmann","","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[18]=_k9VideoCodec("ASUS v1","","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[19]=_k9VideoCodec("ASUS v2","","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); - m_codecs[20]=_k9VideoCodec("flv","","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT"); + m_codecs[0]=_k9VideoCodec("copy","","-ovc copy","-ovc copy","-ovc copy","mencoder"); + m_codecs[1]=_k9VideoCodec("XviD","","-ovc xvid -xvidencopts bitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc xvid -xvidencopts bitrate=$VIDBR:turbo:pass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc xvid -xvidencopts bitrate=$VIDBR:turbo:pass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[2]=_k9VideoCodec("x264","","-ovc x264 -x264encopts bitrate=$VIDBR:threads=0 -vf scale=$WIDTH:$HEIGHT","-ovc x264 -x264encopts bitrate=$VIDBR:turbo=1:pass=$PASS:threads=0 -vf scale=$WIDTH:$HEIGHT","-ovc x264 -x264encopts bitrate=$VIDBR:turbo=1:pass=$PASS:threads=0 -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[3]=_k9VideoCodec("MJPEG","","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mjpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[4]=_k9VideoCodec("LJPEG","","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ljpeg:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[5]=_k9VideoCodec("H261","","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h261:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[6]=_k9VideoCodec("H263","","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[7]=_k9VideoCodec("H263+","","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=h263p:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[8]=_k9VideoCodec("MPEG-4 (DivX 4/5)","DIVX","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[9]=_k9VideoCodec("MS MPEG-4 (DivX 3)","DIVX","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[10]=_k9VideoCodec("MS MPEG-4 v2","","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[11]=_k9VideoCodec("WMV7","","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv1:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[12]=_k9VideoCodec("WMV8","","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=wmv2:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + + m_codecs[13]=_k9VideoCodec("RealVideo","","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=rv10:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[14]=_k9VideoCodec("MPEG-1 Video","","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg1video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[15]=_k9VideoCodec("MPEG-2 Video","","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=mpeg2video:vhq:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[16]=_k9VideoCodec("Huffmann yuv","","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:format=422p -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR::format=422p:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=huffyuv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR::format=422p:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[17]=_k9VideoCodec("ffv Huffmann","","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=ffvhuff:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[18]=_k9VideoCodec("ASUS v1","","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[19]=_k9VideoCodec("ASUS v2","","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[20]=_k9VideoCodec("flv","","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:turbo:vpass=$PASS -vf scale=$WIDTH:$HEIGHT","mencoder"); + m_codecs[21]=_k9VideoCodec("x264 (ffmpeg)","","-b $VIDBRk -s $WIDTHx$HEIGHT -vcodec libx264","-b $VIDBRk -s $WIDTHx$HEIGHT -vcodec libx264 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -vcodec libx264 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg"); save(); } @@ -97,17 +91,23 @@ void k9VideoCodecs::save() { m_config=new k9Config(); - QStringList labels; - QStringList options; + KConfig *config= m_config->getConfig(); + KConfigGroup group=config->group("codecs"); + + + int cpt=0; for (QMap::iterator i=m_codecs.begin();i!=m_codecs.end();++i) { - labels << i.value().name; - options << i.value().fourcc; - options << i.value().optOnePass; - options << i.value().optPass1; - options << i.value().optPass2; + group=config->group(QString("videocodec%1").arg(cpt)); + group.writeEntry("name", i.value().name); + group.writeEntry("fourcc", i.value().fourcc); + group.writeEntry("opt1",i.value().optOnePass); + group.writeEntry("opt2", i.value().optPass1); + group.writeEntry("opt3",i.value().optPass2); + group.writeEntry("encoder",i.value().encoder); + cpt++; } - m_config->setCodecLabels(labels); - m_config->setCodecVideo(options); + group=config->group("codecs"); + group.writeEntry("VideoCount",cpt); m_config->save(); delete m_config; } @@ -135,7 +135,9 @@ void k9VideoCodecs::setCodecName(int _num,QString _value) { m_codecs[_num].name=_value; } - +void k9VideoCodecs::setEncoder(int _num,QString _value) { + m_codecs[_num].encoder=_value; +} QString k9VideoCodecs::getFourcc(int _num) { return m_codecs[_num].fourcc; } @@ -155,6 +157,26 @@ return m_codecs[_num].name; } +int k9VideoCodecs::getAbsCodecNum(int _num,const QString &_encoder) { + k9VideoCodecs v(0); + int nb=v.count(); + int num=0; + for (int i=0;i0) { diff -Nru k9copy-2.1.0/src/core/k9videocodecs.h k9copy-2.2.0/src/core/k9videocodecs.h --- k9copy-2.1.0/src/core/k9videocodecs.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/core/k9videocodecs.h 2009-02-19 22:30:17.000000000 +0100 @@ -35,15 +35,20 @@ void setOptions1(int _num,QString _value); void setOptions2(int _num,QString _value); void setCodecName(int _num,QString _value); + void setEncoder(int _num,QString _value); + void remove(int _num); QString getFourcc(int _num); QString getOptions0(int _num); QString getOptions1(int _num); QString getOptions2(int _num); QString getCodecName(int _num); + QString getEncoder(int _num); int count(); void reset(); + static int getAbsCodecNum(int _num,const QString &_encoder); + private: QMap m_codecs; k9Config *m_config; diff -Nru k9copy-2.1.0/src/devices/cmake_install.cmake k9copy-2.2.0/src/devices/cmake_install.cmake --- k9copy-2.1.0/src/devices/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/devices/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/devices/k9cddrive.cpp k9copy-2.2.0/src/devices/k9cddrive.cpp --- k9copy-2.1.0/src/devices/k9cddrive.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/devices/k9cddrive.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -36,6 +36,7 @@ k9CdDrive::~k9CdDrive() {} void k9CdDrive::ejectPressed (const QString &udi) { + Q_UNUSED(udi); Solid::Block *block=m_Device.as(); emit volumeChanged(block->device(), ""); } @@ -218,8 +219,8 @@ foreach (Solid::Device device, Solid::Device::allDevices()) { if ( device.is()) { - Solid::Block *block=device.as(); - Solid::StorageVolume *volume=device.as(); +// Solid::Block *block=device.as(); +// Solid::StorageVolume *volume=device.as(); Solid::StorageAccess *access=device.as(); foreach (k9CdDrive *d,drives->drives) { diff -Nru k9copy-2.1.0/src/devices/k9cddrive.h k9copy-2.2.0/src/devices/k9cddrive.h --- k9copy-2.1.0/src/devices/k9cddrive.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/devices/k9cddrive.h 2009-02-19 22:30:17.000000000 +0100 @@ -66,7 +66,7 @@ int count(); /** No descriptions */ k9CdDrive * getDrive(int num); - void eject(const QString & device); + static void eject(const QString & device); void scanDrives(); void clearDrives(); static k9CdDrive *getDeviceFromMountpoint(k9CdDrives *drives,const QString &mountpoint); diff -Nru k9copy-2.1.0/src/dvdnav/cmake_install.cmake k9copy-2.2.0/src/dvdnav/cmake_install.cmake --- k9copy-2.1.0/src/dvdnav/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/dvdnav/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/dvdnav/dvdread.c k9copy-2.2.0/src/dvdnav/dvdread.c --- k9copy-2.1.0/src/dvdnav/dvdread.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdnav/dvdread.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,75 @@ +#include "common.h" +#include "dvdread.h" + +#include + +void *libHandle=0; + +DvdreadFunctions_t f_dvdread; + +void loadDvdread() { + libHandle=dlopen("libdvdread.so",RTLD_LAZY | RTLD_GLOBAL); + if (!libHandle) { + libHandle=dlopen("libdvdread.so.3",RTLD_LAZY | RTLD_GLOBAL); + } + if (!libHandle) { + libHandle=dlopen("libdvdread.so.2",RTLD_LAZY | RTLD_GLOBAL); + } + f_dvdread.DVDOpen=dlsym(libHandle,"DVDOpen"); + f_dvdread.DVDOpenFile=dlsym(libHandle,"DVDOpenFile"); + f_dvdread.DVDClose=dlsym(libHandle,"DVDClose"); + f_dvdread.DVDCloseFile=dlsym(libHandle,"DVDCloseFile"); + f_dvdread.DVDReadBlocks=dlsym(libHandle,"DVDReadBlocks"); + f_dvdread.DVDFileSeek=dlsym(libHandle,"DVDFileSeek"); + f_dvdread.DVDReadBytes=dlsym(libHandle,"DVDReadBytes"); + f_dvdread.DVDFileSize=dlsym(libHandle,"DVDFileSize"); + f_dvdread.DVDDiscID=dlsym(libHandle,"DVDDiscID"); + f_dvdread.DVDUDFVolumeInfo=dlsym(libHandle,"DVDUDFVolumeInfo"); + f_dvdread.DVDISOVolumeInfo=dlsym(libHandle,"DVDISOVolumeInfo"); + f_dvdread.DVDUDFCacheLevel=dlsym(libHandle,"DVDUDFCacheLevel"); + f_dvdread.navRead_PCI=dlsym(libHandle,"navRead_PCI"); + f_dvdread.navRead_DSI=dlsym(libHandle,"navRead_DSI"); + + + f_dvdread.ifoOpen=dlsym(libHandle,"ifoOpen"); + f_dvdread.ifoOpenVMGI=dlsym(libHandle,"ifoOpenVMGI"); + f_dvdread.ifoOpenVTSI=dlsym(libHandle,"ifoOpenVTSI"); + f_dvdread.ifoClose=dlsym(libHandle,"ifoClose"); + f_dvdread.ifoRead_PTL_MAIT=dlsym(libHandle,"ifoRead_PTL_MAIT"); + f_dvdread.ifoRead_VTS_ATRT=dlsym(libHandle,"ifoRead_VTS_ATRT"); + f_dvdread.ifoRead_TT_SRPT=dlsym(libHandle,"ifoRead_TT_SRPT"); + f_dvdread.ifoRead_VTS_PTT_SRPT=dlsym(libHandle,"ifoRead_VTS_PTT_SRPT"); + + f_dvdread.ifoRead_FP_PGC=dlsym(libHandle,"ifoRead_FP_PGC"); + f_dvdread.ifoRead_PGCIT=dlsym(libHandle,"ifoRead_PGCIT"); + f_dvdread.ifoRead_PGCI_UT=dlsym(libHandle,"ifoRead_PGCI_UT"); + f_dvdread.ifoRead_VTS_TMAPT=dlsym(libHandle,"ifoRead_VTS_TMAPT"); + f_dvdread.ifoRead_C_ADT=dlsym(libHandle,"ifoRead_C_ADT"); + f_dvdread.ifoRead_TITLE_C_ADT=dlsym(libHandle,"ifoRead_TITLE_C_ADT"); + f_dvdread.ifoRead_VOBU_ADMAP=dlsym(libHandle,"ifoRead_VOBU_ADMAP"); + f_dvdread.ifoRead_TITLE_VOBU_ADMAP=dlsym(libHandle,"ifoRead_TITLE_VOBU_ADMAP"); + f_dvdread.ifoRead_TXTDT_MGI=dlsym(libHandle,"ifoRead_TXTDT_MGI"); + + f_dvdread.ifoFree_PTL_MAIT=dlsym(libHandle,"ifoFree_PTL_MAIT"); + f_dvdread.ifoFree_VTS_ATRT=dlsym(libHandle,"ifoFree_VTS_ATRT"); + f_dvdread.ifoFree_TT_SRPT=dlsym(libHandle,"ifoFree_TT_SRPT"); + f_dvdread.ifoFree_VTS_PTT_SRPT=dlsym(libHandle,"ifoFree_VTS_PTT_SRPT"); + f_dvdread.ifoFree_FP_PGC=dlsym(libHandle,"ifoFree_FP_PGC"); + f_dvdread.ifoFree_PGCIT=dlsym(libHandle,"ifoFree_PGCIT"); + f_dvdread.ifoFree_PGCI_UT=dlsym(libHandle,"ifoFree_PGCI_UT"); + f_dvdread.ifoFree_VTS_TMAPT=dlsym(libHandle,"ifoFree_VTS_TMAPT"); + f_dvdread.ifoFree_C_ADT=dlsym(libHandle,"ifoFree_C_ADT"); + f_dvdread.ifoFree_TITLE_C_ADT=dlsym(libHandle,"ifoFree_TITLE_C_ADT"); + f_dvdread.ifoFree_VOBU_ADMAP=dlsym(libHandle,"ifoFree_VOBU_ADMAP"); + f_dvdread.ifoFree_TITLE_VOBU_ADMAP=dlsym(libHandle,"ifoFree_TITLE_VOBU_ADMAP"); + f_dvdread.ifoFree_TXTDT_MGI=dlsym(libHandle,"ifoFree_TXTDT_MGI"); + +} + +DvdreadFunctions_t *DvdreadF(void) { + return &f_dvdread; +} + +void unloadDvdread() { + dlclose(libHandle); +} diff -Nru k9copy-2.1.0/src/dvdread/bitreader.c k9copy-2.2.0/src/dvdread/bitreader.c --- k9copy-2.1.0/src/dvdread/bitreader.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/bitreader.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2000, 2001, 2002, 2003 Hkan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#include +#include + +#include "bitreader.h" + +int dvdread_getbits_init(getbits_state_t *state, uint8_t *start) { + if ((state == NULL) || (start == NULL)) return 0; + state->start = start; + state->bit_position = 0; + state->byte_position = 0; + state->byte = start[0]; + return 1; +} + +/* Non-optimized getbits. */ +/* This can easily be optimized for particular platforms. */ +uint32_t dvdread_getbits(getbits_state_t *state, uint32_t number_of_bits) { + uint32_t result=0; + uint8_t byte=0; + if (number_of_bits > 32) { + printf("Number of bits > 32 in getbits\n"); + abort(); + } + + if ((state->bit_position) > 0) { /* Last getbits left us in the middle of a byte. */ + if (number_of_bits > (8-state->bit_position)) { /* this getbits will span 2 or more bytes. */ + byte = state->byte; + byte = byte >> (state->bit_position); + result = byte; + number_of_bits -= (8-state->bit_position); + state->bit_position = 0; + state->byte_position++; + state->byte = state->start[state->byte_position]; + } else { + byte=state->byte; + state->byte = state->byte << number_of_bits; + byte = byte >> (8 - number_of_bits); + result = byte; + state->bit_position += number_of_bits; /* Here it is impossible for bit_position > 8 */ + if (state->bit_position == 8) { + state->bit_position = 0; + state->byte_position++; + state->byte = state->start[state->byte_position]; + } + number_of_bits = 0; + } + } + if ((state->bit_position) == 0) { + while (number_of_bits > 7) { + result = (result << 8) + state->byte; + state->byte_position++; + state->byte = state->start[state->byte_position]; + number_of_bits -= 8; + } + if (number_of_bits > 0) { /* number_of_bits < 8 */ + byte = state->byte; + state->byte = state->byte << number_of_bits; + state->bit_position += number_of_bits; /* Here it is impossible for bit_position > 7 */ + byte = byte >> (8 - number_of_bits); + result = (result << number_of_bits) + byte; + number_of_bits = 0; + } + } + + return result; +} + +#if 0 /* TODO: optimized versions not yet used */ + +/* WARNING: This function can only be used on a byte boundary. + No checks are made that we are in fact on a byte boundary. + */ +uint16_t dvdread_get16bits(getbits_state_t *state) { + uint16_t result; + state->byte_position++; + result = (state->byte << 8) + state->start[state->byte_position++]; + state->byte = state->start[state->byte_position]; + return result; +} + +/* WARNING: This function can only be used on a byte boundary. + No checks are made that we are in fact on a byte boundary. + */ +uint32_t dvdread_get32bits(getbits_state_t *state) { + uint32_t result; + state->byte_position++; + result = (state->byte << 8) + state->start[state->byte_position++]; + result = (result << 8) + state->start[state->byte_position++]; + result = (result << 8) + state->start[state->byte_position++]; + state->byte = state->start[state->byte_position]; + return result; +} + +#endif diff -Nru k9copy-2.1.0/src/dvdread/bitreader.h k9copy-2.2.0/src/dvdread/bitreader.h --- k9copy-2.1.0/src/dvdread/bitreader.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/bitreader.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,40 @@ +#ifndef BITREADER_H_INCLUDED +#define BITREADER_H_INCLUDED + +/* + * Copyright (C) 2000, 2001, 2002 Hkan Hjort . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + uint8_t *start; + uint32_t byte_position; + uint32_t bit_position; + uint8_t byte; +} getbits_state_t; + +int dvdread_getbits_init(getbits_state_t *state, uint8_t *start); +uint32_t dvdread_getbits(getbits_state_t *state, uint32_t number_of_bits); + +#ifdef __cplusplus +}; +#endif +#endif /* BITREADER_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdread/cmake_install.cmake k9copy-2.2.0/src/dvdread/cmake_install.cmake --- k9copy-2.1.0/src/dvdread/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/dvdread/dvd_reader.c k9copy-2.2.0/src/dvdread/dvd_reader.c --- k9copy-2.1.0/src/dvdread/dvd_reader.c 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/dvd_reader.c 2009-02-19 22:30:17.000000000 +0100 @@ -455,7 +455,7 @@ #endif { ret = stat( path, &fileinfo ); - if( ret < 0 ) { + if( ret < 0 && errno !=EOVERFLOW) { int tmp_errno = errno; /* If we can't stat the file, give up */ if(verbose >= 1) { diff -Nru k9copy-2.1.0/src/dvdread/ifo_print.c k9copy-2.2.0/src/dvdread/ifo_print.c --- k9copy-2.1.0/src/dvdread/ifo_print.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/ifo_print.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,1251 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: ifo_print.c 1135 2008-09-06 21:55:51Z rathann $ + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "ifo_types.h" +#include "ifo_read.h" +#include "ifo_print.h" + +/* Put this in some other file / package? It's used in nav_print too. */ +static void ifo_print_time(int level, dvd_time_t *dtime) { + const char *rate; + assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa); + assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); + assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); + assert((dtime->frame_u&0xf) < 0xa); + + printf("%02x:%02x:%02x.%02x", + dtime->hour, + dtime->minute, + dtime->second, + dtime->frame_u & 0x3f); + switch((dtime->frame_u & 0xc0) >> 6) { + case 1: + rate = "25.00"; + break; + case 3: + rate = "29.97"; + break; + default: + if(dtime->hour == 0 && dtime->minute == 0 + && dtime->second == 0 && dtime->frame_u == 0) + rate = "no"; + else + rate = "(please send a bug report)"; + break; + } + printf(" @ %s fps", rate); +} + +void dvdread_print_time(dvd_time_t *dtime) { + ifo_print_time(5, dtime); +} + +/* Put this in some other file / package? It's used in nav_print too. + Possibly also by the vm / navigator. */ +static void ifo_print_cmd(int row, vm_cmd_t *command) { + int i; + + printf("(%03d) ", row + 1); + for(i=0;i<8;i++) + printf("%02x ", command->bytes[i]); + printf("| "); +#if 0 + //disabled call of dvdnav function + vm_print_mnemonic(command); +#endif + printf("\n"); +} + +static void ifo_print_video_attributes(int level, video_attr_t *attr) { + + /* The following test is shorter but not correct ISO C, + memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */ + if(attr->mpeg_version == 0 + && attr->video_format == 0 + && attr->display_aspect_ratio == 0 + && attr->permitted_df == 0 + && attr->unknown1 == 0 + && attr->line21_cc_1 == 0 + && attr->line21_cc_2 == 0 + && attr->video_format == 0 + && attr->letterboxed == 0 + && attr->film_mode == 0) { + printf("-- Unspecified --"); + return; + } + + switch(attr->mpeg_version) { + case 0: + printf("mpeg1, "); + break; + case 1: + printf("mpeg2, "); + break; + default: + printf("(please send a bug report), "); + } + + switch(attr->video_format) { + case 0: + printf("ntsc, "); + break; + case 1: + printf("pal, "); + break; + default: + printf("(please send a bug report), "); + } + + switch(attr->display_aspect_ratio) { + case 0: + printf("4:3, "); + break; + case 3: + printf("16:9, "); + break; + default: + printf("(please send a bug report), "); + } + + // Wide is allways allowed..!!! + switch(attr->permitted_df) { + case 0: + printf("pan&scan+letterboxed, "); + break; + case 1: + printf("only pan&scan, "); //?? + break; + case 2: + printf("only letterboxed, "); + break; + case 3: + printf("not specified, "); + break; + default: + printf("(please send a bug report), "); + } + + printf("U%x, ", attr->unknown1); + assert(!attr->unknown1); + + if(attr->line21_cc_1 || attr->line21_cc_2) { + printf("NTSC CC "); + if(attr->line21_cc_1) + printf("1, "); + if(attr->line21_cc_2) + printf("2, "); + } + + { + int height = 480; + if(attr->video_format != 0) + height = 576; + switch(attr->picture_size) { + case 0: + printf("720x%d, ", height); + break; + case 1: + printf("704x%d, ", height); + break; + case 2: + printf("352x%d, ", height); + break; + case 3: + printf("352x%d, ", height/2); + break; + default: + printf("(please send a bug report), "); + } + } + + if(attr->letterboxed) { + printf("source letterboxed, "); + } + + if(attr->film_mode) { + printf("film. "); + } else { + printf("video. "); //camera + } +} + +static void ifo_print_audio_attributes(int level, audio_attr_t *attr) { + + if(attr->audio_format == 0 + && attr->multichannel_extension == 0 + && attr->lang_type == 0 + && attr->application_mode == 0 + && attr->quantization == 0 + && attr->sample_frequency == 0 + && attr->channels == 0 + && attr->lang_extension == 0 + && attr->unknown1 == 0 + && attr->unknown3 == 0) { + printf("-- Unspecified --"); + return; + } + + switch(attr->audio_format) { + case 0: + printf("ac3 "); + if(attr->quantization != 3) + printf("(please send a bug report) ac3 quant/drc not 3 (%d)", attr->quantization); + break; + case 1: + printf("(please send a bug report) "); + break; + case 2: + printf("mpeg1 "); + case 3: + printf("mpeg2ext "); + switch(attr->quantization) { + case 0: + printf("no drc "); + break; + case 1: + printf("drc "); + break; + default: + printf("(please send a bug report) mpeg reserved quant/drc (%d)", attr->quantization); + } + break; + case 4: + printf("lpcm "); + switch(attr->quantization) { + case 0: + printf("16bit "); + break; + case 1: + printf("20bit "); + break; + case 2: + printf("24bit "); + break; + case 3: + printf("(please send a bug report) lpcm reserved quant/drc (%d)", attr->quantization); + break; + } + break; + case 5: + printf("(please send a bug report) "); + break; + case 6: + printf("dts "); + if(attr->quantization != 3) + printf("(please send a bug report) dts quant/drc not 3 (%d)", attr->quantization); + break; + default: + printf("(please send a bug report) "); + } + + if(attr->multichannel_extension) + printf("multichannel_extension "); + + switch(attr->lang_type) { + case 0: + // not specified + assert(attr->lang_code == 0 || attr->lang_code == 0xffff); + break; + case 1: + printf("%c%c ", attr->lang_code>>8, attr->lang_code & 0xff); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->application_mode) { + case 0: + // not specified + break; + case 1: + printf("karaoke mode "); + break; + case 2: + printf("surround sound mode "); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->quantization) { + case 0: + printf("16bit "); + break; + case 1: + printf("20bit "); + break; + case 2: + printf("24bit "); + break; + case 3: + printf("drc "); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->sample_frequency) { + case 0: + printf("48kHz "); + break; + case 1: + printf("??kHz "); + break; + default: + printf("sample_frequency %i (please send a bug report) ", + attr->sample_frequency); + } + + printf("%dCh ", attr->channels + 1); + + switch(attr->lang_extension) { + case 0: + printf("Not specified "); + break; + case 1: // Normal audio + printf("Normal Caption "); + break; + case 2: // visually imparied + printf("Audio for visually impaired "); + break; + case 3: // Directors 1 + printf("Director's comments 1 "); + break; + case 4: // Directors 2 + printf("Director's comments 2 "); + break; + //case 4: // Music score ? + default: + printf("(please send a bug report) "); + } + + printf("%d ", attr->unknown1); + printf("%d ", attr->unknown3); +} + +static void ifo_print_subp_attributes(int level, subp_attr_t *attr) { + + if(attr->type == 0 + && attr->lang_code == 0 + && attr->zero1 == 0 + && attr->zero2 == 0 + && attr->lang_extension== 0) { + printf("-- Unspecified --"); + return; + } + + printf("type %02x ", attr->type); + + if(isalpha((int)(attr->lang_code >> 8)) + && isalpha((int)(attr->lang_code & 0xff))) { + printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff); + } else { + printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8), + 0xff & (unsigned)(attr->lang_code & 0xff)); + } + + printf("%d ", attr->zero1); + printf("%d ", attr->zero2); + + switch(attr->lang_extension) { + case 0: + printf("Not specified "); + break; + case 1: + printf("Caption with normal size character "); + break; + case 2: + printf("Caption with bigger size character "); + break; + case 3: + printf("Caption for children "); + break; + case 4: + printf("reserved "); + break; + case 5: + printf("Closed Caption with normal size character "); + break; + case 6: + printf("Closed Caption with bigger size character "); + break; + case 7: + printf("Closed Caption for children "); + break; + case 8: + printf("reserved "); + break; + case 9: + printf("Forced Caption"); + break; + case 10: + printf("reserved "); + break; + case 11: + printf("reserved "); + break; + case 12: + printf("reserved "); + break; + case 13: + printf("Director's comments with normal size character "); + break; + case 14: + printf("Director's comments with bigger size character "); + break; + case 15: + printf("Director's comments for children "); + break; + default: + printf("(please send a bug report) "); + } + +} + + +static void ifo_print_USER_OPS(user_ops_t *user_ops) { + uint32_t uops; + unsigned char *ptr = (unsigned char *)user_ops; + + uops = (*ptr++ << 24); + uops |= (*ptr++ << 16); + uops |= (*ptr++ << 8); + uops |= (*ptr++); + + if(uops == 0) { + printf("None\n"); + } else if(uops == 0x01ffffff) { + printf("All\n"); + } else { + if(user_ops->title_or_time_play) + printf("Title or Time Play, "); + if(user_ops->chapter_search_or_play) + printf("Chapter Search or Play, "); + if(user_ops->title_play) + printf("Title Play, "); + if(user_ops->stop) + printf("Stop, "); + if(user_ops->go_up) + printf("Go Up, "); + if(user_ops->time_or_chapter_search) + printf("Time or Chapter Search, "); + if(user_ops->prev_or_top_pg_search) + printf("Prev or Top PG Search, "); + if(user_ops->next_pg_search) + printf("Next PG Search, "); + if(user_ops->forward_scan) + printf("Forward Scan, "); + if(user_ops->backward_scan) + printf("Backward Scan, "); + if(user_ops->title_menu_call) + printf("Title Menu Call, "); + if(user_ops->root_menu_call) + printf("Root Menu Call, "); + if(user_ops->subpic_menu_call) + printf("SubPic Menu Call, "); + if(user_ops->audio_menu_call) + printf("Audio Menu Call, "); + if(user_ops->angle_menu_call) + printf("Angle Menu Call, "); + if(user_ops->chapter_menu_call) + printf("Chapter Menu Call, "); + if(user_ops->resume) + printf("Resume, "); + if(user_ops->button_select_or_activate) + printf("Button Select or Activate, "); + if(user_ops->still_off) + printf("Still Off, "); + if(user_ops->pause_on) + printf("Pause On, "); + if(user_ops->audio_stream_change) + printf("Audio Stream Change, "); + if(user_ops->subpic_stream_change) + printf("SubPic Stream Change, "); + if(user_ops->angle_change) + printf("Angle Change, "); + if(user_ops->karaoke_audio_pres_mode_change) + printf("Karaoke Audio Pres Mode Change, "); + if(user_ops->video_pres_mode_change) + printf("Video Pres Mode Change, "); + printf("\n"); + } +} + + +void ifo_print_VMGI_MAT(vmgi_mat_t *vmgi_mat) { + + printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier); + printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector); + printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector); + printf("Specification version number: %01x.%01x\n", + vmgi_mat->specification_version >> 4, + vmgi_mat->specification_version & 0xf); + /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */ + printf("VMG Category: %08x (Region Code=%02x)\n", vmgi_mat->vmg_category, ((vmgi_mat->vmg_category >> 16) & 0xff) ^0xff); + printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes); + printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr); + printf("Disc side %i\n", vmgi_mat->disc_side); + printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets); + printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier); + printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32)); + printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code); + printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte); + printf("Start byte of First Play PGC (FP PGC): %08x\n", + vmgi_mat->first_play_pgc); + printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs); + printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt); + printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut); + printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait); + printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt); + printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi); + printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt); + printf("Start sector of VMGM_VOBU_ADMAP: %08x\n", + vmgi_mat->vmgm_vobu_admap); + printf("Video attributes of VMGM_VOBS: "); + ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr); + printf("\n"); + printf("VMGM Number of Audio attributes: %i\n", + vmgi_mat->nr_of_vmgm_audio_streams); + if(vmgi_mat->nr_of_vmgm_audio_streams > 0) { + printf("\tstream %i status: ", 1); + ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr); + printf("\n"); + } + printf("VMGM Number of Sub-picture attributes: %i\n", + vmgi_mat->nr_of_vmgm_subp_streams); + if(vmgi_mat->nr_of_vmgm_subp_streams > 0) { + printf("\tstream %2i status: ", 1); + ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr); + printf("\n"); + } +} + + +void ifo_print_VTSI_MAT(vtsi_mat_t *vtsi_mat) { + int i; + + printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier); + printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector); + printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector); + printf("Specification version number: %01x.%01x\n", + vtsi_mat->specification_version>>4, + vtsi_mat->specification_version&0xf); + printf("VTS Category: %08x\n", vtsi_mat->vts_category); + printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte); + printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs); + printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs); + printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt); + printf("Start sector of VTS_PGCIT: %08x\n", vtsi_mat->vts_pgcit); + printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut); + printf("Start sector of VTS_TMAPT: %08x\n", vtsi_mat->vts_tmapt); + printf("Start sector of VTSM_C_ADT: %08x\n", vtsi_mat->vtsm_c_adt); + printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_admap); + printf("Start sector of VTS_C_ADT: %08x\n", vtsi_mat->vts_c_adt); + printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_admap); + + printf("Video attributes of VTSM_VOBS: "); + ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr); + printf("\n"); + + printf("VTSM Number of Audio attributes: %i\n", + vtsi_mat->nr_of_vtsm_audio_streams); + if(vtsi_mat->nr_of_vtsm_audio_streams > 0) { + printf("\tstream %i status: ", 1); + ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr); + printf("\n"); + } + + printf("VTSM Number of Sub-picture attributes: %i\n", + vtsi_mat->nr_of_vtsm_subp_streams); + if(vtsi_mat->nr_of_vtsm_subp_streams > 0) { + printf("\tstream %2i status: ", 1); + ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr); + printf("\n"); + } + + printf("Video attributes of VTS_VOBS: "); + ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr); + printf("\n"); + + printf("VTS Number of Audio attributes: %i\n", + vtsi_mat->nr_of_vts_audio_streams); + for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) { + printf("\tstream %i status: ", i); + ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]); + printf("\n"); + } + + printf("VTS Number of Subpicture attributes: %i\n", + vtsi_mat->nr_of_vts_subp_streams); + for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) { + printf("\tstream %2i status: ", i); + ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]); + printf("\n"); + } +} + + +static void ifo_print_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) { + int i; + + if(cmd_tbl == NULL) { + printf("No Command table present\n"); + return; + } + + printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre); + for(i = 0; i < cmd_tbl->nr_of_pre; i++) { + ifo_print_cmd(i, &cmd_tbl->pre_cmds[i]); + } + + printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post); + for(i = 0; i < cmd_tbl->nr_of_post; i++) { + ifo_print_cmd(i, &cmd_tbl->post_cmds[i]); + } + + printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell); + for(i = 0; i < cmd_tbl->nr_of_cell; i++) { + ifo_print_cmd(i, &cmd_tbl->cell_cmds[i]); + } +} + + +static void ifo_print_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int nr) { + int i; + + if(program_map == NULL) { + printf("No Program map present\n"); + return; + } + + for(i = 0; i < nr; i++) { + printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]); + } +} + + +static void ifo_print_CELL_PLAYBACK(cell_playback_t *cell_playback, int nr) { + int i; + + if(cell_playback == NULL) { + printf("No Cell Playback info present\n"); + return; + } + + for(i=0;inr_of_programs); + printf("Number of Cells: %i\n", pgc->nr_of_cells); + /* Check that time is 0:0:0:0 also if nr_of_programs==0 */ + printf("Playback time: "); + dvdread_print_time(&pgc->playback_time); printf("\n"); + + /* If no programs/no time then does this mean anything? */ + printf("Prohibited user operations: "); + ifo_print_USER_OPS(&pgc->prohibited_ops); + + for(i = 0; i < 8; i++) { + if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */ + printf("Audio stream %i control: %04x\n", + i, pgc->audio_control[i]); + } + } + + for(i = 0; i < 32; i++) { + if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */ + printf("Subpicture stream %2i control: %08x: 4:3=%d, Wide=%d, Letterbox=%d, Pan-Scan=%d\n", + i, pgc->subp_control[i], + (pgc->subp_control[i] >>24) & 0x1f, + (pgc->subp_control[i] >>16) & 0x1f, + (pgc->subp_control[i] >>8) & 0x1f, + (pgc->subp_control[i] ) & 0x1f); + } + } + + printf("Next PGC number: %i\n", pgc->next_pgc_nr); + printf("Prev PGC number: %i\n", pgc->prev_pgc_nr); + printf("GoUp PGC number: %i\n", pgc->goup_pgc_nr); + if(pgc->nr_of_programs != 0) { + printf("Still time: %i seconds (255=inf)\n", pgc->still_time); + printf("PG Playback mode %02x\n", pgc->pg_playback_mode); + } + + if(pgc->nr_of_programs != 0) { + for(i = 0; i < 16; i++) { + printf("Color %2i: %08x\n", i, pgc->palette[i]); + } + } + + /* Memmory offsets to div. tables. */ + ifo_print_PGC_COMMAND_TBL(pgc->command_tbl); + ifo_print_PGC_PROGRAM_MAP(pgc->program_map, pgc->nr_of_programs); + ifo_print_CELL_PLAYBACK(pgc->cell_playback, pgc->nr_of_cells); + ifo_print_CELL_POSITION(pgc->cell_position, pgc->nr_of_cells); +} + + +void ifo_print_TT_SRPT(tt_srpt_t *tt_srpt) { + int i; + + printf("Number of TitleTrack search pointers: %i\n", + tt_srpt->nr_of_srpts); + for(i=0;inr_of_srpts;i++) { + printf("Title Track index %i\n", i + 1); + printf("\tTitle set number (VTS): %i", + tt_srpt->title[i].title_set_nr); + printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn); + printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts); + printf("\tNumber of angles: %i\n", + tt_srpt->title[i].nr_of_angles); + + printf("\tTitle playback type: (%02x)\n", + *(uint8_t *)&(tt_srpt->title[i].pb_ty)); + printf("\t\t%s\n", + tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ? "Random or Shuffle" : "Sequencial"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd) printf("\t\tJump/Link/Call exists in cell cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd) printf("\t\tJump/Link/Call exists in pre/post cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd) printf("\t\tJump/Link/Call exists in button cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom) printf("\t\tJump/Link/Call exists in tt_dom cmd\n"); + printf("\t\tTitle or time play:%d\n", tt_srpt->title[i].pb_ty.title_or_time_play); + printf("\t\tChapter search or play:%d\n", tt_srpt->title[i].pb_ty.chapter_search_or_play); + + printf("\tParental ID field: %04x\n", + tt_srpt->title[i].parental_id); + printf("\tTitle set starting sector %08x\n", + tt_srpt->title[i].title_set_sector); + } +} + + +void ifo_print_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) { + int i, j; + printf(" nr_of_srpts %i last byte %i\n", + vts_ptt_srpt->nr_of_srpts, + vts_ptt_srpt->last_byte); + for(i=0;inr_of_srpts;i++) { + for(j=0;jtitle[i].nr_of_ptts;j++) { + printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n", + i + 1, j + 1, + vts_ptt_srpt->title[i].ptt[j].pgcn, + vts_ptt_srpt->title[i].ptt[j].pgn ); + } + } +} + + +static void hexdump(uint8_t *ptr, int len) { + while(len--) + printf("%02x ", *ptr++); +} + +void ifo_print_PTL_MAIT(ptl_mait_t *ptl_mait) { + int i, j; + + printf("Number of Countries: %i\n", ptl_mait->nr_of_countries); + printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss); + //printf("Last byte: %i\n", ptl_mait->last_byte); + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + printf("Country code: %c%c\n", + ptl_mait->countries[i].country_code >> 8, + ptl_mait->countries[i].country_code & 0xff); + /* + printf("Start byte: %04x %i\n", + ptl_mait->countries[i].pf_ptl_mai_start_byte, + ptl_mait->countries[i].pf_ptl_mai_start_byte); + */ + /* This seems to be pointing at a array with 8 2byte fields per VTS + ? and one extra for the menu? always an odd number of VTSs on + all the dics I tested so it might be padding to even also. + If it is for the menu it probably the first entry. */ + for(j=0;j<8;j++) { + hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE + + ptl_mait->countries[i].pf_ptl_mai_start_byte + + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2); + printf("\n"); + } + } +} + +void ifo_print_VTS_TMAPT(vts_tmapt_t *vts_tmapt) { + unsigned int timeunit; + int i, j; + + printf("Number of VTS_TMAPS: %i\n", vts_tmapt->nr_of_tmaps); + printf("Last byte: %i\n", vts_tmapt->last_byte); + + for(i = 0; i < vts_tmapt->nr_of_tmaps; i++) { + printf("TMAP %i (number matches title PGC number.)\n", i + 1); + printf(" offset %d relative to VTS_TMAPTI\n", vts_tmapt->tmap_offset[i]); + printf(" Time unit (seconds): %i\n", vts_tmapt->tmap[i].tmu); + printf(" Number of entries: %i\n", vts_tmapt->tmap[i].nr_of_entries); + timeunit = vts_tmapt->tmap[i].tmu; + for(j = 0; j < vts_tmapt->tmap[i].nr_of_entries; j++) { + unsigned int ac_time = timeunit * (j + 1); + printf("Time: %2i:%02i:%02i VOBU Sector: 0x%08x %s\n", + ac_time / (60 * 60), (ac_time / 60) % 60, ac_time % 60, + vts_tmapt->tmap[i].map_ent[j] & 0x7fffffff, + (vts_tmapt->tmap[i].map_ent[j] >> 31) ? "discontinuity" : ""); + } + } +} + +void ifo_print_C_ADT(c_adt_t *c_adt) { + int i, entries; + + printf("Number of VOBs in this VOBS: %i\n", c_adt->nr_of_vobs); + //entries = c_adt->nr_of_vobs; + entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t); + + for(i = 0; i < entries; i++) { + printf("VOB ID: %3i, Cell ID: %3i ", + c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id); + printf("Sector (first): 0x%08x (last): 0x%08x\n", + c_adt->cell_adr_table[i].start_sector, + c_adt->cell_adr_table[i].last_sector); + } +} + + +void ifo_print_VOBU_ADMAP(vobu_admap_t *vobu_admap) { + int i, entries; + + entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4; + for(i = 0; i < entries; i++) { + printf("VOBU %5i First sector: 0x%08x\n", i + 1, + vobu_admap->vobu_start_sectors[i]); + } +} + +const char *ifo_print_menu_name(int type) { + const char *menu_name; + menu_name=""; + switch (type) { + case 2: + menu_name="Title"; + break; + case 3: + menu_name = "Root"; + break; + case 4: + menu_name = "Sub-Picture"; + break; + case 5: + menu_name = "Audio"; + break; + case 6: + menu_name = "Angle"; + break; + case 7: + menu_name = "PTT (Chapter)"; + break; + default: + menu_name = "Unknown"; + break; + } + return &menu_name[0]; +} + +/* pgc_type=1 for menu, 0 for title. */ +void ifo_print_PGCIT(pgcit_t *pgcit, int pgc_type) { + int i; + + printf("\nNumber of Program Chains: %3i\n", pgcit->nr_of_pgci_srp); + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { + printf("\nProgram (PGC): %3i\n", i + 1); + if (pgc_type) { + printf("PGC Category: Entry PGC %d, Menu Type=0x%02x:%s (Entry id 0x%02x), ", + pgcit->pgci_srp[i].entry_id >> 7, + pgcit->pgci_srp[i].entry_id & 0xf, + ifo_print_menu_name(pgcit->pgci_srp[i].entry_id & 0xf), + pgcit->pgci_srp[i].entry_id); + } else { + printf("PGC Category: %s VTS_TTN:0x%02x (Entry id 0x%02x), ", + pgcit->pgci_srp[i].entry_id >> 7 ? "At Start of" : "During", + pgcit->pgci_srp[i].entry_id & 0xf, + pgcit->pgci_srp[i].entry_id); + } + printf("Parental ID mask 0x%04x\n", pgcit->pgci_srp[i].ptl_id_mask); + ifo_print_PGC(pgcit->pgci_srp[i].pgc); + } +} + + +void ifo_print_PGCI_UT(pgci_ut_t *pgci_ut) { + int i, menu; + + printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus); + for(i = 0; i < pgci_ut->nr_of_lus; i++) { + printf("\nMenu Language Unit %d\n", i+1); + printf("\nMenu Language Code: %c%c\n", + pgci_ut->lu[i].lang_code >> 8, + pgci_ut->lu[i].lang_code & 0xff); + + menu = pgci_ut->lu[i].exists; + printf("Menu Existence: %02x: ", menu); + if (menu == 0) { + printf("No menus "); + } + if (menu & 0x80) { + printf("Root "); + menu^=0x80; + } + if (menu & 0x40) { + printf("Sub-Picture "); + menu^=0x40; + } + if (menu & 0x20) { + printf("Audio "); + menu^=0x20; + } + if (menu & 0x10) { + printf("Angle "); + menu^=0x10; + } + if (menu & 0x08) { + printf("PTT "); + menu^=0x08; + } + if (menu > 0) { + printf("Unknown extra menus "); + menu^=0x08; + } + printf("\n"); + ifo_print_PGCIT(pgci_ut->lu[i].pgcit, 1); + } +} + + +static void ifo_print_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) { + int i; + + printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat); + + printf("Video attributes of VTSM_VOBS: "); + ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr); + printf("\n"); + printf("Number of Audio streams: %i\n", + vts_attributes->nr_of_vtsm_audio_streams); + if(vts_attributes->nr_of_vtsm_audio_streams > 0) { + printf("\tstream %i attributes: ", 1); + ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr); + printf("\n"); + } + printf("Number of Subpicture streams: %i\n", + vts_attributes->nr_of_vtsm_subp_streams); + if(vts_attributes->nr_of_vtsm_subp_streams > 0) { + printf("\tstream %2i attributes: ", 1); + ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr); + printf("\n"); + } + + printf("Video attributes of VTSTT_VOBS: "); + ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr); + printf("\n"); + printf("Number of Audio streams: %i\n", + vts_attributes->nr_of_vtstt_audio_streams); + for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) { + printf("\tstream %i attributes: ", i); + ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]); + printf("\n"); + } + + printf("Number of Subpicture streams: %i\n", + vts_attributes->nr_of_vtstt_subp_streams); + for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) { + printf("\tstream %2i attributes: ", i); + ifo_print_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]); + printf("\n"); + } +} + + +void ifo_print_VTS_ATRT(vts_atrt_t *vts_atrt) { + int i; + + printf("Number of Video Title Sets: %3i\n", vts_atrt->nr_of_vtss); + for(i = 0; i < vts_atrt->nr_of_vtss; i++) { + printf("\nVideo Title Set %i\n", i + 1); + ifo_print_VTS_ATTRIBUTES(&vts_atrt->vts[i]); + } +} + + +void ifo_print(dvd_reader_t *dvd, int title) { + ifo_handle_t *ifohandle; + printf("Local ifo_print\n"); + ifohandle = ifoOpen(dvd, title); + if(!ifohandle) { + fprintf(stderr, "Can't open info file for title %d\n", title); + return; + } + + + if(ifohandle->vmgi_mat) { + + printf("VMG top level\n-------------\n"); + ifo_print_VMGI_MAT(ifohandle->vmgi_mat); + + printf("\nFirst Play PGC\n--------------\n"); + if(ifohandle->first_play_pgc) + ifo_print_PGC(ifohandle->first_play_pgc); + else + printf("No First Play PGC present\n"); + + printf("\nTitle Track search pointer table\n"); + printf( "------------------------------------------------\n"); + ifo_print_TT_SRPT(ifohandle->tt_srpt); + + printf("\nMenu PGCI Unit table\n"); + printf( "--------------------\n"); + if(ifohandle->pgci_ut) { + ifo_print_PGCI_UT(ifohandle->pgci_ut); + } else { + printf("No PGCI Unit table present\n"); + } + + printf("\nParental Manegment Information table\n"); + printf( "------------------------------------\n"); + if(ifohandle->ptl_mait) { + ifo_print_PTL_MAIT(ifohandle->ptl_mait); + } else { + printf("No Parental Management Information present\n"); + } + + printf("\nVideo Title Set Attribute Table\n"); + printf( "-------------------------------\n"); + ifo_print_VTS_ATRT(ifohandle->vts_atrt); + + printf("\nText Data Manager Information\n"); + printf( "-----------------------------\n"); + if(ifohandle->txtdt_mgi) { + //ifo_print_TXTDT_MGI(&(vmgi->txtdt_mgi)); + } else { + printf("No Text Data Manager Information present\n"); + } + + printf("\nMenu Cell Adress table\n"); + printf( "-----------------\n"); + if(ifohandle->menu_c_adt) { + ifo_print_C_ADT(ifohandle->menu_c_adt); + } else { + printf("No Menu Cell Adress table present\n"); + } + + printf("\nVideo Manager Menu VOBU address map\n"); + printf( "-----------------\n"); + if(ifohandle->menu_vobu_admap) { + ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); + } else { + printf("No Menu VOBU address map present\n"); + } + } + + + if(ifohandle->vtsi_mat) { + + printf("VTS top level\n-------------\n"); + ifo_print_VTSI_MAT(ifohandle->vtsi_mat); + + printf("\nPart of Title Track search pointer table\n"); + printf( "----------------------------------------------\n"); + ifo_print_VTS_PTT_SRPT(ifohandle->vts_ptt_srpt); + + printf("\nPGCI Unit table\n"); + printf( "--------------------\n"); + ifo_print_PGCIT(ifohandle->vts_pgcit, 0); + + printf("\nMenu PGCI Unit table\n"); + printf( "--------------------\n"); + if(ifohandle->pgci_ut) { + ifo_print_PGCI_UT(ifohandle->pgci_ut); + } else { + printf("No Menu PGCI Unit table present\n"); + } + + printf("\nVTS Time Map table\n"); + printf( "-----------------\n"); + if(ifohandle->vts_tmapt) { + ifo_print_VTS_TMAPT(ifohandle->vts_tmapt); + } else { + printf("No VTS Time Map table present\n"); + } + + printf("\nMenu Cell Adress table\n"); + printf( "-----------------\n"); + if(ifohandle->menu_c_adt) { + ifo_print_C_ADT(ifohandle->menu_c_adt); + } else { + printf("No Cell Adress table present\n"); + } + + printf("\nVideo Title Set Menu VOBU address map\n"); + printf( "-----------------\n"); + if(ifohandle->menu_vobu_admap) { + ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); + } else { + printf("No Menu VOBU address map present\n"); + } + + printf("\nCell Adress table\n"); + printf( "-----------------\n"); + ifo_print_C_ADT(ifohandle->vts_c_adt); + + printf("\nVideo Title Set VOBU address map\n"); + printf( "-----------------\n"); + ifo_print_VOBU_ADMAP(ifohandle->vts_vobu_admap); + } + + ifoClose(ifohandle); +} + +/* + * $Log$ + * Revision 1.3 2004/10/22 11:36:19 jcdutton + * Stop seg fault when using ifo_dump. + * + * Revision 1.2 2004/09/27 12:24:01 jcdutton + * Add extra info to printout when using ifo_dump. + * + * Revision 1.1 2004/01/11 21:43:13 mroi + * big build system changes + * * cleaned up all Makefiles and added a Makefile.common + * * added relchk script + * * moved libdvdread files to a dvdread subdir + * * moved DVD VM to a vm subdir + * * removed unused code in read_cache.c + * + * Revision 1.4 2004/01/01 15:13:13 jcdutton + * Put ifo_print.c and .h back in. + * + * Revision 1.7 2003/04/28 15:17:17 jcdutton + * Update ifodump to work with new libdvdnav cvs, instead of needing libdvdread. + * + * Revision 1.6 2003/04/05 22:49:04 jcdutton + * Update with more info from the latest libdvdread. + * + * Revision 1.5 2003/04/05 13:03:49 jcdutton + * Small updates. + * + * Revision 1.4 2003/04/01 08:01:03 jcdutton + * Add VTS Time map display. Requires libdvdread 0.9.4. The same version that comes with xine. + * + * Revision 1.3 2003/03/14 15:49:18 mroi + * adjust to new libdvdread version + * + * Revision 1.2 2002/08/30 05:12:33 jcdutton + * Minor update now that I know what PGC Entry IDs are for. + * + * Revision 1.1.1.1 2002/08/28 09:48:35 jcdutton + * Initial import into CVS. + * + * + * + */ + diff -Nru k9copy-2.1.0/src/dvdread/ifo_print.h k9copy-2.2.0/src/dvdread/ifo_print.h --- k9copy-2.1.0/src/dvdread/ifo_print.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdread/ifo_print.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * $Id: ifo_print.h 1135 2008-09-06 21:55:51Z rathann $ + * + */ + +#ifndef IFO_PRINT_H_INCLUDED +#define IFO_PRINT_H_INCLUDED + +#include +#include "ifo_types.h" + +void ifo_print(dvd_reader_t *dvd, int title); +void dvdread_print_time(dvd_time_t *dtime); + +#endif /* IFO_PRINT_H_INCLUDED */ + +/* + * $Log$ + * Revision 1.1 2004/01/11 21:43:13 mroi + * big build system changes + * * cleaned up all Makefiles and added a Makefile.common + * * added relchk script + * * moved libdvdread files to a dvdread subdir + * * moved DVD VM to a vm subdir + * * removed unused code in read_cache.c + * + * Revision 1.4 2004/01/01 15:13:13 jcdutton + * Put ifo_print.c and .h back in. + * + * Revision 1.2 2003/04/28 15:17:17 jcdutton + * Update ifodump to work with new libdvdnav cvs, instead of needing libdvdread. + * + * Revision 1.1.1.1 2002/08/28 09:48:35 jcdutton + * Initial import into CVS. + * + * + * + */ + diff -Nru k9copy-2.1.0/src/dvdreadnew/bswap.h k9copy-2.2.0/src/dvdreadnew/bswap.h --- k9copy-2.1.0/src/dvdreadnew/bswap.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/bswap.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,126 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef BSWAP_H_INCLUDED +#define BSWAP_H_INCLUDED + +/* + * Copyright (C) 2000, 2001 Billy Biggs , + * Hkan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#if defined(WORDS_BIGENDIAN) +/* All bigendian systems are fine, just ignore the swaps. */ +#define B2N_16(x) (void)(x) +#define B2N_32(x) (void)(x) +#define B2N_64(x) (void)(x) + +#else + +/* For __FreeBSD_version */ +#if defined(HAVE_SYS_PARAM_H) +#include +#endif + +#if defined(__linux__) +#include +#define B2N_16(x) x = bswap_16(x) +#define B2N_32(x) x = bswap_32(x) +#define B2N_64(x) x = bswap_64(x) + +#elif defined(__NetBSD__) +#include +#define B2N_16(x) BE16TOH(x) +#define B2N_32(x) BE32TOH(x) +#define B2N_64(x) BE64TOH(x) + +#elif defined(__OpenBSD__) +#include +#define B2N_16(x) x = swap16(x) +#define B2N_32(x) x = swap32(x) +#define B2N_64(x) x = swap64(x) + +#elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 +#include +#define B2N_16(x) x = be16toh(x) +#define B2N_32(x) x = be32toh(x) +#if __FreeBSD_version >= 500000 +#define B2N_64(x) x = be64toh(x) +#else +#define B2N_64(x) \ + x = ((((x) & 0xff00000000000000) >> 56) | \ + (((x) & 0x00ff000000000000) >> 40) | \ + (((x) & 0x0000ff0000000000) >> 24) | \ + (((x) & 0x000000ff00000000) >> 8) | \ + (((x) & 0x00000000ff000000) << 8) | \ + (((x) & 0x0000000000ff0000) << 24) | \ + (((x) & 0x000000000000ff00) << 40) | \ + (((x) & 0x00000000000000ff) << 56)) +#endif /* _FreeBSD_version >= 500000 */ + +#elif defined(__DragonFly__) +#include +#define B2N_16(x) x = be16toh(x) +#define B2N_32(x) x = be32toh(x) +#define B2N_64(x) x = be64toh(x) + + +#elif defined(__APPLE__) || defined(__DARWIN__) +#include +#define B2N_16(x) x = OSSwapBigToHostConstInt16(x) +#define B2N_32(x) x = OSSwapBigToHostConstInt32(x) +#define B2N_64(x) x = OSSwapBigToHostConstInt64(x) + +#else +#if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX) +/* These systems don't have swap macros */ +#else +/* If there isn't a header provided with your system with this functionality + * add the relevant || define( ) to the list above. + */ +#warning "You should add endian swap macros for your system" +#endif + +/* This is a slow but portable implementation, it has multiple evaluation + * problems so beware. + * Old FreeBSD's and Solaris don't have or any other such + * functionality! + */ + +#define B2N_16(x) \ + x = ((((x) & 0xff00) >> 8) | \ + (((x) & 0x00ff) << 8)) +#define B2N_32(x) \ + x = ((((x) & 0xff000000) >> 24) | \ + (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | \ + (((x) & 0x000000ff) << 24)) +#define B2N_64(x) \ + x = ((((x) & 0xff00000000000000) >> 56) | \ + (((x) & 0x00ff000000000000) >> 40) | \ + (((x) & 0x0000ff0000000000) >> 24) | \ + (((x) & 0x000000ff00000000) >> 8) | \ + (((x) & 0x00000000ff000000) << 8) | \ + (((x) & 0x0000000000ff0000) << 24) | \ + (((x) & 0x000000000000ff00) << 40) | \ + (((x) & 0x00000000000000ff) << 56)) + + + +#endif + +#endif /* WORDS_BIGENDIAN */ + +#endif /* BSWAP_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/cmake_install.cmake k9copy-2.2.0/src/dvdreadnew/cmake_install.cmake --- k9copy-2.1.0/src/dvdreadnew/cmake_install.cmake 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,34 @@ +# Install script for directory: /home/jmp/svn/k9copy/kde4/src/dvdread + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/usr") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "0") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + diff -Nru k9copy-2.1.0/src/dvdreadnew/CTestTestfile.cmake k9copy-2.2.0/src/dvdreadnew/CTestTestfile.cmake --- k9copy-2.1.0/src/dvdreadnew/CTestTestfile.cmake 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/CTestTestfile.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,7 @@ +# CMake generated Testfile for +# Source directory: /home/jmp/svn/k9copy/kde4/src/dvdread +# Build directory: /home/jmp/svn/k9copy/kde4/src/dvdread +# +# This file replicates the SUBDIRS() and ADD_TEST() commands from the source +# tree CMakeLists.txt file, skipping any SUBDIRS() or ADD_TEST() commands +# that are excluded by CMake control structures, i.e. IF() commands. diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_input.c k9copy-2.2.0/src/dvdreadnew/dvd_input.c --- k9copy-2.1.0/src/dvdreadnew/dvd_input.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_input.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,414 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + * Copyright (C) 2002 Samuel Hocevar , + * Hkan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + */ + +#include "config.h" + +#include +#include +#define __USE_GNU /* to get O_DIRECT in linux */ +#include +#include + +#include "dvd_reader.h" +#include "dvd_input.h" + +#include "dvdread_internal.h" + +/* The function pointers that is the exported interface of this file. */ +dvd_input_t (*dvdinput_open) (const char *); +int (*dvdinput_close) (dvd_input_t); +int (*dvdinput_seek) (dvd_input_t, int); +int (*dvdinput_title) (dvd_input_t, int); +/** + * pointer must be aligned to 2048 bytes + * if reading from a raw/O_DIRECT file + */ +int (*dvdinput_read) (dvd_input_t, void *, int, int); + +char * (*dvdinput_error) (dvd_input_t); + +#ifdef HAVE_DVDCSS_DVDCSS_H +/* linking to libdvdcss */ +#include +#define DVDcss_open(a) dvdcss_open((char*)(a)) +#define DVDcss_close dvdcss_close +#define DVDcss_seek dvdcss_seek +#define DVDcss_title dvdcss_title +#define DVDcss_read dvdcss_read +#define DVDcss_error dvdcss_error +#else +/* dlopening libdvdcss */ +#include +typedef struct dvdcss_s *dvdcss_handle; +static dvdcss_handle (*DVDcss_open) (const char *); +static int (*DVDcss_close) (dvdcss_handle); +static int (*DVDcss_seek) (dvdcss_handle, int, int); +static int (*DVDcss_title) (dvdcss_handle, int); +static int (*DVDcss_read) (dvdcss_handle, void *, int, int); +static char * (*DVDcss_error) (dvdcss_handle); +#endif + +/* The DVDinput handle, add stuff here for new input methods. */ +struct dvd_input_s { + /* libdvdcss handle */ + dvdcss_handle dvdcss; + + /* dummy file input */ + int fd; +}; + + +/** + * initialize and open a DVD device or file. + */ +static dvd_input_t css_open(const char *target) +{ + dvd_input_t dev; + + /* Allocate the handle structure */ + dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s)); + if(dev == NULL) { + /* malloc has set errno to ENOMEM */ + return NULL; + } + + /* Really open it with libdvdcss */ + dev->dvdcss = DVDcss_open(target); + if(dev->dvdcss == 0) { + free(dev); + dev = NULL; + } + + return dev; +} + +/** + * return the last error message + */ +static char *css_error(dvd_input_t dev) +{ + return DVDcss_error(dev->dvdcss); +} + +/** + * seek into the device. + */ +static int css_seek(dvd_input_t dev, int blocks) +{ + /* DVDINPUT_NOFLAGS should match the DVDCSS_NOFLAGS value. */ + return DVDcss_seek(dev->dvdcss, blocks, DVDINPUT_NOFLAGS); +} + +/** + * set the block for the begining of a new title (key). + */ +static int css_title(dvd_input_t dev, int block) +{ + return DVDcss_title(dev->dvdcss, block); +} + +/** + * read data from the device. + */ +static int css_read(dvd_input_t dev, void *buffer, int blocks, int flags) +{ + return DVDcss_read(dev->dvdcss, buffer, blocks, flags); +} + +/** + * close the DVD device and clean up the library. + */ +static int css_close(dvd_input_t dev) +{ + int ret; + + ret = DVDcss_close(dev->dvdcss); + + if(ret < 0) + return ret; + + free(dev); + + return 0; +} + +/* Need to use O_BINARY for WIN32 */ +#ifndef O_BINARY +#ifdef _O_BINARY +#define O_BINARY _O_BINARY +#else +#define O_BINARY 0 +#endif +#endif + +/** + * initialize and open a DVD device or file. + */ +static dvd_input_t file_open(const char *target) +{ + dvd_input_t dev; + char *use_odirect; + int oflags; + + oflags = O_RDONLY | O_BINARY; + use_odirect = getenv("DVDREAD_USE_DIRECT"); + if(use_odirect) { +#ifndef O_DIRECT +#define O_DIRECT 0 +#endif + oflags |= O_DIRECT; + } + /* Allocate the library structure */ + dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s)); + if(dev == NULL) { + return NULL; + } + + /* Open the device */ + dev->fd = open(target, oflags); + if(dev->fd < 0) { + free(dev); + return NULL; + } + + return dev; +} + +/** + * return the last error message + */ +static char *file_error(dvd_input_t dev) +{ + /* use strerror(errno)? */ + return (char *)"unknown error"; +} + +/** + * seek into the device. + */ +static int file_seek(dvd_input_t dev, int blocks) +{ + off_t pos = (off_t)blocks * (off_t)DVD_VIDEO_LB_LEN; + + pos = lseek(dev->fd, pos, SEEK_SET); + if(pos < 0) { + return pos; + } + /* assert pos % DVD_VIDEO_LB_LEN == 0 */ + return (int) (pos / DVD_VIDEO_LB_LEN); +} + +/** + * set the block for the begining of a new title (key). + */ +static int file_title(dvd_input_t dev, int block) +{ + return -1; +} + +/** + * read data from the device. + */ +static int file_read(dvd_input_t dev, void *buffer, int blocks, int flags) +{ + size_t len; + ssize_t ret; + unsigned char *buf = buffer; + + len = (size_t)blocks * DVD_VIDEO_LB_LEN; + + while(len > 0) { + + ret = read(dev->fd, buf, len); + + if(ret < 0) { + /* One of the reads failed, too bad. We won't even bother + * returning the reads that went ok, and as in the posix spec + * the file postition is left unspecified after a failure. */ + return ret; + } + + if(ret == 0) { + /* Nothing more to read. Return the whole blocks, if any, that we got. + and adjust the file possition back to the previous block boundary. */ + size_t bytes = (size_t)blocks * DVD_VIDEO_LB_LEN - len; + off_t over_read = -(bytes % DVD_VIDEO_LB_LEN); + /*off_t pos =*/ lseek(dev->fd, over_read, SEEK_CUR); + /* should have pos % 2048 == 0 */ + return (int) (bytes / DVD_VIDEO_LB_LEN); + } + + buf+=ret; + len -= ret; + } + + return blocks; +} + +/** + * close the DVD device and clean up. + */ +static int file_close(dvd_input_t dev) +{ + int ret; + + ret = close(dev->fd); + + if(ret < 0) + return ret; + + free(dev); + + return 0; +} + + +static void *dvdcss_library = NULL; +static int dvdcss_library_init = 0; + +/** + * Free any objects allocated by dvdinput_setup. + * Should only be called when libdvdread is not to be used any more. + * Closes dlopened libraries. + */ +void dvdinput_free(void) +{ +#ifdef HAVE_DVDCSS_DVDCSS_H + /* linked statically, nothing to free */ + return; +#else + if(dvdcss_library) { + dlclose(dvdcss_library); + dvdcss_library = NULL; + } + dvdcss_library_init = 0; + return; +#endif +} + + +/** + * Setup read functions with either libdvdcss or minimal DVD access. + */ +int dvdinput_setup(void) +{ + char **dvdcss_version = NULL; + int verbose; + + /* dlopening libdvdcss */ + if(dvdcss_library_init) { + /* libdvdcss is already dlopened, function ptrs set */ + if(dvdcss_library) { + return 1; /* css available */ + } else { + return 0; /* css not available */ + } + } + + verbose = get_verbose(); + +#ifdef HAVE_DVDCSS_DVDCSS_H + /* linking to libdvdcss */ + dvdcss_library = &dvdcss_library; /* Give it some value != NULL */ + /* the DVDcss_* functions have been #defined at the top */ + dvdcss_version = &dvdcss_interface_2; + +#else + + dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY); + + if(dvdcss_library != NULL) { +#if defined(__OpenBSD__) && !defined(__ELF__) +#define U_S "_" +#else +#define U_S +#endif + DVDcss_open = (dvdcss_handle (*)(const char*)) + dlsym(dvdcss_library, U_S "dvdcss_open"); + DVDcss_close = (int (*)(dvdcss_handle)) + dlsym(dvdcss_library, U_S "dvdcss_close"); + DVDcss_title = (int (*)(dvdcss_handle, int)) + dlsym(dvdcss_library, U_S "dvdcss_title"); + DVDcss_seek = (int (*)(dvdcss_handle, int, int)) + dlsym(dvdcss_library, U_S "dvdcss_seek"); + DVDcss_read = (int (*)(dvdcss_handle, void*, int, int)) + dlsym(dvdcss_library, U_S "dvdcss_read"); + DVDcss_error = (char* (*)(dvdcss_handle)) + dlsym(dvdcss_library, U_S "dvdcss_error"); + + dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2"); + + if(dlsym(dvdcss_library, U_S "dvdcss_crack")) { + if(verbose >= 0) { + fprintf(stderr, + "libdvdread: Old (pre-0.0.2) version of libdvdcss found.\n" + "libdvdread: You should get the latest version from " + "http://www.videolan.org/\n" ); + } + dlclose(dvdcss_library); + dvdcss_library = NULL; + } else if(!DVDcss_open || !DVDcss_close || !DVDcss_title || !DVDcss_seek + || !DVDcss_read || !DVDcss_error || !dvdcss_version) { + if(verbose >= 0) { + fprintf(stderr, "libdvdread: Missing symbols in libdvdcss.so.2, " + "this shouldn't happen !\n"); + } + dlclose(dvdcss_library); + dvdcss_library = NULL; + } + } +#endif /* HAVE_DVDCSS_DVDCSS_H */ + + dvdcss_library_init = 1; + + if(dvdcss_library) { + /* + char *psz_method = getenv( "DVDCSS_METHOD" ); + char *psz_verbose = getenv( "DVDCSS_VERBOSE" ); + fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method); + fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose); + */ + if(verbose >= 1) { + fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n", + *dvdcss_version); + } + /* libdvdcss wrapper functions */ + dvdinput_open = css_open; + dvdinput_close = css_close; + dvdinput_seek = css_seek; + dvdinput_title = css_title; + dvdinput_read = css_read; + dvdinput_error = css_error; + return 1; + + } else { + if(verbose >= 1) { + fprintf(stderr, "libdvdread: Encrypted DVD support unavailable.\n"); + } + /* libdvdcss replacement functions */ + dvdinput_open = file_open; + dvdinput_close = file_close; + dvdinput_seek = file_seek; + dvdinput_title = file_title; + dvdinput_read = file_read; + dvdinput_error = file_error; + return 0; + } +} diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_input.h k9copy-2.2.0/src/dvdreadnew/dvd_input.h --- k9copy-2.1.0/src/dvdreadnew/dvd_input.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_input.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,55 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef DVD_INPUT_H_INCLUDED +#define DVD_INPUT_H_INCLUDED + +/* + * Copyright (C) 2001, 2002 Samuel Hocevar , + * Hkan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + */ + +/** + * Defines and flags. Make sure they fit the libdvdcss API! + */ +#define DVDINPUT_NOFLAGS 0 + +#define DVDINPUT_READ_DECRYPT (1 << 0) + +typedef struct dvd_input_s *dvd_input_t; + +/** + * Pointers which will be filled either the input methods functions. + */ +extern dvd_input_t (*dvdinput_open) (const char *); +extern int (*dvdinput_close) (dvd_input_t); +extern int (*dvdinput_seek) (dvd_input_t, int); +extern int (*dvdinput_title) (dvd_input_t, int); +extern int (*dvdinput_read) (dvd_input_t, void *, int, int); +extern char * (*dvdinput_error) (dvd_input_t); + +/** + * Free any objects allocated by dvdinput_setup. + * Should only be called when libdvdread is not to be used any more. + * Closes dlopened libraries. + */ +void dvdinput_free(void); + +/** + * Setup function accessed by dvd_reader.c. Returns 1 if there is CSS support. + */ +int dvdinput_setup(void); + +#endif /* DVD_INPUT_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_reader.c k9copy-2.2.0/src/dvdreadnew/dvd_reader.c --- k9copy-2.1.0/src/dvdreadnew/dvd_reader.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_reader.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,1614 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + * Copyright (C) 2001, 2002, 2003 Billy Biggs , + * H�kan Hjort , + * Bj�rn Englund + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + */ + +#include "config.h" + +#include +#include +#include /* For the timing of dvdcss_title crack. */ +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DARWIN__) || defined(__DragonFly__) +#define SYS_BSD 1 +#endif + +#if defined(__sun) +#include +#elif defined(SYS_BSD) +#include +#elif defined(__linux__) +#include +#endif + +#include "dvd_reader.h" +#include "dvd_input.h" +#include "dvd_udf.h" +#include "md5.h" + +#include "dvdread_internal.h" + +#define DEFAULT_UDF_CACHE_LEVEL 1 + +struct dvd_reader_s { + /* Basic information. */ + int isImageFile; + + /* Hack for keeping track of the css status. + * 0: no css, 1: perhaps (need init of keys), 2: have done init */ + int css_state; + int css_title; /* Last title that we have called dvdinpute_title for. */ + + /* Information required for an image file. */ + dvd_input_t dev; + + /* Information required for a directory path drive. */ + char *path_root; + + /* Filesystem cache */ + int udfcache_level; /* 0 - turned off, 1 - on */ + void *udfcache; + + /* block aligned malloc */ + void *align; + + /* error message verbosity level */ + int verbose; +}; + +struct dvd_file_s { + /* Basic information. */ + dvd_reader_t *dvd; + + /* Hack for selecting the right css title. */ + int css_title; + + /* Information required for an image file. */ + uint32_t lb_start; + uint32_t seek_pos; + + /* Information required for a directory path drive. */ + size_t title_sizes[ 9 ]; + dvd_input_t title_devs[ 9 ]; + + /* Calculated at open-time, size in blocks. */ + ssize_t filesize; +}; + + +#define DVDREAD_VERBOSE_DEFAULT 0 + +int get_verbose(void) +{ + char *dvdread_verbose; + int verbose; + + dvdread_verbose = getenv("DVDREAD_VERBOSE"); + if(dvdread_verbose) { + verbose = (int)strtol(dvdread_verbose, NULL, 0); + } else { + verbose = DVDREAD_VERBOSE_DEFAULT; + } + return verbose; +} + +int dvdread_verbose(dvd_reader_t *dvd) +{ + return dvd->verbose; +} + +dvd_reader_t *device_of_file(dvd_file_t *file) +{ + return file->dvd; +} + +/** + * Returns the compiled version. (DVDREAD_VERSION as an int) + */ +int DVDVersion(void) +{ + return DVDREAD_VERSION; +} + + +/** + * Set the level of caching on udf + * level = 0 (no caching) + * level = 1 (caching filesystem info) + */ +int DVDUDFCacheLevel(dvd_reader_t *device, int level) +{ + struct dvd_reader_s *dev = (struct dvd_reader_s *)device; + + if(level > 0) { + level = 1; + } else if(level < 0) { + return dev->udfcache_level; + } + + dev->udfcache_level = level; + + return level; +} + +void *GetUDFCacheHandle(dvd_reader_t *device) +{ + struct dvd_reader_s *dev = (struct dvd_reader_s *)device; + + return dev->udfcache; +} + +void SetUDFCacheHandle(dvd_reader_t *device, void *cache) +{ + struct dvd_reader_s *dev = (struct dvd_reader_s *)device; + + dev->udfcache = cache; +} + +void *GetAlignHandle(dvd_reader_t *device) +{ + struct dvd_reader_s *dev = (struct dvd_reader_s *)device; + + return dev->align; +} + +void SetAlignHandle(dvd_reader_t *device, void *align) +{ + struct dvd_reader_s *dev = (struct dvd_reader_s *)device; + + dev->align = align; +} + +#ifdef WIN32 /* replacement gettimeofday implementation */ +#include +static int gettimeofday( struct timeval *tv, void *tz ) +{ + struct timeb t; + ftime( &t ); + tv->tv_sec = t.time; + tv->tv_usec = t.millitm * 1000; + return 0; +} +#endif + + +/* Loop over all titles and call dvdcss_title to crack the keys. */ +static int initAllCSSKeys( dvd_reader_t *dvd ) +{ + struct timeval all_s, all_e; + struct timeval t_s, t_e; + char filename[ MAX_UDF_FILE_NAME_LEN ]; + uint32_t start, len; + int title; + + char *nokeys_str = getenv("DVDREAD_NOKEYS"); + if(nokeys_str != NULL) + return 0; + + if(dvd->verbose >= 1) { + fprintf( stderr, "\n" ); + fprintf( stderr, "libdvdread: Attempting to retrieve all CSS keys\n" ); + fprintf( stderr, "libdvdread: This can take a _long_ time, " + "please be patient\n\n" ); + } + gettimeofday(&all_s, NULL); + + for( title = 0; title < 100; title++ ) { + gettimeofday( &t_s, NULL ); + if( title == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 ); + } + start = UDFFindFile( dvd, filename, &len ); + if( start != 0 && len != 0 ) { + /* Perform CSS key cracking for this title. */ + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", + filename, start ); + } + if( dvdinput_title( dvd->dev, (int)start ) < 0 ) { + if(dvd->verbose >= 0) { + fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)\n", filename, start); + } + } + gettimeofday( &t_e, NULL ); + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Elapsed time %ld\n", + (long int) t_e.tv_sec - t_s.tv_sec ); + } + } + + if( title == 0 ) continue; + + gettimeofday( &t_s, NULL ); + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 ); + start = UDFFindFile( dvd, filename, &len ); + if( start == 0 || len == 0 ) break; + + /* Perform CSS key cracking for this title. */ + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n", + filename, start ); + } + if( dvdinput_title( dvd->dev, (int)start ) < 0 ) { + if(dvd->verbose >= 0) { + fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)!!\n", filename, start); + } + } + gettimeofday( &t_e, NULL ); + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Elapsed time %ld\n", + (long int) t_e.tv_sec - t_s.tv_sec ); + } + } + title--; + + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Found %d VTS's\n", title ); + } + gettimeofday(&all_e, NULL); + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Elapsed time %ld\n", + (long int) all_e.tv_sec - all_s.tv_sec ); + } + return 0; +} + + + +/** + * Open a DVD image or block device file. + * Checks if the root directory in the udf image file can be found. + * If not it assumes this isn't a valid udf image and returns NULL + */ +static dvd_reader_t *DVDOpenImageFile( const char *location, int have_css ) +{ + dvd_reader_t *dvd; + dvd_input_t dev; + int verbose; + + verbose = get_verbose(); + + dev = dvdinput_open( location ); + if( !dev ) { + if(verbose >= 1) { + fprintf( stderr, "libdvdread: Can't open '%s' for reading: %s\n", + location, strerror(errno)); + } + return NULL; + } + + dvd = (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) ); + if( !dvd ) { + int tmp_errno = errno; + dvdinput_close(dev); + errno = tmp_errno; + return NULL; + } + dvd->verbose = verbose; + dvd->isImageFile = 1; + dvd->dev = dev; + dvd->path_root = NULL; + + dvd->udfcache_level = DEFAULT_UDF_CACHE_LEVEL; + dvd->udfcache = NULL; + + dvd->align = NULL; + + if( have_css ) { + /* Only if DVDCSS_METHOD = title, a bit if it's disc or if + * DVDCSS_METHOD = key but region missmatch. Unfortunaly we + * don't have that information. */ + + dvd->css_state = 1; /* Need key init. */ + } + dvd->css_title = 0; + + /* sanity check, is it a valid UDF image, can we find the root dir */ + if(!UDFFindFile(dvd, "/", NULL)) { + dvdinput_close(dvd->dev); + if(dvd->udfcache) { + FreeUDFCache(dvd, dvd->udfcache); + } + if(dvd->align) { + if(dvd->verbose >= 0) { + fprintf(stderr, "libdvdread: DVDOpenImageFile(): Memory leak in align functions 1\n"); + } + } + free(dvd); + return NULL; + } + return dvd; +} + +static dvd_reader_t *DVDOpenPath( const char *path_root ) +{ + dvd_reader_t *dvd; + + dvd = (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) ); + if( !dvd ) { + return NULL; + } + dvd->verbose = get_verbose(); + dvd->isImageFile = 0; + dvd->dev = 0; + dvd->path_root = strdup( path_root ); + if(!dvd->path_root) { + free(dvd); + return 0; + } + dvd->udfcache_level = DEFAULT_UDF_CACHE_LEVEL; + dvd->udfcache = NULL; + + dvd->align = NULL; + + dvd->css_state = 0; /* Only used in the UDF path */ + dvd->css_title = 0; /* Only matters in the UDF path */ + + return dvd; +} + +#if defined(__sun) +/* /dev/rdsk/c0t6d0s0 (link to /devices/...) + /vol/dev/rdsk/c0t6d0/?? + /vol/rdsk/ */ +static char *sun_block2char( const char *path ) +{ + char *new_path; + + /* Must contain "/dsk/" */ + if( !strstr( path, "/dsk/" ) ) return (char *) strdup( path ); + + /* Replace "/dsk/" with "/rdsk/" */ + new_path = malloc( strlen(path) + 2 ); + strcpy( new_path, path ); + strcpy( strstr( new_path, "/dsk/" ), "" ); + strcat( new_path, "/rdsk/" ); + strcat( new_path, strstr( path, "/dsk/" ) + strlen( "/dsk/" ) ); + + return new_path; +} +#endif + +#if defined(SYS_BSD) +/* FreeBSD /dev/(r)(a)cd0c (a is for atapi), recomended to _not_ use r + update: FreeBSD and DragonFly no longer uses the prefix so don't add it. + + OpenBSD /dev/rcd0c, it needs to be the raw device + NetBSD /dev/rcd0[d|c|..] d for x86, c (for non x86), perhaps others + Darwin /dev/rdisk0, it needs to be the raw device + BSD/OS /dev/sr0c (if not mounted) or /dev/rsr0c ('c' any letter will do) + + returns a string allocated with strdup which should be free()'d when + no longer used. +*/ +static char *bsd_block2char( const char *path ) +{ +#if defined(__FreeBSD__) || defined(__DragonFly__) + return (char *) strdup( path ); +#else + char *new_path; + + /* If it doesn't start with "/dev/" or does start with "/dev/r" exit */ + if( strncmp( path, "/dev/", 5 ) || !strncmp( path, "/dev/r", 6 ) ) + return (char *) strdup( path ); + + /* Replace "/dev/" with "/dev/r" */ + new_path = malloc( strlen(path) + 2 ); + strcpy( new_path, "/dev/r" ); + strcat( new_path, path + strlen( "/dev/" ) ); + + return new_path; +#endif /* __FreeBSD__ || __DragonFly__ */ +} +#endif + + +dvd_reader_t *DVDOpen( const char *path ) +{ + struct stat fileinfo; + int ret, have_css; + char *dev_name = NULL; + int internal_errno = 0; + int verbose; + + if( path == NULL ) { + errno = EINVAL; + return NULL; + } + + verbose = get_verbose(); + +#ifdef WIN32 + /* Stat doesn't work on devices under mingwin/cygwin. */ + if( path[0] && path[1] == ':' && path[2] == '\0' ) + { + /* Don't try to stat the file */ + fileinfo.st_mode = S_IFBLK; + } + else +#endif + { + ret = stat( path, &fileinfo ); + if( ret < 0 && errno !=EOVERFLOW) { + int tmp_errno = errno; + /* If we can't stat the file, give up */ + if(verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat '%s': %s\n", + path, strerror(errno)); + } + errno = tmp_errno; + return NULL; + } + } + + /* Try to open libdvdcss or fall back to standard functions */ + have_css = dvdinput_setup(); + + /* First check if this is a block/char device or a file*/ + if( S_ISBLK( fileinfo.st_mode ) || + S_ISCHR( fileinfo.st_mode ) || + S_ISREG( fileinfo.st_mode ) ) { + /** + * Block devices and regular files are assumed to be DVD-Video images. + */ + dvd_reader_t *dvd = NULL; +#if defined(__sun) + dev_name = sun_block2char( path ); +#elif defined(SYS_BSD) + dev_name = bsd_block2char( path ); +#else + dev_name = strdup( path ); +#endif + dvd = DVDOpenImageFile( dev_name, have_css ); + free( dev_name ); + + return dvd; + } else if( S_ISDIR( fileinfo.st_mode ) ) { + dvd_reader_t *auth_drive = 0; + char *path_copy; +#if defined(SYS_BSD) + struct fstab* fe; +#elif defined(__sun) || defined(__linux__) + FILE *mntfile; +#endif + + /* XXX: We should scream real loud here. */ + if( !(path_copy = strdup( path ) ) ) return 0; + +#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */ + /* Resolve any symlinks and get the absolut dir name. */ + { + char *new_path; + char *current_path; + + current_path = malloc(PATH_MAX); + if(current_path) { + if(!getcwd(current_path, PATH_MAX)) { + free(current_path); + current_path = NULL; + } + } + if(current_path) { + chdir( path_copy ); + new_path = malloc(PATH_MAX); + if(new_path) { + if(!getcwd(new_path, PATH_MAX )) { + free(new_path); + new_path = NULL; + } + } + + chdir(current_path); + free(current_path); + if( new_path ) { + free( path_copy ); + path_copy = new_path; + } + } + } +#endif + + /** + * If we're being asked to open a directory, check if that directory + * is the mountpoint for a DVD-ROM which we can use instead. + */ + + if( strlen( path_copy ) > 1 ) { + if( path_copy[ strlen( path_copy ) - 1 ] == '/' ) { + path_copy[ strlen( path_copy ) - 1 ] = '\0'; + } + } + + if( strlen( path_copy ) >= 9 ) { + if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]), + "/video_ts" ) ) { + path_copy[ strlen( path_copy ) - 9 ] = '\0'; + if(path_copy[0] == '\0') { + path_copy[0] = '/'; + path_copy[1] = '\0'; + } + } + } + +#if defined(SYS_BSD) + if( ( fe = getfsfile( path_copy ) ) ) { + dev_name = bsd_block2char( fe->fs_spec ); + if(verbose >= 1) { + fprintf( stderr, + "libdvdread: Attempting to use device %s" + " mounted on %s%s\n", + dev_name, + fe->fs_file, + have_css ? " for CSS authentication" : ""); + } + auth_drive = DVDOpenImageFile( dev_name, have_css ); + if(!auth_drive) { + internal_errno = errno; + } + } +#elif defined(__sun) + mntfile = fopen( MNTTAB, "r" ); + if( mntfile ) { + struct mnttab mp; + int res; + + while( ( res = getmntent( mntfile, &mp ) ) != -1 ) { + if( res == 0 && !strcmp( mp.mnt_mountp, path_copy ) ) { + dev_name = sun_block2char( mp.mnt_special ); + if(verbose >= 1) { + fprintf( stderr, + "libdvdread: Attempting to use device %s" + " mounted on %s%s\n", + dev_name, + mp.mnt_mountp, + have_css ? " for CSS authentication" : ""); + } + auth_drive = DVDOpenImageFile( dev_name, have_css ); + if(!auth_drive) { + internal_errno = errno; + } + break; + } + } + fclose( mntfile ); + } +#elif defined(__linux__) + mntfile = fopen( MOUNTED, "r" ); + if( mntfile ) { + struct mntent *me; + + while( ( me = getmntent( mntfile ) ) ) { + if( !strcmp( me->mnt_dir, path_copy ) ) { + if(verbose >= 1) { + fprintf( stderr, + "libdvdread: Attempting to use device %s" + " mounted on %s%s\n", + me->mnt_fsname, + me->mnt_dir, + have_css ? " for CSS authentication" : ""); + } + auth_drive = DVDOpenImageFile( me->mnt_fsname, have_css ); + if(!auth_drive) { + internal_errno = errno; + } + dev_name = strdup(me->mnt_fsname); + break; + } + } + fclose( mntfile ); + } +#endif + if( !dev_name ) { + if(verbose >= 1) { + fprintf( stderr, "libdvdread: Couldn't find device name.\n" ); + } + } else if( !auth_drive ) { + if(verbose >= 1) { + fprintf( stderr, "libdvdread: Device %s inaccessible%s: %s\n", + dev_name, + have_css ? ", CSS authentication not available" : "", + strerror(internal_errno)); + } + } + + free( dev_name ); + free( path_copy ); + + /** + * If we've opened a drive, just use that. + */ + if( auth_drive ) { + return auth_drive; + } + /** + * Otherwise, we now try to open the directory tree instead. + */ + return DVDOpenPath( path ); + } + + /* If it's none of the above, screw it. */ + if(verbose >= 1) { + fprintf( stderr, "libdvdread: Could not open %s\n", path ); + } + return 0; +} + +void DVDClose( dvd_reader_t *dvd ) +{ + if( dvd ) { + if( dvd->dev ) dvdinput_close( dvd->dev ); + if( dvd->path_root ) free( dvd->path_root ); + if( dvd->udfcache ) FreeUDFCache( dvd, dvd->udfcache ); + if(dvd->align) { + if(dvd->verbose >= 0) { + fprintf(stderr, "libdvdread: DVDClose(): Memory leak in align functions\n"); + } + } + + free( dvd ); + } +} + +void DVDInit(void) +{ + dvdinput_setup(); +} + +void DVDFinish(void) +{ + dvdinput_free(); +} + +/** + * Open an unencrypted file on a DVD image file. + */ +static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename ) +{ + uint32_t start, len; + dvd_file_t *dvd_file; + + start = UDFFindFile( dvd, filename, &len ); + if( !start ) return 0; + + dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); + if( !dvd_file ) return 0; + dvd_file->dvd = dvd; + dvd_file->lb_start = start; + dvd_file->seek_pos = 0; + memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) ); + memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); + dvd_file->filesize = len / DVD_VIDEO_LB_LEN; + + return dvd_file; +} + +/** + * Searches for in directory , ignoring case. + * Returns 0 and full filename in . + * or -1 on file not found. + * or -2 on path not found. + */ +static int findDirFile( const char *path, const char *file, char *filename ) +{ + DIR *dir; + struct dirent *ent; + + dir = opendir( path ); + if( !dir ) return -2; + + while( ( ent = readdir( dir ) ) != NULL ) { + if( !strcasecmp( ent->d_name, file ) ) { + sprintf( filename, "%s%s%s", path, + ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ), + ent->d_name ); + closedir(dir); + return 0; + } + } + closedir(dir); + return -1; +} + +static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filename ) +{ + char video_path[ PATH_MAX + 1 ]; + const char *nodirfile; + int ret; + + /* Strip off the directory for our search */ + if( !strncasecmp( "/VIDEO_TS/", file, 10 ) ) { + nodirfile = &(file[ 10 ]); + } else { + nodirfile = file; + } + + ret = findDirFile( dvd->path_root, nodirfile, filename ); + if( ret < 0 ) { + /* Try also with adding the path, just in case. */ + sprintf( video_path, "%s/VIDEO_TS/", dvd->path_root ); + ret = findDirFile( video_path, nodirfile, filename ); + if( ret < 0 ) { + /* Try with the path, but in lower case. */ + sprintf( video_path, "%s/video_ts/", dvd->path_root ); + ret = findDirFile( video_path, nodirfile, filename ); + if( ret < 0 ) { + return 0; + } + } + } + + return 1; +} + +/** + * Open an unencrypted file from a DVD directory tree. + */ +static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename ) +{ + char full_path[ PATH_MAX + 1 ]; + dvd_file_t *dvd_file; + struct stat fileinfo; + dvd_input_t dev; + + /* Get the full path of the file. */ + if( !findDVDFile( dvd, filename, full_path ) ) return 0; + + dev = dvdinput_open( full_path ); + if( !dev ) return 0; + + dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); + if( !dvd_file ) return 0; + dvd_file->dvd = dvd; + dvd_file->lb_start = 0; + dvd_file->seek_pos = 0; + memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) ); + memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); + dvd_file->filesize = 0; + + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + free( dvd_file ); + return 0; + } + dvd_file->title_sizes[ 0 ] = fileinfo.st_size / DVD_VIDEO_LB_LEN; + dvd_file->title_devs[ 0 ] = dev; + dvd_file->filesize = dvd_file->title_sizes[ 0 ]; + + return dvd_file; +} + +static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *dvd, int title, int menu ) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + uint32_t start, len; + dvd_file_t *dvd_file; + + if( title == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); + } + start = UDFFindFile( dvd, filename, &len ); + if( start == 0 ) return 0; + + dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); + if( !dvd_file ) return 0; + dvd_file->dvd = dvd; + /*Hack*/ dvd_file->css_title = title << 1 | menu; + dvd_file->lb_start = start; + dvd_file->seek_pos = 0; + memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) ); + memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); + dvd_file->filesize = len / DVD_VIDEO_LB_LEN; + + /* Calculate the complete file size for every file in the VOBS */ + if( !menu ) { + int cur; + + for( cur = 2; cur < 10; cur++ ) { + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur ); + if( !UDFFindFile( dvd, filename, &len ) ) break; + dvd_file->filesize += len / DVD_VIDEO_LB_LEN; + } + } + + if( dvd->css_state == 1 /* Need key init */ ) { + initAllCSSKeys( dvd ); + dvd->css_state = 2; + } + /* + if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) { + fprintf( stderr, "libdvdread: Error cracking CSS key for %s\n", + filename ); + } + */ + + return dvd_file; +} + +static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu ) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + char full_path[ PATH_MAX + 1 ]; + struct stat fileinfo; + dvd_file_t *dvd_file; + int i; + + dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); + if( !dvd_file ) return 0; + dvd_file->dvd = dvd; + /*Hack*/ dvd_file->css_title = title << 1 | menu; + dvd_file->lb_start = 0; + dvd_file->seek_pos = 0; + memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) ); + memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); + dvd_file->filesize = 0; + + if( menu ) { + dvd_input_t dev; + + if( title == 0 ) { + sprintf( filename, "VIDEO_TS.VOB" ); + } else { + sprintf( filename, "VTS_%02i_0.VOB", title ); + } + if( !findDVDFile( dvd, filename, full_path ) ) { + free( dvd_file ); + return 0; + } + + dev = dvdinput_open( full_path ); + if( dev == NULL ) { + free( dvd_file ); + return 0; + } + + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + free( dvd_file ); + return 0; + } + dvd_file->title_sizes[ 0 ] = fileinfo.st_size / DVD_VIDEO_LB_LEN; + dvd_file->title_devs[ 0 ] = dev; + dvdinput_title( dvd_file->title_devs[0], 0); + dvd_file->filesize = dvd_file->title_sizes[ 0 ]; + + } else { + for( i = 0; i < 9; ++i ) { + + sprintf( filename, "VTS_%02i_%i.VOB", title, i + 1 ); + if( !findDVDFile( dvd, filename, full_path ) ) { + break; + } + + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + break; + } + + dvd_file->title_sizes[ i ] = fileinfo.st_size / DVD_VIDEO_LB_LEN; + dvd_file->title_devs[ i ] = dvdinput_open( full_path ); + dvdinput_title( dvd_file->title_devs[ i ], 0 ); + dvd_file->filesize += dvd_file->title_sizes[ i ]; + } + if( !dvd_file->title_devs[ 0 ] ) { + free( dvd_file ); + return 0; + } + } + + return dvd_file; +} + +dvd_file_t *DVDOpenFile( dvd_reader_t *dvd, int titlenum, + dvd_read_domain_t domain ) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + + /* Check arguments. */ + if( dvd == NULL || titlenum < 0 ) { + errno = EINVAL; + return NULL; + } + + switch( domain ) { + case DVD_READ_INFO_FILE: + if( titlenum == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum ); + } + break; + case DVD_READ_INFO_BACKUP_FILE: + if( titlenum == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum ); + } + break; + case DVD_READ_MENU_VOBS: + if( dvd->isImageFile ) { + return DVDOpenVOBUDF( dvd, titlenum, 1 ); + } else { + return DVDOpenVOBPath( dvd, titlenum, 1 ); + } + break; + case DVD_READ_TITLE_VOBS: + if( titlenum == 0 ) return 0; + if( dvd->isImageFile ) { + return DVDOpenVOBUDF( dvd, titlenum, 0 ); + } else { + return DVDOpenVOBPath( dvd, titlenum, 0 ); + } + break; + default: + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Invalid domain for file open.\n" ); + } + errno = EINVAL; + return NULL; + } + + if( dvd->isImageFile ) { + return DVDOpenFileUDF( dvd, filename ); + } else { + return DVDOpenFilePath( dvd, filename ); + } +} + +void DVDCloseFile( dvd_file_t *dvd_file ) +{ + int i; + + if( dvd_file ) { + if( dvd_file->dvd->isImageFile ) { + ; + } else { + for( i = 0; i < 9; ++i ) { + if( dvd_file->title_devs[ i ] ) { + dvdinput_close( dvd_file->title_devs[i] ); + } + } + } + + free( dvd_file ); + dvd_file = 0; + } +} + +static int DVDFileStatVOBUDF(dvd_reader_t *dvd, int title, + int menu, dvd_stat_t *statbuf) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + uint32_t size; + off_t tot_size; + off_t parts_size[9]; + int nr_parts = 0; + int n; + + if( title == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); + } + if(!UDFFindFile( dvd, filename, &size )) { + return -1; + } + tot_size = size; + nr_parts = 1; + parts_size[0] = size; + + if( !menu ) { + int cur; + + for( cur = 2; cur < 10; cur++ ) { + sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur ); + if( !UDFFindFile( dvd, filename, &size ) ) { + break; + } + parts_size[nr_parts] = size; + tot_size += size; + nr_parts++; + } + } + + statbuf->size = tot_size; + statbuf->nr_parts = nr_parts; + for(n = 0; n < nr_parts; n++) { + statbuf->parts_size[n] = parts_size[n]; + } + return 0; +} + + +static int DVDFileStatVOBPath( dvd_reader_t *dvd, int title, + int menu, dvd_stat_t *statbuf ) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + char full_path[ PATH_MAX + 1 ]; + struct stat fileinfo; + off_t tot_size; + off_t parts_size[9]; + int nr_parts = 0; + int n; + + + + if( title == 0 ) { + sprintf( filename, "VIDEO_TS.VOB" ); + } else { + sprintf( filename, "VTS_%02d_%d.VOB", title, menu ? 0 : 1 ); + } + if( !findDVDFile( dvd, filename, full_path ) ) { + return -1; + } + + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + return -1; + } + + + tot_size = fileinfo.st_size; + nr_parts = 1; + parts_size[0] = fileinfo.st_size; + + if( !menu ) { + int cur; + + for( cur = 2; cur < 10; cur++ ) { + + sprintf( filename, "VTS_%02d_%d.VOB", title, cur ); + if( !findDVDFile( dvd, filename, full_path ) ) { + break; + } + + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + break; + } + + parts_size[nr_parts] = fileinfo.st_size; + tot_size += parts_size[nr_parts]; + nr_parts++; + } + } + + statbuf->size = tot_size; + statbuf->nr_parts = nr_parts; + for(n = 0; n < nr_parts; n++) { + statbuf->parts_size[n] = parts_size[n]; + } + return 0; +} + + +int DVDFileStat(dvd_reader_t *dvd, int titlenum, + dvd_read_domain_t domain, dvd_stat_t *statbuf) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + char full_path[ PATH_MAX + 1 ]; + struct stat fileinfo; + uint32_t size; + + /* Check arguments. */ + if( dvd == NULL || titlenum < 0 ) { + errno = EINVAL; + return -1; + } + + switch( domain ) { + case DVD_READ_INFO_FILE: + if( titlenum == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum ); + } + break; + case DVD_READ_INFO_BACKUP_FILE: + if( titlenum == 0 ) { + sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" ); + } else { + sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum ); + } + break; + case DVD_READ_MENU_VOBS: + if( dvd->isImageFile ) { + return DVDFileStatVOBUDF( dvd, titlenum, 1, statbuf ); + } else { + return DVDFileStatVOBPath( dvd, titlenum, 1, statbuf ); + } + break; + case DVD_READ_TITLE_VOBS: + if( titlenum == 0 ) { + return -1; + } + if( dvd->isImageFile ) { + return DVDFileStatVOBUDF( dvd, titlenum, 0, statbuf ); + } else { + return DVDFileStatVOBPath( dvd, titlenum, 0, statbuf ); + } + break; + default: + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Invalid domain for file stat.\n" ); + } + errno = EINVAL; + return -1; + } + + if( dvd->isImageFile ) { + if( UDFFindFile( dvd, filename, &size ) ) { + statbuf->size = size; + statbuf->nr_parts = 1; + statbuf->parts_size[0] = size; + return 0; + } + } else { + if( findDVDFile( dvd, filename, full_path ) ) { + if( stat( full_path, &fileinfo ) < 0 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename ); + } + } else { + statbuf->size = fileinfo.st_size; + statbuf->nr_parts = 1; + statbuf->parts_size[0] = statbuf->size; + return 0; + } + } + } + return -1; +} + +/** + * Internal, but used from dvd_udf.c + * + * @param device A read handle. + * @param lb_number Logical block number to start read from. + * @param block_count Number of logical blocks to read. + * @param data Pointer to buffer where read data should be stored. + * This buffer must be large enough to hold lb_number*2048 bytes. + * The pointer must be aligned to the logical block size when + * reading from a raw/O_DIRECT device. + * @param encrypted 0 if no decryption shall be performed, + * 1 if decryption shall be performed + * @param return Returns number of blocks read on success, negative on error + */ +int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number, + size_t block_count, unsigned char *data, + int encrypted ) +{ + int ret; + + if( !device->dev ) { + if(device->verbose >= 1) { + fprintf( stderr, "libdvdread: Fatal error in block read.\n" ); + } + return 0; + } + + ret = dvdinput_seek( device->dev, (int) lb_number ); + if( ret != (int) lb_number ) { + if(device->verbose >= 1) { + fprintf( stderr, + "libdvdread: UDFReadBlocksRaw: Can't seek to block %u\n", + lb_number ); + } + return 0; + } + + return dvdinput_read( device->dev, (char *) data, + (int) block_count, encrypted ); +} + +/** + * This is using a single input and starting from 'dvd_file->lb_start' offset. + * + * Reads 'block_count' blocks from 'dvd_file' at block offset 'offset' + * into the buffer located at 'data' and if 'encrypted' is set + * descramble the data if it's encrypted. Returning either an + * negative error or the number of blocks read. + * + * @param data Pointer to buffer where read data should be placed. + * This buffer must be large enough to hold block_count*2048 bytes. + * The pointer must be aligned to 2048 bytes when reading from + * a raw/O_DIRECT device. + * @return Returns the number of blocks read on success or a negative error. + */ +static int DVDReadBlocksUDF( dvd_file_t *dvd_file, uint32_t offset, + size_t block_count, unsigned char *data, + int encrypted ) +{ + return UDFReadBlocksRaw( dvd_file->dvd, dvd_file->lb_start + offset, + block_count, data, encrypted ); +} + +/** + * This is using possibly several inputs and starting from an offset of '0'. + * data must be aligned to logical block size (2048 bytes) of the device + * for raw/O_DIRECT devices to work + * Reads 'block_count' blocks from 'dvd_file' at block offset 'offset' + * into the buffer located at 'data' and if 'encrypted' is set + * descramble the data if it's encrypted. Returning either an + * negative error or the number of blocks read. + * + * @param dvd_file A file read handle. + * @param offset Block offset from start of file. + * @return Returns number of blocks read on success, negative on error. + */ +static int DVDReadBlocksPath( dvd_file_t *dvd_file, unsigned int offset, + size_t block_count, unsigned char *data, + int encrypted ) +{ + int i; + int ret, ret2, off; + + ret = 0; + ret2 = 0; + for( i = 0; i < 9; ++i ) { + if( !dvd_file->title_sizes[ i ] ) return 0; /* Past end of file */ + + if( offset < dvd_file->title_sizes[ i ] ) { + if( ( offset + block_count ) <= dvd_file->title_sizes[ i ] ) { + off = dvdinput_seek( dvd_file->title_devs[ i ], (int)offset ); + if( off < 0 || off != (int)offset ) { + if(dvd_file->dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: DVDReadBlocksPath1: Can't seek to block %d\n", + offset ); + } + return off < 0 ? off : 0; + } + ret = dvdinput_read( dvd_file->title_devs[ i ], data, + (int)block_count, encrypted ); + break; + } else { + size_t part1_size = dvd_file->title_sizes[ i ] - offset; + /* FIXME: Really needs to be a while loop. + * (This is only true if you try and read >1GB at a time) */ + + /* Read part 1 */ + off = dvdinput_seek( dvd_file->title_devs[ i ], (int)offset ); + if( off < 0 || off != (int)offset ) { + if(dvd_file->dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: DVDReadBlocksPath2: Can't seek to block %d\n", + offset ); + } + return off < 0 ? off : 0; + } + ret = dvdinput_read( dvd_file->title_devs[ i ], data, + (int)part1_size, encrypted ); + if( ret < 0 ) return ret; + /* FIXME: This is wrong if i is the last file in the set. + * also error from this read will not show in ret. */ + + /* Does the next part exist? If not then return now. */ + if( !dvd_file->title_devs[ i + 1 ] ) return ret; + + /* Read part 2 */ + off = dvdinput_seek( dvd_file->title_devs[ i + 1 ], 0 ); + if( off < 0 || off != 0 ) { + if(dvd_file->dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: DVDReadBlocksPath3: Can't seek to block %d\n", 0 ); + } + return off < 0 ? off : 0; + } + ret2 = dvdinput_read( dvd_file->title_devs[ i + 1 ], + data + ( part1_size + * (int64_t)DVD_VIDEO_LB_LEN ), + (int)(block_count - part1_size), + encrypted ); + if( ret2 < 0 ) return ret2; + break; + } + } else { + offset -= dvd_file->title_sizes[ i ]; + } + } + + return ret + ret2; +} + +/** + * This is broken reading more than 2Gb at a time if ssize_t is 32-bit. + */ +ssize_t DVDReadBlocks( dvd_file_t *dvd_file, int offset, + size_t block_count, unsigned char *data ) +{ + int ret; + + /* Check arguments. */ + if( dvd_file == NULL || offset < 0 || data == NULL ) + return -1; + + /* Hack, and it will still fail for multiple opens in a threaded app ! */ + if( dvd_file->dvd->css_title != dvd_file->css_title ) { + dvd_file->dvd->css_title = dvd_file->css_title; + if( dvd_file->dvd->isImageFile ) { + dvdinput_title( dvd_file->dvd->dev, (int)dvd_file->lb_start ); + } + /* Here each vobu has it's own dvdcss handle, so no need to update + else { + dvdinput_title( dvd_file->title_devs[ 0 ], (int)dvd_file->lb_start ); + }*/ + } + + if( dvd_file->dvd->isImageFile ) { + ret = DVDReadBlocksUDF( dvd_file, (uint32_t)offset, + block_count, data, DVDINPUT_READ_DECRYPT ); + } else { + ret = DVDReadBlocksPath( dvd_file, (unsigned int)offset, + block_count, data, DVDINPUT_READ_DECRYPT ); + } + + return (ssize_t)ret; +} + +int DVDFileSeek( dvd_file_t *dvd_file, int offset ) +{ + /* Check arguments. */ + if( dvd_file == NULL || offset < 0 ) + return -1; + + if( offset > dvd_file->filesize * DVD_VIDEO_LB_LEN ) { + return -1; + } + dvd_file->seek_pos = (uint32_t) offset; + return offset; +} + +#ifndef HAVE_UINTPTR_T +#warning "Assuming that (unsigned long) can hold (void *)" +/*typedef unsigned long uintptr_t;*/ +#endif + +#define DVD_ALIGN(ptr) (void *)((((uintptr_t)(ptr)) + (DVD_VIDEO_LB_LEN-1)) \ + / DVD_VIDEO_LB_LEN * DVD_VIDEO_LB_LEN) + +ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size ) +{ + unsigned char *secbuf_start; + unsigned char *secbuf; /*must be aligned to 2048-bytes for raw/O_DIRECT*/ + unsigned int numsec, seek_sector, seek_byte; + int ret; + + /* Check arguments. */ + if( dvd_file == NULL || data == NULL ) { + errno = EINVAL; + return -1; + } + seek_sector = dvd_file->seek_pos / DVD_VIDEO_LB_LEN; + seek_byte = dvd_file->seek_pos % DVD_VIDEO_LB_LEN; + + numsec = ( ( seek_byte + byte_size ) / DVD_VIDEO_LB_LEN ) + + ( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 ); + + /* must align to 2048 bytes if we are reading from raw/O_DIRECT */ + secbuf_start = (unsigned char *) malloc( (numsec+1) * DVD_VIDEO_LB_LEN ); + if( !secbuf_start ) { + /* errno will be set to ENOMEM by malloc */ + return -1; + } + + secbuf = DVD_ALIGN(secbuf_start); + + if( dvd_file->dvd->isImageFile ) { + ret = DVDReadBlocksUDF( dvd_file, (uint32_t) seek_sector, + (size_t) numsec, secbuf, DVDINPUT_NOFLAGS ); + } else { + ret = DVDReadBlocksPath( dvd_file, seek_sector, + (size_t) numsec, secbuf, DVDINPUT_NOFLAGS ); + } + + if( ret != (int) numsec ) { + free( secbuf_start ); + return ret < 0 ? ret : 0; + } + + memcpy( data, &(secbuf[ seek_byte ]), byte_size ); + free( secbuf_start ); + + dvd_file->seek_pos += byte_size; + return byte_size; +} + +ssize_t DVDFileSize( dvd_file_t *dvd_file ) +{ + /* Check arguments. */ + if( dvd_file == NULL ) + return -1; + + return dvd_file->filesize; +} + +int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid ) +{ + struct md5_ctx ctx; + int title; + int nr_of_files = 0; + int tmp_errno; + int nofiles_errno = ENOENT; + /* Check arguments. */ + if( dvd == NULL || discid == NULL ) { + errno = EINVAL; + return -1; + } + /* Go through the first 10 IFO:s, in order, + * and md5sum them, i.e VIDEO_TS.IFO and VTS_0?_0.IFO */ + md5_init_ctx( &ctx ); + for( title = 0; title < 10; title++ ) { + dvd_file_t *dvd_file = DVDOpenFile( dvd, title, DVD_READ_INFO_FILE ); + if( dvd_file != NULL ) { + ssize_t bytes_read; + size_t file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN; + char *buffer = malloc( file_size ); + + nr_of_files++; + + if( buffer == NULL ) { + /* errno will be set to ENOMEM by malloc */ + return -1; + } + + bytes_read = DVDReadBytes( dvd_file, buffer, file_size ); + if( bytes_read != file_size ) { + tmp_errno = errno; + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes" + ", wanted %d\n", (int)bytes_read, (int)file_size ); + } + free(buffer); + DVDCloseFile( dvd_file ); + errno = tmp_errno; + return -1; + } + + md5_process_bytes( buffer, file_size, &ctx ); + + DVDCloseFile( dvd_file ); + free( buffer ); + } else { + if(errno != ENOENT) { + nofiles_errno = errno; + } + } + } + md5_finish_ctx( &ctx, discid ); + if(nr_of_files == 0) { + errno = nofiles_errno; + return -1; + } + return 0; +} + + +int DVDISOVolumeInfo( dvd_reader_t *dvd, + char *volid, unsigned int volid_size, + unsigned char *volsetid, unsigned int volsetid_size ) +{ + unsigned char *buffer; /* must be aligned to 2048 for raw/O_DIRECT */ + unsigned char *buffer_start; + int ret; + + /* Check arguments. */ + if( dvd == NULL ) { + errno = EINVAL; + return -1; + } + + if( dvd->dev == NULL ) { + /* No block access, so no ISO... */ + errno = EINVAL; + return -1; + } + + buffer_start = malloc( 2 * DVD_VIDEO_LB_LEN ); + if( buffer_start == NULL ) { + return -1; + } + + buffer = DVD_ALIGN(buffer_start); + + ret = UDFReadBlocksRaw( dvd, 16, 1, buffer, 0 ); + if( ret != 1 ) { + if(dvd->verbose >= 1) { + fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to " + "read ISO9660 Primary Volume Descriptor!\n" ); + } + free(buffer_start); + return -1; + } + + if( (volid != NULL) && (volid_size > 0) ) { + unsigned int n; + for(n = 0; n < 32; n++) { + if(buffer[40+n] == 0x20) { + break; + } + } + + if(volid_size > n+1) { + volid_size = n+1; + } + + memcpy(volid, &buffer[40], volid_size-1); + volid[volid_size-1] = '\0'; + } + + if( (volsetid != NULL) && (volsetid_size > 0) ) { + if(volsetid_size > 128) { + volsetid_size = 128; + } + memcpy(volsetid, &buffer[190], volsetid_size); + } + free(buffer_start); + + return 0; +} + + +int DVDUDFVolumeInfo( dvd_reader_t *dvd, + char *volid, unsigned int volid_size, + unsigned char *volsetid, unsigned int volsetid_size ) +{ + int ret; + /* Check arguments. */ + if( dvd == NULL ) + return -1; + + if( dvd->dev == NULL ) { + /* No block access, so no UDF VolumeSet Identifier */ + return -1; + } + + if( (volid != NULL) && (volid_size > 0) ) { + ret = UDFGetVolumeIdentifier(dvd, volid, volid_size); + if(!ret) { + return -1; + } + } + if( (volsetid != NULL) && (volsetid_size > 0) ) { + ret = UDFGetVolumeSetIdentifier(dvd, volsetid, volsetid_size); + if(!ret) { + return -1; + } + } + + return 0; +} diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_reader.h k9copy-2.2.0/src/dvdreadnew/dvd_reader.h --- k9copy-2.1.0/src/dvdreadnew/dvd_reader.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_reader.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,344 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef DVD_READER_H_INCLUDED +#define DVD_READER_H_INCLUDED + +/* + * Copyright (C) 2001, 2002 Billy Biggs , + * Hkan Hjort , + * Bjrn Englund + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +/** + * The DVD access interface. + * + * This file contains the functions that form the interface to to + * reading files located on a DVD. + */ + +/** + * The current version. (0.9.4 => 904, 1.2.3 => 10203) + */ +#define DVDREAD_VERSION 907 + + +/** + * The length of one Logical Block of a DVD. + */ +#define DVD_VIDEO_LB_LEN 2048 + +/** + * Maximum length of filenames allowed in UDF. + */ +#define MAX_UDF_FILE_NAME_LEN 2048 + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Opaque type that is used as a handle for one instance of an opened DVD. + */ +typedef struct dvd_reader_s dvd_reader_t; + +/** + * Opaque type for a file read handle, much like a normal fd or FILE *. + */ +typedef struct dvd_file_s dvd_file_t; + +/** + * Returns the compiled version. (DVDREAD_VERSION as an int) + */ +int DVDVersion(void); + + +/** + * Opens a block device of a DVD-ROM file, or an image file, or a directory + * name for a mounted DVD or HD copy of a DVD. + * + * If the given file is a block device, or is the mountpoint for a block + * device, then that device is used for CSS authentication using libdvdcss. + * If no device is available, then no CSS authentication is performed, + * and we hope that the image is decrypted. + * + * If the path given is a directory, then the files in that directory may be + * in any one of these formats: + * + * path/VIDEO_TS/VTS_01_1.VOB + * path/video_ts/vts_01_1.vob + * path/VTS_01_1.VOB + * path/vts_01_1.vob + * + * @param path Specifies the the device, file or directory to be used. + * @return If successful a a read handle is returned. Otherwise 0 is returned. + * + * dvd = DVDOpen(path); + * + * Threads: this function uses chdir() and getcwd(). + * The current working directory is global to all threads, + * so using chdir/getcwd in another thread could give unexpected results. + */ +dvd_reader_t *DVDOpen( const char * ); + +/** + * Closes and cleans up the DVD reader object. + * + * You must close all open files before calling this function. + * + * @param dvd A read handle that should be closed. + * + * DVDClose(dvd); + */ +void DVDClose( dvd_reader_t * ); + +/** + * Initializes libdvdread to be used with multithreading apps. + * + * You must call this function before using any other functions of libdvdread + * if you are going to use libdvdread in multiple threads in your program. + * If you are not using threads, or using libdvdread from just one thread, + * you do not need to call this, but you are allowed to do so anyway. + * + * There are several restrictions on how you can use libdvdread in + * multithreading apps, see further documentation. + * + * If you have called DVDFinish() you need to call DVDInit again to use + * libdvdread in multiple threads. + * + * DVDInit(void); + */ +void DVDInit(void); + +/** + * frees any dlopened objects. + * + * You must DVDClose all handles opened with DVDOpen before calling this. + * Use this function if you need to close the dlopened libs and any other + * objects that have been dynamically allocated by libdvdread. + * + * DVDFinish(void); + */ +void DVDFinish(void); + +/** + * + */ +typedef enum { + DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) */ + DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) */ + DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) */ + DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files in + the title set are opened and read as a + single file. */ +} dvd_read_domain_t; + +/** + * + */ +typedef struct { + off_t size; /**< Total size of file in bytes */ + int nr_parts; /**< Number of file parts */ + off_t parts_size[9]; /**< Size of each part in bytes */ +} dvd_stat_t; + +/** + * Stats a file on the DVD given the title number and domain. + * The information about the file is stored in a dvd_stat_t + * which contains information about the size of the file and + * the number of parts in case of a multipart file and the respective + * sizes of the parts. + * A multipart file is for instance VTS_02_1.VOB, VTS_02_2.VOB, VTS_02_3.VOB + * The size of VTS_02_1.VOB will be stored in stat->parts_size[0], + * VTS_02_2.VOB in stat->parts_size[1], ... + * The total size (sum of all parts) is stored in stat->size and + * stat->nr_parts will hold the number of parts. + * Only DVD_READ_TITLE_VOBS (VTS_??_[1-9].VOB) can be multipart files. + * + * This function is only of use if you want to get the size of each file + * in the filesystem. These sizes are not needed to use any other + * functions in libdvdread. + * + * @param dvd A dvd read handle. + * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0. + * @param domain Which domain. + * @param stat Pointer to where the result is stored. + * @return If successful 0, otherwise -1. + * + * int DVDFileStat(dvd, titlenum, domain, stat); + */ +int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *); + +/** + * Opens a file on the DVD given the title number and domain. + * + * If the title number is 0, the video manager information is opened + * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be + * used for reads, or 0 if the file was not found. + * + * @param dvd A dvd read handle. + * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0. + * @param domain Which domain. + * @return If successful a a file read handle is returned, otherwise 0. + * + * dvd_file = DVDOpenFile(dvd, titlenum, domain); */ +dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t ); + +/** + * Closes a file and frees the associated structure. + * + * @param dvd_file The file read handle to be closed. + * + * DVDCloseFile(dvd_file); + */ +void DVDCloseFile( dvd_file_t * ); + +/** + * Reads block_count number of blocks from the file at the given block offset. + * Returns number of blocks read on success, -1 on error. This call is only + * for reading VOB data, and should not be used when reading the IFO files. + * When reading from an encrypted drive, blocks are decrypted using libdvdcss + * where required. + * + * @param dvd_file A file read handle. + * @param offset Block offset from the start of the file to start reading at. + * @param block_count Number of block to read. + * @param data Pointer to a buffer to write the data into. + * It must be aligned to the logical block size of the device when + * reading from a raw/O_DIRECT device (2048 bytes for DVD) + * @return Returns number of blocks read on success, -1 on error. + * + * blocks_read = DVDReadBlocks(dvd_file, offset, block_count, data); + */ +ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * ); + +/** + * Seek to the given position in the file. Returns the resulting position in + * bytes from the beginning of the file. The seek position is only used for + * byte reads from the file, the block read call always reads from the given + * offset. + * + * @param dvd_file A file read handle. + * @param seek_offset Byte offset from the start of the file to seek to. + * @return The resulting position in bytes from the beginning of the file. + * + * offset_set = DVDFileSeek(dvd_file, seek_offset); + */ +int DVDFileSeek( dvd_file_t *, int ); + +/** + * Reads the given number of bytes from the file. This call can only be used + * on the information files, and may not be used for reading from a VOB. This + * reads from and increments the currrent seek position for the file. + * + * @param dvd_file A file read handle. + * @param data Pointer to a buffer to write the data into. + * @param bytes Number of bytes to read. + * @return Returns number of bytes read on success, -1 on error. + * + * bytes_read = DVDReadBytes(dvd_file, data, bytes); + */ +ssize_t DVDReadBytes( dvd_file_t *, void *, size_t ); + +/** + * Returns the file size in blocks. + * + * @param dvd_file A file read handle. + * @return The size of the file in blocks, -1 on error. + * + * blocks = DVDFileSize(dvd_file); + */ +ssize_t DVDFileSize( dvd_file_t * ); + +/** + * Get a unique 128 bit disc ID. + * This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files + * in title order (those that exist). + * If you need a 'text' representation of the id, print it as a + * hexadecimal number, using lowercase letters, discid[0] first. + * I.e. the same format as the command-line 'md5sum' program uses. + * + * @param dvd A read handle to get the disc ID from + * @param discid The buffer to put the disc ID into. The buffer must + * have room for 128 bits (16 chars). + * @return 0 on success, -1 on error. + */ +int DVDDiscID( dvd_reader_t *, unsigned char * ); + +/** + * Get the UDF VolumeIdentifier and VolumeSetIdentifier + * from the PrimaryVolumeDescriptor. + * + * @param dvd A read handle to get the disc ID from + * @param volid The buffer to put the VolumeIdentifier into. + * The VolumeIdentifier is latin-1 encoded (8bit unicode) + * null terminated and max 32 bytes (including '\0') + * @param volid_size No more than volid_size bytes will be copied to volid. + * If the VolumeIdentifier is truncated because of this + * it will still be null terminated. + * @param volsetid The buffer to put the VolumeSetIdentifier into. + * The VolumeIdentifier is 128 bytes as + * stored in the UDF PrimaryVolumeDescriptor. + * Note that this is not a null terminated string. + * @param volsetid_size At most volsetid_size bytes will be copied to volsetid. + * @return 0 on success, -1 on error. + */ +int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int, + unsigned char *, unsigned int ); + +/** + * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier + * + * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 * + * * this will happen on a disc mastered only with a iso9660 filesystem * + * * All video DVD discs have UDF filesystem * + * + * @param dvd A read handle to get the disc ID from + * @param volid The buffer to put the VolumeIdentifier into. + * The VolumeIdentifier is coded with '0-9','A-Z','_' + * null terminated and max 33 bytes (including '\0') + * @param volid_size No more than volid_size bytes will be copied to volid. + * If the VolumeIdentifier is truncated because of this + * it will still be null terminated. + * @param volsetid The buffer to put the VolumeSetIdentifier into. + * The VolumeIdentifier is 128 bytes as + * stored in the ISO9660 PrimaryVolumeDescriptor. + * Note that this is not a null terminated string. + * @param volsetid_size At most volsetid_size bytes will be copied to volsetid. + * @return 0 on success, -1 on error. + */ +int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int, + unsigned char *, unsigned int ); + +/** + * Sets the level of caching that is done when reading from a device + * + * @param dvd A read handle to get the disc ID from + * @param level The level of caching wanted. + * -1 - returns the current setting. + * 0 - UDF Cache turned off. + * 1 - (default level) Pointers to IFO files and some data from + * PrimaryVolumeDescriptor are cached. + * + * @return The level of caching. + */ +int DVDUDFCacheLevel( dvd_reader_t *, int ); + +#ifdef __cplusplus +}; +#endif +#endif /* DVD_READER_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/dvdread_internal.h k9copy-2.2.0/src/dvdreadnew/dvdread_internal.h --- k9copy-2.1.0/src/dvdreadnew/dvdread_internal.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvdread_internal.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,18 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef DVDREAD_INTERNAL_H +#define DVDREAD_INTERNAL_H + + +#define CHECK_VALUE(arg) \ + if(!(arg)) { \ + fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" \ + "\n*** for %s ***\n\n", \ + __FILE__, __LINE__, # arg ); \ + } + + +int get_verbose(void); +int dvdread_verbose(dvd_reader_t *dvd); +dvd_reader_t *device_of_file(dvd_file_t *file); + +#endif /* DVDREAD_INTERNAL_H */ diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_udf.c k9copy-2.2.0/src/dvdreadnew/dvd_udf.c --- k9copy-2.1.0/src/dvdreadnew/dvd_udf.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_udf.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,1216 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + * This code is based on dvdudf by: + * Christian Wolff . + * + * Modifications by: + * Billy Biggs . + * Bj�rn Englund . + * + * dvdudf: parse and read the UDF volume information of a DVD Video + * Copyright (C) 1999 Christian Wolff for convergence integrated media + * GmbH The author can be reached at scarabaeus@convergence.de, the + * project's page is at http://linuxtv.org/dvd/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. Or, point your browser to + * http://www.gnu.org/copyleft/gpl.html + */ + +#include "config.h" + +#include +#include +#include + +#include +#include +#include +#include + +#if defined(HAVE_INTTYPES_H) +#include +#elif defined(HAVE_STDINT_H) +#include +#endif + +#include "dvd_reader.h" +#include "dvd_udf.h" +#include "dvdread_internal.h" + +#ifndef EMEDIUMTYPE +#define EMEDIUMTYPE ENOENT +#endif + +#ifndef HAVE_UINTPTR_T +#warning "Assuming that (unsigned long) can hold (void *)" +/*typedef unsigned long uintptr_t;*/ +#endif + +#define DVD_ALIGN(ptr) (void *)((((uintptr_t)(ptr)) + (DVD_VIDEO_LB_LEN-1)) \ + / DVD_VIDEO_LB_LEN * DVD_VIDEO_LB_LEN) + +typedef struct { + void *start; + void *aligned; +} dvdalign_ptrs_t; + +typedef struct { + dvdalign_ptrs_t *ptrs; + uint32_t ptrs_in_use; + uint32_t ptrs_max; +} dvdalign_t; + +extern void *GetAlignHandle(dvd_reader_t *device); +extern void SetAlignHandle(dvd_reader_t *device, void *align); + +/** + * Allocates aligned memory (for use with reads from raw/O_DIRECT devices). + * This memory must be freed with dvdalign_free() + * The size of the memory that is allocate is num_lbs*2048 bytes. + * The memory will be suitably aligned for use with + * block reads from raw/O_DIRECT device. + * @param num_lbs Number of logical blocks (2048 bytes) to allocate. + * @return Returns pointer to allocated memory, or NULL on failure + * This isn't supposed to be fast/efficient, if that is needed + * this function should be rewritten to use posix_memalign or similar. + * It's just needed for aligning memory for small block reads from + * raw/O_DIRECT devices. + * We assume that 2048 is enough alignment for all systems at the moment. + * Not thread safe. Only use this from one thread. + * Depends on sizeof(unsigned long) being at least as large as sizeof(void *) + */ +static void *dvdalign_lbmalloc(dvd_reader_t *device, uint32_t num_lbs) +{ + void *m; + int n; + dvdalign_t *a; + + m = malloc((num_lbs+1)*DVD_VIDEO_LB_LEN); + if(m == NULL) { + return m; + } + a = (dvdalign_t *)GetAlignHandle(device); + if(a == NULL) { + a = malloc(sizeof(dvdalign_t)); + if(a == NULL) { + return a; + } + a->ptrs = NULL; + a->ptrs_in_use = 0; + a->ptrs_max = 0; + SetAlignHandle(device, (void *)a); + } + + if(a->ptrs_in_use >= a->ptrs_max) { + a->ptrs = realloc(a->ptrs, (a->ptrs_max+10)*sizeof(dvdalign_ptrs_t)); + if(a->ptrs == NULL) { + free(m); + return NULL; + } + a->ptrs_max+=10; + for(n = a->ptrs_in_use; n < a->ptrs_max; n++) { + a->ptrs[n].start = NULL; + a->ptrs[n].aligned = NULL; + } + n = a->ptrs_in_use; + } else { + for(n = 0; n < a->ptrs_max; n++) { + if(a->ptrs[n].start == NULL) { + break; + } + } + } + + a->ptrs[n].start = m; + a->ptrs[n].aligned = DVD_ALIGN(m); + + a->ptrs_in_use++; + + /* If this function starts to be used too much print a warning. + Either there is a memory leak somewhere or we need to rewrite this to + a more efficient version. + */ + if(a->ptrs_in_use > 50) { + if(dvdread_verbose(device) >= 0) { + fprintf(stderr, "libdvdread: dvdalign_lbmalloc(), more allocs than supposed: %u\n", a->ptrs_in_use); + } + } + + return a->ptrs[n].aligned; +} + +/** + * Frees memory allocated with dvdalign_lbmemory() + * @param ptr Pointer to memory space to free + * Not thread safe. + */ +static void dvdalign_lbfree(dvd_reader_t *device, void *ptr) +{ + int n; + dvdalign_t *a; + + a = (dvdalign_t *)GetAlignHandle(device); + if(a && a->ptrs) { + for(n = 0; n < a->ptrs_max; n++) { + if(a->ptrs[n].aligned == ptr) { + free(a->ptrs[n].start); + a->ptrs[n].start = NULL; + a->ptrs[n].aligned = NULL; + a->ptrs_in_use--; + if(a->ptrs_in_use == 0) { + free(a->ptrs); + a->ptrs = NULL; + a->ptrs_max = 0; + free(a); + a = NULL; + SetAlignHandle(device, (void *)a); + } + return; + } + } + } + if(dvdread_verbose(device) >= 0) { + fprintf(stderr, "libdvdread: dvdalign_lbfree(), error trying to free mem: %08lx (%u)\n", (unsigned long)ptr, a ? a->ptrs_in_use : 0); + } +} + + +/* Private but located in/shared with dvd_reader.c */ +extern int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number, + size_t block_count, unsigned char *data, + int encrypted ); + +/** @internal + * Its required to either fail or deliver all the blocks asked for. + * + * @param data Pointer to a buffer where data is returned. This must be large + * enough to hold lb_number*2048 bytes. + * It must be aligned to system specific (2048) logical blocks size when + * reading from raw/O_DIRECT device. + */ +static int DVDReadLBUDF( dvd_reader_t *device, uint32_t lb_number, + size_t block_count, unsigned char *data, + int encrypted ) +{ + int ret; + size_t count = block_count; + + while(count > 0) { + + ret = UDFReadBlocksRaw(device, lb_number, count, data, encrypted); + + if(ret <= 0) { + /* One of the reads failed or nothing more to read, too bad. + * We won't even bother returning the reads that went ok. */ + return ret; + } + + count -= (size_t)ret; + lb_number += (uint32_t)ret; + } + + return block_count; +} + + +#ifndef NULL +#define NULL ((void *)0) +#endif + +struct Partition { + int valid; + char VolumeDesc[128]; + uint16_t Flags; + uint16_t Number; + char Contents[32]; + uint32_t AccessType; + uint32_t Start; + uint32_t Length; +}; + +struct AD { + uint32_t Location; + uint32_t Length; + uint8_t Flags; + uint16_t Partition; +}; + +struct extent_ad { + uint32_t location; + uint32_t length; +}; + +struct avdp_t { + struct extent_ad mvds; + struct extent_ad rvds; +}; + +struct pvd_t { + uint8_t VolumeIdentifier[32]; + uint8_t VolumeSetIdentifier[128]; +}; + +struct lbudf { + uint32_t lb; + uint8_t *data; +}; + +struct icbmap { + uint32_t lbn; + struct AD file; + uint8_t filetype; +}; + +struct udf_cache { + int avdp_valid; + struct avdp_t avdp; + int pvd_valid; + struct pvd_t pvd; + int partition_valid; + struct Partition partition; + int rooticb_valid; + struct AD rooticb; + int lb_num; + struct lbudf *lbs; + int map_num; + struct icbmap *maps; +}; + +typedef enum { + PartitionCache, RootICBCache, LBUDFCache, MapCache, AVDPCache, PVDCache +} UDFCacheType; + +extern void *GetUDFCacheHandle(dvd_reader_t *device); +extern void SetUDFCacheHandle(dvd_reader_t *device, void *cache); + + +void FreeUDFCache(dvd_reader_t *device, void *cache) +{ + int n; + + struct udf_cache *c = (struct udf_cache *)cache; + if(c == NULL) { + return; + } + + for(n = 0; n < c->lb_num; n++) { + if(c->lbs[n].data) { + /* free data */ + dvdalign_lbfree(device, c->lbs[n].data); + } + } + c->lb_num = 0; + + if(c->lbs) { + free(c->lbs); + } + if(c->maps) { + free(c->maps); + } + free(c); +} + + +static int GetUDFCache(dvd_reader_t *device, UDFCacheType type, + uint32_t nr, void *data) +{ + int n; + struct udf_cache *c; + + if(DVDUDFCacheLevel(device, -1) <= 0) { + return 0; + } + + c = (struct udf_cache *)GetUDFCacheHandle(device); + + if(c == NULL) { + return 0; + } + + switch(type) { + case AVDPCache: + if(c->avdp_valid) { + *(struct avdp_t *)data = c->avdp; + return 1; + } + break; + case PVDCache: + if(c->pvd_valid) { + *(struct pvd_t *)data = c->pvd; + return 1; + } + break; + case PartitionCache: + if(c->partition_valid) { + *(struct Partition *)data = c->partition; + return 1; + } + break; + case RootICBCache: + if(c->rooticb_valid) { + *(struct AD *)data = c->rooticb; + return 1; + } + break; + case LBUDFCache: + for(n = 0; n < c->lb_num; n++) { + if(c->lbs[n].lb == nr) { + *(uint8_t **)data = c->lbs[n].data; + return 1; + } + } + break; + case MapCache: + for(n = 0; n < c->map_num; n++) { + if(c->maps[n].lbn == nr) { + *(struct icbmap *)data = c->maps[n]; + return 1; + } + } + break; + default: + break; + } + + return 0; +} + +static int SetUDFCache(dvd_reader_t *device, UDFCacheType type, + uint32_t nr, void *data) +{ + int n; + struct udf_cache *c; + + if(DVDUDFCacheLevel(device, -1) <= 0) { + return 0; + } + + c = (struct udf_cache *)GetUDFCacheHandle(device); + + if(c == NULL) { + c = calloc(1, sizeof(struct udf_cache)); + /* fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache)); */ + if(c == NULL) { + return 0; + } + SetUDFCacheHandle(device, c); + } + + + switch(type) { + case AVDPCache: + c->avdp = *(struct avdp_t *)data; + c->avdp_valid = 1; + break; + case PVDCache: + c->pvd = *(struct pvd_t *)data; + c->pvd_valid = 1; + break; + case PartitionCache: + c->partition = *(struct Partition *)data; + c->partition_valid = 1; + break; + case RootICBCache: + c->rooticb = *(struct AD *)data; + c->rooticb_valid = 1; + break; + case LBUDFCache: + for(n = 0; n < c->lb_num; n++) { + if(c->lbs[n].lb == nr) { + /* replace with new data */ + c->lbs[n].data = *(uint8_t **)data; + c->lbs[n].lb = nr; + return 1; + } + } + c->lb_num++; + c->lbs = realloc(c->lbs, c->lb_num * sizeof(struct lbudf)); + /* + fprintf(stderr, "realloc lb: %d * %d = %d\n", + c->lb_num, sizeof(struct lbudf), + c->lb_num * sizeof(struct lbudf)); + */ + if(c->lbs == NULL) { + c->lb_num = 0; + return 0; + } + c->lbs[n].data = *(uint8_t **)data; + c->lbs[n].lb = nr; + break; + case MapCache: + for(n = 0; n < c->map_num; n++) { + if(c->maps[n].lbn == nr) { + /* replace with new data */ + c->maps[n] = *(struct icbmap *)data; + c->maps[n].lbn = nr; + return 1; + } + } + c->map_num++; + c->maps = realloc(c->maps, c->map_num * sizeof(struct icbmap)); + /* + fprintf(stderr, "realloc maps: %d * %d = %d\n", + c->map_num, sizeof(struct icbmap), + c->map_num * sizeof(struct icbmap)); + */ + if(c->maps == NULL) { + c->map_num = 0; + return 0; + } + c->maps[n] = *(struct icbmap *)data; + c->maps[n].lbn = nr; + break; + default: + return 0; + } + + return 1; +} + + +/* For direct data access, LSB first */ +#define GETN1(p) ((uint8_t)data[p]) +#define GETN2(p) ((uint16_t)data[p] | ((uint16_t)data[(p) + 1] << 8)) +#define GETN3(p) ((uint32_t)data[p] | ((uint32_t)data[(p) + 1] << 8) \ + | ((uint32_t)data[(p) + 2] << 16)) +#define GETN4(p) ((uint32_t)data[p] \ + | ((uint32_t)data[(p) + 1] << 8) \ + | ((uint32_t)data[(p) + 2] << 16) \ + | ((uint32_t)data[(p) + 3] << 24)) +/* This is wrong with regard to endianess */ +#define GETN(p, n, target) memcpy(target, &data[p], n) + +static int Unicodedecode( uint8_t *data, int len, char *target ) +{ + int p = 1, i = 0; + + if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do { + if( data[ 0 ] == 16 ) p++; /* Ignore MSB of unicode16 */ + if( p < len ) { + target[ i++ ] = data[ p++ ]; + } + } while( p < len ); + + target[ i ] = '\0'; + return 0; +} + +static int UDFDescriptor( uint8_t *data, uint16_t *TagID ) +{ + *TagID = GETN2(0); + return 0; +} + +static int UDFExtentAD( uint8_t *data, uint32_t *Length, uint32_t *Location ) +{ + *Length = GETN4(0); + *Location = GETN4(4); + return 0; +} + +static int UDFShortAD( uint8_t *data, struct AD *ad, + struct Partition *partition ) +{ + ad->Length = GETN4(0); + ad->Flags = ad->Length >> 30; + ad->Length &= 0x3FFFFFFF; + ad->Location = GETN4(4); + ad->Partition = partition->Number; /* use number of current partition*/ + return 0; +} + +static int UDFLongAD( uint8_t *data, struct AD *ad ) +{ + ad->Length = GETN4(0); + ad->Flags = ad->Length >> 30; + ad->Length &= 0x3FFFFFFF; + ad->Location = GETN4(4); + ad->Partition = GETN2(8); + /*GETN(10, 6, Use);*/ + return 0; +} + +static int UDFExtAD( uint8_t *data, struct AD *ad ) +{ + ad->Length = GETN4(0); + ad->Flags = ad->Length >> 30; + ad->Length &= 0x3FFFFFFF; + ad->Location = GETN4(12); + ad->Partition = GETN2(16); + /*GETN(10, 6, Use);*/ + return 0; +} + +static int UDFICB( uint8_t *data, uint8_t *FileType, uint16_t *Flags ) +{ + *FileType = GETN1(11); + *Flags = GETN2(18); + return 0; +} + + +static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Number, + char *Contents, uint32_t *Start, uint32_t *Length ) +{ + *Flags = GETN2(20); + *Number = GETN2(22); + GETN(24, 32, Contents); + *Start = GETN4(188); + *Length = GETN4(192); + return 0; +} + +/** + * Reads the volume descriptor and checks the parameters. Returns 0 on OK, 1 + * on error. + */ +static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor ) +{ + uint32_t lbsize, MT_L, N_PM; + Unicodedecode(&data[84], 128, VolumeDescriptor); + lbsize = GETN4(212); /* should be 2048*/ + MT_L = GETN4(264); /* should be 6 */ + N_PM = GETN4(268); /* should be 1 */ + if (lbsize != DVD_VIDEO_LB_LEN) return 1; + return 0; +} + +static int UDFFileEntry( uint8_t *data, uint8_t *FileType, + struct Partition *partition, struct AD *ad ) +{ + uint16_t flags; + uint32_t L_EA, L_AD; + unsigned int p; + + UDFICB( &data[ 16 ], FileType, &flags ); + + /* Init ad for an empty file (i.e. there isn't a AD, L_AD == 0 ) */ + ad->Length = GETN4( 60 ); /* Really 8 bytes a 56*/ + ad->Flags = 0; + ad->Location = 0; /* what should we put here? */ + ad->Partition = partition->Number; /* use number of current partition*/ + + L_EA = GETN4( 168 ); + L_AD = GETN4( 172 ); + p = 176 + L_EA; + while( p < 176 + L_EA + L_AD ) { + switch( flags & 0x0007 ) { + case 0: UDFShortAD( &data[ p ], ad, partition ); p += 8; break; + case 1: UDFLongAD( &data[ p ], ad ); p += 16; break; + case 2: UDFExtAD( &data[ p ], ad ); p += 20; break; + case 3: + switch( L_AD ) { + case 8: UDFShortAD( &data[ p ], ad, partition ); break; + case 16: UDFLongAD( &data[ p ], ad ); break; + case 20: UDFExtAD( &data[ p ], ad ); break; + } + p += L_AD; + break; + default: + p += L_AD; break; + } + } + return 0; +} + +static int UDFFileIdentifier( uint8_t *data, uint8_t *FileCharacteristics, + char *FileName, struct AD *FileICB ) +{ + uint8_t L_FI; + uint16_t L_IU; + + *FileCharacteristics = GETN1(18); + L_FI = GETN1(19); + UDFLongAD(&data[20], FileICB); + L_IU = GETN2(36); + if (L_FI) Unicodedecode(&data[38 + L_IU], L_FI, FileName); + else FileName[0] = '\0'; + return 4 * ((38 + L_FI + L_IU + 3) / 4); +} + +/** + * Maps ICB to FileAD + * ICB: Location of ICB of directory to scan + * FileType: Type of the file + * File: Location of file the ICB is pointing to + * return 1 on success, 0 on error; + */ +static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *FileType, + struct Partition *partition, struct AD *File ) +{ + uint8_t *LogBlock; + uint32_t lbnum; + uint16_t TagID; + struct icbmap tmpmap; + + lbnum = partition->Start + ICB.Location; + tmpmap.lbn = lbnum; + if(GetUDFCache(device, MapCache, lbnum, &tmpmap)) { + *FileType = tmpmap.filetype; + *File = tmpmap.file; + return 1; + } + + LogBlock = dvdalign_lbmalloc(device, 1); + if(!LogBlock) { + return 0; + } + + do { + if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { + TagID = 0; + } else { + UDFDescriptor( LogBlock, &TagID ); + } + + if( TagID == 261 ) { + UDFFileEntry( LogBlock, FileType, partition, File ); + tmpmap.file = *File; + tmpmap.filetype = *FileType; + SetUDFCache(device, MapCache, tmpmap.lbn, &tmpmap); + dvdalign_lbfree(device, LogBlock); + return 1; + }; + } while( ( lbnum <= partition->Start + ICB.Location + ( ICB.Length - 1 ) + / DVD_VIDEO_LB_LEN ) && ( TagID != 261 ) ); + + dvdalign_lbfree(device, LogBlock); + return 0; +} + +/** + * Dir: Location of directory to scan + * FileName: Name of file to look for + * FileICB: Location of ICB of the found file + * return 1 on success, 0 on error; + */ +static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName, + struct Partition *partition, struct AD *FileICB, + int cache_file_info) +{ + char filename[ MAX_UDF_FILE_NAME_LEN ]; + uint8_t *directory; + uint32_t lbnum; + uint16_t TagID; + uint8_t filechar; + unsigned int p; + uint8_t *cached_dir = NULL; + uint32_t dir_lba; + struct AD tmpICB; + int found = 0; + int in_cache = 0; + + /* Scan dir for ICB of file */ + lbnum = partition->Start + Dir.Location; + + if(DVDUDFCacheLevel(device, -1) > 0) { + /* caching */ + + if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) { + dir_lba = (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN; + if((cached_dir = dvdalign_lbmalloc(device, dir_lba)) == NULL) { + return 0; + } + if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) { + dvdalign_lbfree(device, cached_dir); + cached_dir = NULL; + } + SetUDFCache(device, LBUDFCache, lbnum, &cached_dir); + } else { + in_cache = 1; + } + + if(cached_dir == NULL) { + return 0; + } + + p = 0; + + while( p < Dir.Length ) { + UDFDescriptor( &cached_dir[ p ], &TagID ); + if( TagID == 257 ) { + p += UDFFileIdentifier( &cached_dir[ p ], &filechar, + filename, &tmpICB ); + if(cache_file_info && !in_cache) { + uint8_t tmpFiletype; + struct AD tmpFile; + + if( !strcasecmp( FileName, filename ) ) { + *FileICB = tmpICB; + found = 1; + + } + UDFMapICB(device, tmpICB, &tmpFiletype, + partition, &tmpFile); + } else { + if( !strcasecmp( FileName, filename ) ) { + *FileICB = tmpICB; + return 1; + } + } + } else { + if(cache_file_info && (!in_cache) && found) { + return 1; + } + return 0; + } + } + if(cache_file_info && (!in_cache) && found) { + return 1; + } + return 0; + } + + directory = dvdalign_lbmalloc(device, 2); + if(!directory) { + return 0; + } + if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <= 0 ) { + dvdalign_lbfree(device, directory); + return 0; + } + + p = 0; + while( p < Dir.Length ) { + if( p > DVD_VIDEO_LB_LEN ) { + ++lbnum; + p -= DVD_VIDEO_LB_LEN; + Dir.Length -= DVD_VIDEO_LB_LEN; + if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <= 0 ) { + dvdalign_lbfree(device, directory); + return 0; + } + } + UDFDescriptor( &directory[ p ], &TagID ); + if( TagID == 257 ) { + p += UDFFileIdentifier( &directory[ p ], &filechar, + filename, FileICB ); + if( !strcasecmp( FileName, filename ) ) { + dvdalign_lbfree(device, directory); + return 1; + } + } else { + dvdalign_lbfree(device, directory); + return 0; + } + } + + dvdalign_lbfree(device, directory); + return 0; +} + + +static int UDFGetAVDP( dvd_reader_t *device, + struct avdp_t *avdp) +{ + uint8_t *Anchor; + uint32_t lbnum, MVDS_location, MVDS_length; + uint16_t TagID; + uint32_t lastsector; + int terminate; + struct avdp_t; + + if(GetUDFCache(device, AVDPCache, 0, avdp)) { + return 1; + } + + /* Find Anchor */ + lastsector = 0; + lbnum = 256; /* Try #1, prime anchor */ + terminate = 0; + + Anchor = dvdalign_lbmalloc(device, 1); + if(!Anchor) { + return 0; + } + for(;;) { + if( DVDReadLBUDF( device, lbnum, 1, Anchor, 0 ) > 0 ) { + UDFDescriptor( Anchor, &TagID ); + } else { + TagID = 0; + } + if (TagID != 2) { + /* Not an anchor */ + if( terminate ) { + dvdalign_lbfree(device, Anchor); + errno = EMEDIUMTYPE; + return 0; /* Final try failed */ + } + + if( lastsector ) { + /* We already found the last sector. Try #3, alternative + * backup anchor. If that fails, don't try again. + */ + lbnum = lastsector; + terminate = 1; + } else { + /* TODO: Find last sector of the disc (this is optional). */ + if( lastsector ) { + /* Try #2, backup anchor */ + lbnum = lastsector - 256; + } else { + /* Unable to find last sector */ + dvdalign_lbfree(device, Anchor); + errno = EMEDIUMTYPE; + return 0; + } + } + } else { + /* It's an anchor! We can leave */ + break; + } + } + /* Main volume descriptor */ + UDFExtentAD( &Anchor[ 16 ], &MVDS_length, &MVDS_location ); + avdp->mvds.location = MVDS_location; + avdp->mvds.length = MVDS_length; + + /* Backup volume descriptor */ + UDFExtentAD( &Anchor[ 24 ], &MVDS_length, &MVDS_location ); + avdp->rvds.location = MVDS_location; + avdp->rvds.length = MVDS_length; + + SetUDFCache(device, AVDPCache, 0, avdp); + + dvdalign_lbfree(device, Anchor); + return 1; +} + +/** + * Looks for partition on the disc. Returns 1 if partition found, 0 on error. + * partnum: Number of the partition, starting at 0. + * part: structure to fill with the partition information + */ +static int UDFFindPartition( dvd_reader_t *device, int partnum, + struct Partition *part ) +{ + uint8_t *LogBlock; + uint32_t lbnum, MVDS_location, MVDS_length; + uint16_t TagID; + int i, volvalid; + struct avdp_t avdp; + + + if(!UDFGetAVDP(device, &avdp)) { + return 0; + } + + LogBlock = dvdalign_lbmalloc(device, 1); + if(!LogBlock) { + return 0; + } + /* Main volume descriptor */ + MVDS_location = avdp.mvds.location; + MVDS_length = avdp.mvds.length; + + part->valid = 0; + volvalid = 0; + part->VolumeDesc[ 0 ] = '\0'; + i = 1; + do { + /* Find Volume Descriptor */ + lbnum = MVDS_location; + do { + + if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { + TagID = 0; + } else { + UDFDescriptor( LogBlock, &TagID ); + } + + if( ( TagID == 5 ) && ( !part->valid ) ) { + /* Partition Descriptor */ + UDFPartition( LogBlock, &part->Flags, &part->Number, + part->Contents, &part->Start, &part->Length ); + part->valid = ( partnum == part->Number ); + } else if( ( TagID == 6 ) && ( !volvalid ) ) { + /* Logical Volume Descriptor */ + if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) { + /* TODO: sector size wrong! */ + } else { + volvalid = 1; + } + } + + } while( ( lbnum <= MVDS_location + ( MVDS_length - 1 ) + / DVD_VIDEO_LB_LEN ) && ( TagID != 8 ) + && ( ( !part->valid ) || ( !volvalid ) ) ); + + if( ( !part->valid) || ( !volvalid ) ) { + /* Backup volume descriptor */ + MVDS_location = avdp.mvds.location; + MVDS_length = avdp.mvds.length; + } + } while( i-- && ( ( !part->valid ) || ( !volvalid ) ) ); + + dvdalign_lbfree(device, LogBlock); + /* We only care for the partition, not the volume */ + return part->valid; +} + +uint32_t UDFFindFile( dvd_reader_t *device, char *filename, + uint32_t *filesize ) +{ + uint8_t *LogBlock; + uint32_t lbnum; + uint16_t TagID; + struct Partition partition; + struct AD RootICB, File, ICB; + char tokenline[ MAX_UDF_FILE_NAME_LEN ]; + char *token; + uint8_t filetype; + + if(filesize) { + *filesize = 0; + } + tokenline[0] = '\0'; + strcat( tokenline, filename ); + + + if(!(GetUDFCache(device, PartitionCache, 0, &partition) && + GetUDFCache(device, RootICBCache, 0, &RootICB))) { + /* Find partition, 0 is the standard location for DVD Video.*/ + if( !UDFFindPartition( device, 0, &partition ) ) { + return 0; + } + SetUDFCache(device, PartitionCache, 0, &partition); + + LogBlock = dvdalign_lbmalloc(device, 1); + if(!LogBlock) { + return 0; + } + /* Find root dir ICB */ + lbnum = partition.Start; + do { + if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <= 0 ) { + TagID = 0; + } else { + UDFDescriptor( LogBlock, &TagID ); + } + + /* File Set Descriptor */ + if( TagID == 256 ) { /* File Set Descriptor*/ + UDFLongAD( &LogBlock[ 400 ], &RootICB ); + } + } while( ( lbnum < partition.Start + partition.Length ) + && ( TagID != 8 ) && ( TagID != 256 ) ); + + dvdalign_lbfree(device, LogBlock); + + /* Sanity checks. */ + if( TagID != 256 ) { + return 0; + } + if( RootICB.Partition != 0 ) { + return 0; + } + SetUDFCache(device, RootICBCache, 0, &RootICB); + } + + /* Find root dir */ + if( !UDFMapICB( device, RootICB, &filetype, &partition, &File ) ) { + return 0; + } + if( filetype != 4 ) { + return 0; /* Root dir should be dir */ + } + { + int cache_file_info = 0; + /* Tokenize filepath */ + token = strtok(tokenline, "/"); + + while( token != NULL ) { + + if( !UDFScanDir( device, File, token, &partition, &ICB, + cache_file_info)) { + return 0; + } + if( !UDFMapICB( device, ICB, &filetype, &partition, &File ) ) { + return 0; + } + if(!strcmp(token, "VIDEO_TS")) { + cache_file_info = 1; + } + token = strtok( NULL, "/" ); + } + } + + /* Sanity check. */ + if( File.Partition != 0 ) { + return 0; + } + + if(filesize) { + *filesize = File.Length; + } + /* Hack to not return partition.Start for empty files. */ + if( !File.Location ) { + return 0; + } else { + return partition.Start + File.Location; + } +} + + + +/** + * Gets a Descriptor . + * Returns 1 if descriptor found, 0 on error. + * id, tagid of descriptor + * bufsize, size of BlockBuf (must be >= DVD_VIDEO_LB_LEN) + * and aligned for raw/O_DIRECT read. + */ +static int UDFGetDescriptor( dvd_reader_t *device, int id, + uint8_t *descriptor, int bufsize) +{ + uint32_t lbnum, MVDS_location, MVDS_length; + struct avdp_t avdp; + uint16_t TagID; + uint32_t lastsector; + int i, terminate; + int desc_found = 0; + /* Find Anchor */ + lastsector = 0; + lbnum = 256; /* Try #1, prime anchor */ + terminate = 0; + if(bufsize < DVD_VIDEO_LB_LEN) { + return 0; + } + + if(!UDFGetAVDP(device, &avdp)) { + return 0; + } + + /* Main volume descriptor */ + MVDS_location = avdp.mvds.location; + MVDS_length = avdp.mvds.length; + + i = 1; + do { + /* Find Descriptor */ + lbnum = MVDS_location; + do { + + if( DVDReadLBUDF( device, lbnum++, 1, descriptor, 0 ) <= 0 ) { + TagID = 0; + } else { + UDFDescriptor( descriptor, &TagID ); + } + + if( (TagID == id) && ( !desc_found ) ) { + /* Descriptor */ + desc_found = 1; + } + } while( ( lbnum <= MVDS_location + ( MVDS_length - 1 ) + / DVD_VIDEO_LB_LEN ) && ( TagID != 8 ) + && ( !desc_found) ); + + if( !desc_found ) { + /* Backup volume descriptor */ + MVDS_location = avdp.rvds.location; + MVDS_length = avdp.rvds.length; + } + } while( i-- && ( !desc_found ) ); + + + return desc_found; +} + + +static int UDFGetPVD(dvd_reader_t *device, struct pvd_t *pvd) +{ + uint8_t *pvd_buf; + + if(GetUDFCache(device, PVDCache, 0, pvd)) { + return 1; + } + + pvd_buf = dvdalign_lbmalloc(device, 1); + if(!pvd_buf) { + return 0; + } + if(!UDFGetDescriptor( device, 1, pvd_buf, 1*DVD_VIDEO_LB_LEN)) { + dvdalign_lbfree(device, pvd_buf); + return 0; + } + + memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32); + memcpy(pvd->VolumeSetIdentifier, &pvd_buf[72], 128); + SetUDFCache(device, PVDCache, 0, pvd); + + dvdalign_lbfree(device, pvd_buf); + + return 1; +} + +/** + * Gets the Volume Identifier string, in 8bit unicode (latin-1) + * volid, place to put the string + * volid_size, size of the buffer volid points to + * returns the size of buffer needed for all data + */ +int UDFGetVolumeIdentifier(dvd_reader_t *device, char *volid, + unsigned int volid_size) +{ + struct pvd_t pvd; + unsigned int volid_len; + + /* get primary volume descriptor */ + if(!UDFGetPVD(device, &pvd)) { + return 0; + } + + volid_len = pvd.VolumeIdentifier[31]; + if(volid_len > 31) { + /* this field is only 32 bytes something is wrong */ + volid_len = 31; + } + if(volid_size > volid_len) { + volid_size = volid_len; + } + Unicodedecode(pvd.VolumeIdentifier, volid_size, volid); + + return volid_len; +} + +/** + * Gets the Volume Set Identifier, as a 128-byte dstring (not decoded) + * WARNING This is not a null terminated string + * volsetid, place to put the data + * volsetid_size, size of the buffer volsetid points to + * the buffer should be >=128 bytes to store the whole volumesetidentifier + * returns the size of the available volsetid information (128) + * or 0 on error + */ +int UDFGetVolumeSetIdentifier(dvd_reader_t *device, uint8_t *volsetid, + unsigned int volsetid_size) +{ + struct pvd_t pvd; + + /* get primary volume descriptor */ + if(!UDFGetPVD(device, &pvd)) { + return 0; + } + + + if(volsetid_size > 128) { + volsetid_size = 128; + } + + memcpy(volsetid, pvd.VolumeSetIdentifier, volsetid_size); + + return 128; +} diff -Nru k9copy-2.1.0/src/dvdreadnew/dvd_udf.h k9copy-2.2.0/src/dvdreadnew/dvd_udf.h --- k9copy-2.1.0/src/dvdreadnew/dvd_udf.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/dvd_udf.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,66 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef DVD_UDF_H_INCLUDED +#define DVD_UDF_H_INCLUDED + +/* + * This code is based on dvdudf by: + * Christian Wolff . + * + * Modifications by: + * Billy Biggs . + * Bjrn Englund . + * + * dvdudf: parse and read the UDF volume information of a DVD Video + * Copyright (C) 1999 Christian Wolff for convergence integrated media + * GmbH The author can be reached at scarabaeus@convergence.de, the + * project's page is at http://linuxtv.org/dvd/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. Or, point your browser to + * http://www.gnu.org/copyleft/gpl.html + */ + +#if defined(HAVE_INTTYPES_H) +#include +#elif defined(HAVE_STDINT_H) +#include +#endif + +#include "dvd_reader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Looks for a file on the UDF disc/imagefile and returns the block number + * where it begins, or 0 if it is not found. The filename should be an + * absolute pathname on the UDF filesystem, starting with '/'. For example, + * '/VIDEO_TS/VTS_01_1.IFO'. On success, filesize will be set to the size of + * the file in bytes. + * This implementation relies on that the file size is less than 2^32 + * A DVD file can at most be 2^30 (-2048 ?). + */ +uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t *size ); + +void FreeUDFCache(dvd_reader_t *device, void *cache); +int UDFGetVolumeIdentifier(dvd_reader_t *device, + char *volid, unsigned int volid_size); +int UDFGetVolumeSetIdentifier(dvd_reader_t *device, + uint8_t *volsetid, unsigned int volsetid_size); +#ifdef __cplusplus +}; +#endif +#endif /* DVD_UDF_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/ifo_print.c k9copy-2.2.0/src/dvdreadnew/ifo_print.c --- k9copy-2.1.0/src/dvdreadnew/ifo_print.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/ifo_print.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,1251 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: ifo_print.c 1135 2008-09-06 21:55:51Z rathann $ + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "ifo_types.h" +#include "ifo_read.h" +#include "ifo_print.h" + +/* Put this in some other file / package? It's used in nav_print too. */ +static void ifo_print_time(int level, dvd_time_t *dtime) { + const char *rate; + assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa); + assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); + assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); + assert((dtime->frame_u&0xf) < 0xa); + + printf("%02x:%02x:%02x.%02x", + dtime->hour, + dtime->minute, + dtime->second, + dtime->frame_u & 0x3f); + switch((dtime->frame_u & 0xc0) >> 6) { + case 1: + rate = "25.00"; + break; + case 3: + rate = "29.97"; + break; + default: + if(dtime->hour == 0 && dtime->minute == 0 + && dtime->second == 0 && dtime->frame_u == 0) + rate = "no"; + else + rate = "(please send a bug report)"; + break; + } + printf(" @ %s fps", rate); +} + +void dvdread_print_time(dvd_time_t *dtime) { + ifo_print_time(5, dtime); +} + +/* Put this in some other file / package? It's used in nav_print too. + Possibly also by the vm / navigator. */ +static void ifo_print_cmd(int row, vm_cmd_t *command) { + int i; + + printf("(%03d) ", row + 1); + for(i=0;i<8;i++) + printf("%02x ", command->bytes[i]); + printf("| "); +#if 0 + //disabled call of dvdnav function + vm_print_mnemonic(command); +#endif + printf("\n"); +} + +static void ifo_print_video_attributes(int level, video_attr_t *attr) { + + /* The following test is shorter but not correct ISO C, + memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */ + if(attr->mpeg_version == 0 + && attr->video_format == 0 + && attr->display_aspect_ratio == 0 + && attr->permitted_df == 0 + && attr->unknown1 == 0 + && attr->line21_cc_1 == 0 + && attr->line21_cc_2 == 0 + && attr->video_format == 0 + && attr->letterboxed == 0 + && attr->film_mode == 0) { + printf("-- Unspecified --"); + return; + } + + switch(attr->mpeg_version) { + case 0: + printf("mpeg1, "); + break; + case 1: + printf("mpeg2, "); + break; + default: + printf("(please send a bug report), "); + } + + switch(attr->video_format) { + case 0: + printf("ntsc, "); + break; + case 1: + printf("pal, "); + break; + default: + printf("(please send a bug report), "); + } + + switch(attr->display_aspect_ratio) { + case 0: + printf("4:3, "); + break; + case 3: + printf("16:9, "); + break; + default: + printf("(please send a bug report), "); + } + + // Wide is allways allowed..!!! + switch(attr->permitted_df) { + case 0: + printf("pan&scan+letterboxed, "); + break; + case 1: + printf("only pan&scan, "); //?? + break; + case 2: + printf("only letterboxed, "); + break; + case 3: + printf("not specified, "); + break; + default: + printf("(please send a bug report), "); + } + + printf("U%x, ", attr->unknown1); + assert(!attr->unknown1); + + if(attr->line21_cc_1 || attr->line21_cc_2) { + printf("NTSC CC "); + if(attr->line21_cc_1) + printf("1, "); + if(attr->line21_cc_2) + printf("2, "); + } + + { + int height = 480; + if(attr->video_format != 0) + height = 576; + switch(attr->picture_size) { + case 0: + printf("720x%d, ", height); + break; + case 1: + printf("704x%d, ", height); + break; + case 2: + printf("352x%d, ", height); + break; + case 3: + printf("352x%d, ", height/2); + break; + default: + printf("(please send a bug report), "); + } + } + + if(attr->letterboxed) { + printf("source letterboxed, "); + } + + if(attr->film_mode) { + printf("film. "); + } else { + printf("video. "); //camera + } +} + +static void ifo_print_audio_attributes(int level, audio_attr_t *attr) { + + if(attr->audio_format == 0 + && attr->multichannel_extension == 0 + && attr->lang_type == 0 + && attr->application_mode == 0 + && attr->quantization == 0 + && attr->sample_frequency == 0 + && attr->channels == 0 + && attr->lang_extension == 0 + && attr->unknown1 == 0 + && attr->unknown3 == 0) { + printf("-- Unspecified --"); + return; + } + + switch(attr->audio_format) { + case 0: + printf("ac3 "); + if(attr->quantization != 3) + printf("(please send a bug report) ac3 quant/drc not 3 (%d)", attr->quantization); + break; + case 1: + printf("(please send a bug report) "); + break; + case 2: + printf("mpeg1 "); + case 3: + printf("mpeg2ext "); + switch(attr->quantization) { + case 0: + printf("no drc "); + break; + case 1: + printf("drc "); + break; + default: + printf("(please send a bug report) mpeg reserved quant/drc (%d)", attr->quantization); + } + break; + case 4: + printf("lpcm "); + switch(attr->quantization) { + case 0: + printf("16bit "); + break; + case 1: + printf("20bit "); + break; + case 2: + printf("24bit "); + break; + case 3: + printf("(please send a bug report) lpcm reserved quant/drc (%d)", attr->quantization); + break; + } + break; + case 5: + printf("(please send a bug report) "); + break; + case 6: + printf("dts "); + if(attr->quantization != 3) + printf("(please send a bug report) dts quant/drc not 3 (%d)", attr->quantization); + break; + default: + printf("(please send a bug report) "); + } + + if(attr->multichannel_extension) + printf("multichannel_extension "); + + switch(attr->lang_type) { + case 0: + // not specified + assert(attr->lang_code == 0 || attr->lang_code == 0xffff); + break; + case 1: + printf("%c%c ", attr->lang_code>>8, attr->lang_code & 0xff); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->application_mode) { + case 0: + // not specified + break; + case 1: + printf("karaoke mode "); + break; + case 2: + printf("surround sound mode "); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->quantization) { + case 0: + printf("16bit "); + break; + case 1: + printf("20bit "); + break; + case 2: + printf("24bit "); + break; + case 3: + printf("drc "); + break; + default: + printf("(please send a bug report) "); + } + + switch(attr->sample_frequency) { + case 0: + printf("48kHz "); + break; + case 1: + printf("??kHz "); + break; + default: + printf("sample_frequency %i (please send a bug report) ", + attr->sample_frequency); + } + + printf("%dCh ", attr->channels + 1); + + switch(attr->lang_extension) { + case 0: + printf("Not specified "); + break; + case 1: // Normal audio + printf("Normal Caption "); + break; + case 2: // visually imparied + printf("Audio for visually impaired "); + break; + case 3: // Directors 1 + printf("Director's comments 1 "); + break; + case 4: // Directors 2 + printf("Director's comments 2 "); + break; + //case 4: // Music score ? + default: + printf("(please send a bug report) "); + } + + printf("%d ", attr->unknown1); + printf("%d ", attr->unknown3); +} + +static void ifo_print_subp_attributes(int level, subp_attr_t *attr) { + + if(attr->type == 0 + && attr->lang_code == 0 + && attr->zero1 == 0 + && attr->zero2 == 0 + && attr->lang_extension== 0) { + printf("-- Unspecified --"); + return; + } + + printf("type %02x ", attr->type); + + if(isalpha((int)(attr->lang_code >> 8)) + && isalpha((int)(attr->lang_code & 0xff))) { + printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff); + } else { + printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8), + 0xff & (unsigned)(attr->lang_code & 0xff)); + } + + printf("%d ", attr->zero1); + printf("%d ", attr->zero2); + + switch(attr->lang_extension) { + case 0: + printf("Not specified "); + break; + case 1: + printf("Caption with normal size character "); + break; + case 2: + printf("Caption with bigger size character "); + break; + case 3: + printf("Caption for children "); + break; + case 4: + printf("reserved "); + break; + case 5: + printf("Closed Caption with normal size character "); + break; + case 6: + printf("Closed Caption with bigger size character "); + break; + case 7: + printf("Closed Caption for children "); + break; + case 8: + printf("reserved "); + break; + case 9: + printf("Forced Caption"); + break; + case 10: + printf("reserved "); + break; + case 11: + printf("reserved "); + break; + case 12: + printf("reserved "); + break; + case 13: + printf("Director's comments with normal size character "); + break; + case 14: + printf("Director's comments with bigger size character "); + break; + case 15: + printf("Director's comments for children "); + break; + default: + printf("(please send a bug report) "); + } + +} + + +static void ifo_print_USER_OPS(user_ops_t *user_ops) { + uint32_t uops; + unsigned char *ptr = (unsigned char *)user_ops; + + uops = (*ptr++ << 24); + uops |= (*ptr++ << 16); + uops |= (*ptr++ << 8); + uops |= (*ptr++); + + if(uops == 0) { + printf("None\n"); + } else if(uops == 0x01ffffff) { + printf("All\n"); + } else { + if(user_ops->title_or_time_play) + printf("Title or Time Play, "); + if(user_ops->chapter_search_or_play) + printf("Chapter Search or Play, "); + if(user_ops->title_play) + printf("Title Play, "); + if(user_ops->stop) + printf("Stop, "); + if(user_ops->go_up) + printf("Go Up, "); + if(user_ops->time_or_chapter_search) + printf("Time or Chapter Search, "); + if(user_ops->prev_or_top_pg_search) + printf("Prev or Top PG Search, "); + if(user_ops->next_pg_search) + printf("Next PG Search, "); + if(user_ops->forward_scan) + printf("Forward Scan, "); + if(user_ops->backward_scan) + printf("Backward Scan, "); + if(user_ops->title_menu_call) + printf("Title Menu Call, "); + if(user_ops->root_menu_call) + printf("Root Menu Call, "); + if(user_ops->subpic_menu_call) + printf("SubPic Menu Call, "); + if(user_ops->audio_menu_call) + printf("Audio Menu Call, "); + if(user_ops->angle_menu_call) + printf("Angle Menu Call, "); + if(user_ops->chapter_menu_call) + printf("Chapter Menu Call, "); + if(user_ops->resume) + printf("Resume, "); + if(user_ops->button_select_or_activate) + printf("Button Select or Activate, "); + if(user_ops->still_off) + printf("Still Off, "); + if(user_ops->pause_on) + printf("Pause On, "); + if(user_ops->audio_stream_change) + printf("Audio Stream Change, "); + if(user_ops->subpic_stream_change) + printf("SubPic Stream Change, "); + if(user_ops->angle_change) + printf("Angle Change, "); + if(user_ops->karaoke_audio_pres_mode_change) + printf("Karaoke Audio Pres Mode Change, "); + if(user_ops->video_pres_mode_change) + printf("Video Pres Mode Change, "); + printf("\n"); + } +} + + +void ifo_print_VMGI_MAT(vmgi_mat_t *vmgi_mat) { + + printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier); + printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector); + printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector); + printf("Specification version number: %01x.%01x\n", + vmgi_mat->specification_version >> 4, + vmgi_mat->specification_version & 0xf); + /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */ + printf("VMG Category: %08x (Region Code=%02x)\n", vmgi_mat->vmg_category, ((vmgi_mat->vmg_category >> 16) & 0xff) ^0xff); + printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes); + printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr); + printf("Disc side %i\n", vmgi_mat->disc_side); + printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets); + printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier); + printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32)); + printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code); + printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte); + printf("Start byte of First Play PGC (FP PGC): %08x\n", + vmgi_mat->first_play_pgc); + printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs); + printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt); + printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut); + printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait); + printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt); + printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi); + printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt); + printf("Start sector of VMGM_VOBU_ADMAP: %08x\n", + vmgi_mat->vmgm_vobu_admap); + printf("Video attributes of VMGM_VOBS: "); + ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr); + printf("\n"); + printf("VMGM Number of Audio attributes: %i\n", + vmgi_mat->nr_of_vmgm_audio_streams); + if(vmgi_mat->nr_of_vmgm_audio_streams > 0) { + printf("\tstream %i status: ", 1); + ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr); + printf("\n"); + } + printf("VMGM Number of Sub-picture attributes: %i\n", + vmgi_mat->nr_of_vmgm_subp_streams); + if(vmgi_mat->nr_of_vmgm_subp_streams > 0) { + printf("\tstream %2i status: ", 1); + ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr); + printf("\n"); + } +} + + +void ifo_print_VTSI_MAT(vtsi_mat_t *vtsi_mat) { + int i; + + printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier); + printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector); + printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector); + printf("Specification version number: %01x.%01x\n", + vtsi_mat->specification_version>>4, + vtsi_mat->specification_version&0xf); + printf("VTS Category: %08x\n", vtsi_mat->vts_category); + printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte); + printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs); + printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs); + printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt); + printf("Start sector of VTS_PGCIT: %08x\n", vtsi_mat->vts_pgcit); + printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut); + printf("Start sector of VTS_TMAPT: %08x\n", vtsi_mat->vts_tmapt); + printf("Start sector of VTSM_C_ADT: %08x\n", vtsi_mat->vtsm_c_adt); + printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_admap); + printf("Start sector of VTS_C_ADT: %08x\n", vtsi_mat->vts_c_adt); + printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_admap); + + printf("Video attributes of VTSM_VOBS: "); + ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr); + printf("\n"); + + printf("VTSM Number of Audio attributes: %i\n", + vtsi_mat->nr_of_vtsm_audio_streams); + if(vtsi_mat->nr_of_vtsm_audio_streams > 0) { + printf("\tstream %i status: ", 1); + ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr); + printf("\n"); + } + + printf("VTSM Number of Sub-picture attributes: %i\n", + vtsi_mat->nr_of_vtsm_subp_streams); + if(vtsi_mat->nr_of_vtsm_subp_streams > 0) { + printf("\tstream %2i status: ", 1); + ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr); + printf("\n"); + } + + printf("Video attributes of VTS_VOBS: "); + ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr); + printf("\n"); + + printf("VTS Number of Audio attributes: %i\n", + vtsi_mat->nr_of_vts_audio_streams); + for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) { + printf("\tstream %i status: ", i); + ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]); + printf("\n"); + } + + printf("VTS Number of Subpicture attributes: %i\n", + vtsi_mat->nr_of_vts_subp_streams); + for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) { + printf("\tstream %2i status: ", i); + ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]); + printf("\n"); + } +} + + +static void ifo_print_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) { + int i; + + if(cmd_tbl == NULL) { + printf("No Command table present\n"); + return; + } + + printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre); + for(i = 0; i < cmd_tbl->nr_of_pre; i++) { + ifo_print_cmd(i, &cmd_tbl->pre_cmds[i]); + } + + printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post); + for(i = 0; i < cmd_tbl->nr_of_post; i++) { + ifo_print_cmd(i, &cmd_tbl->post_cmds[i]); + } + + printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell); + for(i = 0; i < cmd_tbl->nr_of_cell; i++) { + ifo_print_cmd(i, &cmd_tbl->cell_cmds[i]); + } +} + + +static void ifo_print_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int nr) { + int i; + + if(program_map == NULL) { + printf("No Program map present\n"); + return; + } + + for(i = 0; i < nr; i++) { + printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]); + } +} + + +static void ifo_print_CELL_PLAYBACK(cell_playback_t *cell_playback, int nr) { + int i; + + if(cell_playback == NULL) { + printf("No Cell Playback info present\n"); + return; + } + + for(i=0;inr_of_programs); + printf("Number of Cells: %i\n", pgc->nr_of_cells); + /* Check that time is 0:0:0:0 also if nr_of_programs==0 */ + printf("Playback time: "); + dvdread_print_time(&pgc->playback_time); printf("\n"); + + /* If no programs/no time then does this mean anything? */ + printf("Prohibited user operations: "); + ifo_print_USER_OPS(&pgc->prohibited_ops); + + for(i = 0; i < 8; i++) { + if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */ + printf("Audio stream %i control: %04x\n", + i, pgc->audio_control[i]); + } + } + + for(i = 0; i < 32; i++) { + if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */ + printf("Subpicture stream %2i control: %08x: 4:3=%d, Wide=%d, Letterbox=%d, Pan-Scan=%d\n", + i, pgc->subp_control[i], + (pgc->subp_control[i] >>24) & 0x1f, + (pgc->subp_control[i] >>16) & 0x1f, + (pgc->subp_control[i] >>8) & 0x1f, + (pgc->subp_control[i] ) & 0x1f); + } + } + + printf("Next PGC number: %i\n", pgc->next_pgc_nr); + printf("Prev PGC number: %i\n", pgc->prev_pgc_nr); + printf("GoUp PGC number: %i\n", pgc->goup_pgc_nr); + if(pgc->nr_of_programs != 0) { + printf("Still time: %i seconds (255=inf)\n", pgc->still_time); + printf("PG Playback mode %02x\n", pgc->pg_playback_mode); + } + + if(pgc->nr_of_programs != 0) { + for(i = 0; i < 16; i++) { + printf("Color %2i: %08x\n", i, pgc->palette[i]); + } + } + + /* Memmory offsets to div. tables. */ + ifo_print_PGC_COMMAND_TBL(pgc->command_tbl); + ifo_print_PGC_PROGRAM_MAP(pgc->program_map, pgc->nr_of_programs); + ifo_print_CELL_PLAYBACK(pgc->cell_playback, pgc->nr_of_cells); + ifo_print_CELL_POSITION(pgc->cell_position, pgc->nr_of_cells); +} + + +void ifo_print_TT_SRPT(tt_srpt_t *tt_srpt) { + int i; + + printf("Number of TitleTrack search pointers: %i\n", + tt_srpt->nr_of_srpts); + for(i=0;inr_of_srpts;i++) { + printf("Title Track index %i\n", i + 1); + printf("\tTitle set number (VTS): %i", + tt_srpt->title[i].title_set_nr); + printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn); + printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts); + printf("\tNumber of angles: %i\n", + tt_srpt->title[i].nr_of_angles); + + printf("\tTitle playback type: (%02x)\n", + *(uint8_t *)&(tt_srpt->title[i].pb_ty)); + printf("\t\t%s\n", + tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ? "Random or Shuffle" : "Sequencial"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd) printf("\t\tJump/Link/Call exists in cell cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd) printf("\t\tJump/Link/Call exists in pre/post cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd) printf("\t\tJump/Link/Call exists in button cmd\n"); + if (tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom) printf("\t\tJump/Link/Call exists in tt_dom cmd\n"); + printf("\t\tTitle or time play:%d\n", tt_srpt->title[i].pb_ty.title_or_time_play); + printf("\t\tChapter search or play:%d\n", tt_srpt->title[i].pb_ty.chapter_search_or_play); + + printf("\tParental ID field: %04x\n", + tt_srpt->title[i].parental_id); + printf("\tTitle set starting sector %08x\n", + tt_srpt->title[i].title_set_sector); + } +} + + +void ifo_print_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) { + int i, j; + printf(" nr_of_srpts %i last byte %i\n", + vts_ptt_srpt->nr_of_srpts, + vts_ptt_srpt->last_byte); + for(i=0;inr_of_srpts;i++) { + for(j=0;jtitle[i].nr_of_ptts;j++) { + printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n", + i + 1, j + 1, + vts_ptt_srpt->title[i].ptt[j].pgcn, + vts_ptt_srpt->title[i].ptt[j].pgn ); + } + } +} + + +static void hexdump(uint8_t *ptr, int len) { + while(len--) + printf("%02x ", *ptr++); +} + +void ifo_print_PTL_MAIT(ptl_mait_t *ptl_mait) { + int i, j; + + printf("Number of Countries: %i\n", ptl_mait->nr_of_countries); + printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss); + //printf("Last byte: %i\n", ptl_mait->last_byte); + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + printf("Country code: %c%c\n", + ptl_mait->countries[i].country_code >> 8, + ptl_mait->countries[i].country_code & 0xff); + /* + printf("Start byte: %04x %i\n", + ptl_mait->countries[i].pf_ptl_mai_start_byte, + ptl_mait->countries[i].pf_ptl_mai_start_byte); + */ + /* This seems to be pointing at a array with 8 2byte fields per VTS + ? and one extra for the menu? always an odd number of VTSs on + all the dics I tested so it might be padding to even also. + If it is for the menu it probably the first entry. */ + for(j=0;j<8;j++) { + hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE + + ptl_mait->countries[i].pf_ptl_mai_start_byte + + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2); + printf("\n"); + } + } +} + +void ifo_print_VTS_TMAPT(vts_tmapt_t *vts_tmapt) { + unsigned int timeunit; + int i, j; + + printf("Number of VTS_TMAPS: %i\n", vts_tmapt->nr_of_tmaps); + printf("Last byte: %i\n", vts_tmapt->last_byte); + + for(i = 0; i < vts_tmapt->nr_of_tmaps; i++) { + printf("TMAP %i (number matches title PGC number.)\n", i + 1); + printf(" offset %d relative to VTS_TMAPTI\n", vts_tmapt->tmap_offset[i]); + printf(" Time unit (seconds): %i\n", vts_tmapt->tmap[i].tmu); + printf(" Number of entries: %i\n", vts_tmapt->tmap[i].nr_of_entries); + timeunit = vts_tmapt->tmap[i].tmu; + for(j = 0; j < vts_tmapt->tmap[i].nr_of_entries; j++) { + unsigned int ac_time = timeunit * (j + 1); + printf("Time: %2i:%02i:%02i VOBU Sector: 0x%08x %s\n", + ac_time / (60 * 60), (ac_time / 60) % 60, ac_time % 60, + vts_tmapt->tmap[i].map_ent[j] & 0x7fffffff, + (vts_tmapt->tmap[i].map_ent[j] >> 31) ? "discontinuity" : ""); + } + } +} + +void ifo_print_C_ADT(c_adt_t *c_adt) { + int i, entries; + + printf("Number of VOBs in this VOBS: %i\n", c_adt->nr_of_vobs); + //entries = c_adt->nr_of_vobs; + entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t); + + for(i = 0; i < entries; i++) { + printf("VOB ID: %3i, Cell ID: %3i ", + c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id); + printf("Sector (first): 0x%08x (last): 0x%08x\n", + c_adt->cell_adr_table[i].start_sector, + c_adt->cell_adr_table[i].last_sector); + } +} + + +void ifo_print_VOBU_ADMAP(vobu_admap_t *vobu_admap) { + int i, entries; + + entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4; + for(i = 0; i < entries; i++) { + printf("VOBU %5i First sector: 0x%08x\n", i + 1, + vobu_admap->vobu_start_sectors[i]); + } +} + +const char *ifo_print_menu_name(int type) { + const char *menu_name; + menu_name=""; + switch (type) { + case 2: + menu_name="Title"; + break; + case 3: + menu_name = "Root"; + break; + case 4: + menu_name = "Sub-Picture"; + break; + case 5: + menu_name = "Audio"; + break; + case 6: + menu_name = "Angle"; + break; + case 7: + menu_name = "PTT (Chapter)"; + break; + default: + menu_name = "Unknown"; + break; + } + return &menu_name[0]; +} + +/* pgc_type=1 for menu, 0 for title. */ +void ifo_print_PGCIT(pgcit_t *pgcit, int pgc_type) { + int i; + + printf("\nNumber of Program Chains: %3i\n", pgcit->nr_of_pgci_srp); + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { + printf("\nProgram (PGC): %3i\n", i + 1); + if (pgc_type) { + printf("PGC Category: Entry PGC %d, Menu Type=0x%02x:%s (Entry id 0x%02x), ", + pgcit->pgci_srp[i].entry_id >> 7, + pgcit->pgci_srp[i].entry_id & 0xf, + ifo_print_menu_name(pgcit->pgci_srp[i].entry_id & 0xf), + pgcit->pgci_srp[i].entry_id); + } else { + printf("PGC Category: %s VTS_TTN:0x%02x (Entry id 0x%02x), ", + pgcit->pgci_srp[i].entry_id >> 7 ? "At Start of" : "During", + pgcit->pgci_srp[i].entry_id & 0xf, + pgcit->pgci_srp[i].entry_id); + } + printf("Parental ID mask 0x%04x\n", pgcit->pgci_srp[i].ptl_id_mask); + ifo_print_PGC(pgcit->pgci_srp[i].pgc); + } +} + + +void ifo_print_PGCI_UT(pgci_ut_t *pgci_ut) { + int i, menu; + + printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus); + for(i = 0; i < pgci_ut->nr_of_lus; i++) { + printf("\nMenu Language Unit %d\n", i+1); + printf("\nMenu Language Code: %c%c\n", + pgci_ut->lu[i].lang_code >> 8, + pgci_ut->lu[i].lang_code & 0xff); + + menu = pgci_ut->lu[i].exists; + printf("Menu Existence: %02x: ", menu); + if (menu == 0) { + printf("No menus "); + } + if (menu & 0x80) { + printf("Root "); + menu^=0x80; + } + if (menu & 0x40) { + printf("Sub-Picture "); + menu^=0x40; + } + if (menu & 0x20) { + printf("Audio "); + menu^=0x20; + } + if (menu & 0x10) { + printf("Angle "); + menu^=0x10; + } + if (menu & 0x08) { + printf("PTT "); + menu^=0x08; + } + if (menu > 0) { + printf("Unknown extra menus "); + menu^=0x08; + } + printf("\n"); + ifo_print_PGCIT(pgci_ut->lu[i].pgcit, 1); + } +} + + +static void ifo_print_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) { + int i; + + printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat); + + printf("Video attributes of VTSM_VOBS: "); + ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr); + printf("\n"); + printf("Number of Audio streams: %i\n", + vts_attributes->nr_of_vtsm_audio_streams); + if(vts_attributes->nr_of_vtsm_audio_streams > 0) { + printf("\tstream %i attributes: ", 1); + ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr); + printf("\n"); + } + printf("Number of Subpicture streams: %i\n", + vts_attributes->nr_of_vtsm_subp_streams); + if(vts_attributes->nr_of_vtsm_subp_streams > 0) { + printf("\tstream %2i attributes: ", 1); + ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr); + printf("\n"); + } + + printf("Video attributes of VTSTT_VOBS: "); + ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr); + printf("\n"); + printf("Number of Audio streams: %i\n", + vts_attributes->nr_of_vtstt_audio_streams); + for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) { + printf("\tstream %i attributes: ", i); + ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]); + printf("\n"); + } + + printf("Number of Subpicture streams: %i\n", + vts_attributes->nr_of_vtstt_subp_streams); + for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) { + printf("\tstream %2i attributes: ", i); + ifo_print_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]); + printf("\n"); + } +} + + +void ifo_print_VTS_ATRT(vts_atrt_t *vts_atrt) { + int i; + + printf("Number of Video Title Sets: %3i\n", vts_atrt->nr_of_vtss); + for(i = 0; i < vts_atrt->nr_of_vtss; i++) { + printf("\nVideo Title Set %i\n", i + 1); + ifo_print_VTS_ATTRIBUTES(&vts_atrt->vts[i]); + } +} + + +void ifo_print(dvd_reader_t *dvd, int title) { + ifo_handle_t *ifohandle; + printf("Local ifo_print\n"); + ifohandle = ifoOpen(dvd, title); + if(!ifohandle) { + fprintf(stderr, "Can't open info file for title %d\n", title); + return; + } + + + if(ifohandle->vmgi_mat) { + + printf("VMG top level\n-------------\n"); + ifo_print_VMGI_MAT(ifohandle->vmgi_mat); + + printf("\nFirst Play PGC\n--------------\n"); + if(ifohandle->first_play_pgc) + ifo_print_PGC(ifohandle->first_play_pgc); + else + printf("No First Play PGC present\n"); + + printf("\nTitle Track search pointer table\n"); + printf( "------------------------------------------------\n"); + ifo_print_TT_SRPT(ifohandle->tt_srpt); + + printf("\nMenu PGCI Unit table\n"); + printf( "--------------------\n"); + if(ifohandle->pgci_ut) { + ifo_print_PGCI_UT(ifohandle->pgci_ut); + } else { + printf("No PGCI Unit table present\n"); + } + + printf("\nParental Manegment Information table\n"); + printf( "------------------------------------\n"); + if(ifohandle->ptl_mait) { + ifo_print_PTL_MAIT(ifohandle->ptl_mait); + } else { + printf("No Parental Management Information present\n"); + } + + printf("\nVideo Title Set Attribute Table\n"); + printf( "-------------------------------\n"); + ifo_print_VTS_ATRT(ifohandle->vts_atrt); + + printf("\nText Data Manager Information\n"); + printf( "-----------------------------\n"); + if(ifohandle->txtdt_mgi) { + //ifo_print_TXTDT_MGI(&(vmgi->txtdt_mgi)); + } else { + printf("No Text Data Manager Information present\n"); + } + + printf("\nMenu Cell Adress table\n"); + printf( "-----------------\n"); + if(ifohandle->menu_c_adt) { + ifo_print_C_ADT(ifohandle->menu_c_adt); + } else { + printf("No Menu Cell Adress table present\n"); + } + + printf("\nVideo Manager Menu VOBU address map\n"); + printf( "-----------------\n"); + if(ifohandle->menu_vobu_admap) { + ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); + } else { + printf("No Menu VOBU address map present\n"); + } + } + + + if(ifohandle->vtsi_mat) { + + printf("VTS top level\n-------------\n"); + ifo_print_VTSI_MAT(ifohandle->vtsi_mat); + + printf("\nPart of Title Track search pointer table\n"); + printf( "----------------------------------------------\n"); + ifo_print_VTS_PTT_SRPT(ifohandle->vts_ptt_srpt); + + printf("\nPGCI Unit table\n"); + printf( "--------------------\n"); + ifo_print_PGCIT(ifohandle->vts_pgcit, 0); + + printf("\nMenu PGCI Unit table\n"); + printf( "--------------------\n"); + if(ifohandle->pgci_ut) { + ifo_print_PGCI_UT(ifohandle->pgci_ut); + } else { + printf("No Menu PGCI Unit table present\n"); + } + + printf("\nVTS Time Map table\n"); + printf( "-----------------\n"); + if(ifohandle->vts_tmapt) { + ifo_print_VTS_TMAPT(ifohandle->vts_tmapt); + } else { + printf("No VTS Time Map table present\n"); + } + + printf("\nMenu Cell Adress table\n"); + printf( "-----------------\n"); + if(ifohandle->menu_c_adt) { + ifo_print_C_ADT(ifohandle->menu_c_adt); + } else { + printf("No Cell Adress table present\n"); + } + + printf("\nVideo Title Set Menu VOBU address map\n"); + printf( "-----------------\n"); + if(ifohandle->menu_vobu_admap) { + ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); + } else { + printf("No Menu VOBU address map present\n"); + } + + printf("\nCell Adress table\n"); + printf( "-----------------\n"); + ifo_print_C_ADT(ifohandle->vts_c_adt); + + printf("\nVideo Title Set VOBU address map\n"); + printf( "-----------------\n"); + ifo_print_VOBU_ADMAP(ifohandle->vts_vobu_admap); + } + + ifoClose(ifohandle); +} + +/* + * $Log$ + * Revision 1.3 2004/10/22 11:36:19 jcdutton + * Stop seg fault when using ifo_dump. + * + * Revision 1.2 2004/09/27 12:24:01 jcdutton + * Add extra info to printout when using ifo_dump. + * + * Revision 1.1 2004/01/11 21:43:13 mroi + * big build system changes + * * cleaned up all Makefiles and added a Makefile.common + * * added relchk script + * * moved libdvdread files to a dvdread subdir + * * moved DVD VM to a vm subdir + * * removed unused code in read_cache.c + * + * Revision 1.4 2004/01/01 15:13:13 jcdutton + * Put ifo_print.c and .h back in. + * + * Revision 1.7 2003/04/28 15:17:17 jcdutton + * Update ifodump to work with new libdvdnav cvs, instead of needing libdvdread. + * + * Revision 1.6 2003/04/05 22:49:04 jcdutton + * Update with more info from the latest libdvdread. + * + * Revision 1.5 2003/04/05 13:03:49 jcdutton + * Small updates. + * + * Revision 1.4 2003/04/01 08:01:03 jcdutton + * Add VTS Time map display. Requires libdvdread 0.9.4. The same version that comes with xine. + * + * Revision 1.3 2003/03/14 15:49:18 mroi + * adjust to new libdvdread version + * + * Revision 1.2 2002/08/30 05:12:33 jcdutton + * Minor update now that I know what PGC Entry IDs are for. + * + * Revision 1.1.1.1 2002/08/28 09:48:35 jcdutton + * Initial import into CVS. + * + * + * + */ + diff -Nru k9copy-2.1.0/src/dvdreadnew/ifo_print.h k9copy-2.2.0/src/dvdreadnew/ifo_print.h --- k9copy-2.1.0/src/dvdreadnew/ifo_print.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/ifo_print.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * $Id: ifo_print.h 1135 2008-09-06 21:55:51Z rathann $ + * + */ + +#ifndef IFO_PRINT_H_INCLUDED +#define IFO_PRINT_H_INCLUDED + +#include +#include "ifo_types.h" + +void ifo_print(dvd_reader_t *dvd, int title); +void dvdread_print_time(dvd_time_t *dtime); + +#endif /* IFO_PRINT_H_INCLUDED */ + +/* + * $Log$ + * Revision 1.1 2004/01/11 21:43:13 mroi + * big build system changes + * * cleaned up all Makefiles and added a Makefile.common + * * added relchk script + * * moved libdvdread files to a dvdread subdir + * * moved DVD VM to a vm subdir + * * removed unused code in read_cache.c + * + * Revision 1.4 2004/01/01 15:13:13 jcdutton + * Put ifo_print.c and .h back in. + * + * Revision 1.2 2003/04/28 15:17:17 jcdutton + * Update ifodump to work with new libdvdnav cvs, instead of needing libdvdread. + * + * Revision 1.1.1.1 2002/08/28 09:48:35 jcdutton + * Initial import into CVS. + * + * + * + */ + diff -Nru k9copy-2.1.0/src/dvdreadnew/ifo_read.c k9copy-2.2.0/src/dvdreadnew/ifo_read.c --- k9copy-2.1.0/src/dvdreadnew/ifo_read.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/ifo_read.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,2181 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + * Copyright (C) 2000, 2001, 2002, 2003 + * Bj�rn Englund , + * H�kan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include + +#if defined(HAVE_INTTYPES_H) +#include +#elif defined(HAVE_STDINT_H) +#include +#endif + +#include +#include + +#include "bswap.h" +#include "ifo_types.h" +#include "ifo_read.h" +#include "dvd_reader.h" +#include "dvdread_internal.h" + +#ifndef DVD_BLOCK_LEN +#define DVD_BLOCK_LEN 2048 +#endif + +#ifndef NDEBUG +#define CHECK_ZERO0(arg) \ + if(arg != 0) { \ + fprintf(stderr, "*** Zero check failed in %s:%i\n for %s = 0x%x\n", \ + __FILE__, __LINE__, # arg, arg); \ + } +#define CHECK_ZERO(arg) \ + if(memcmp(my_friendly_zeros, &arg, sizeof(arg))) { \ + unsigned int i_CZ; \ + fprintf(stderr, "*** Zero check failed in %s:%i\n for %s = 0x", \ + __FILE__, __LINE__, # arg ); \ + for(i_CZ = 0; i_CZ < sizeof(arg); i_CZ++) \ + fprintf(stderr, "%02x", *((uint8_t *)&arg + i_CZ)); \ + fprintf(stderr, "\n"); \ + } +static const uint8_t my_friendly_zeros[2048]; +#else +#define CHECK_ZERO0(arg) (void)(arg) +#define CHECK_ZERO(arg) (void)(arg) +#endif + + +/* Prototypes for internal functions */ +static int ifoRead_VMG(ifo_handle_t *ifofile); +static int ifoRead_VTS(ifo_handle_t *ifofile); +static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset); +static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile, + pgc_command_tbl_t *cmd_tbl, + unsigned int offset); +static int ifoRead_PGC_PROGRAM_MAP(ifo_handle_t *ifofile, + pgc_program_map_t *program_map, + unsigned int nr, unsigned int offset); +static int ifoRead_CELL_PLAYBACK_TBL(ifo_handle_t *ifofile, + cell_playback_t *cell_playback, + unsigned int nr, unsigned int offset); +static int ifoRead_CELL_POSITION_TBL(ifo_handle_t *ifofile, + cell_position_t *cell_position, + unsigned int nr, unsigned int offset); +static int ifoRead_VTS_ATTRIBUTES(ifo_handle_t *ifofile, + vts_attributes_t *vts_attributes, + unsigned int offset); +static int ifoRead_C_ADT_internal(ifo_handle_t *ifofile, c_adt_t *c_adt, + unsigned int sector); +static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile, + vobu_admap_t *vobu_admap, + unsigned int sector); +static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, + unsigned int offset); + +static void ifoFree_PGC(pgc_t *pgc); +static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl); +static void ifoFree_PGCIT_internal(pgcit_t *pgcit); + +static ifo_handle_t *ifoOpen_File(ifo_handle_t *ifofile, int title, + char *suffix); +static ifo_handle_t *ifoOpenVMGI_File(ifo_handle_t *ifofile, char *suffix); +static ifo_handle_t *ifoOpenVTSI_File(ifo_handle_t *ifofile, int title, + char *suffix); + +static int DVDFileSeek_( dvd_file_t *dvd_file, uint32_t offset ) { + return (DVDFileSeek(dvd_file, (int)offset) == (int)offset); +} + + +ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) { + ifo_handle_t *ifofile; + + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + ifofile->file = DVDOpenFile(dvd, title, DVD_READ_INFO_FILE); + if(!ifoOpen_File(ifofile, title, "IFO")) { + if(title) { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", + title, "IFO"); + } + } else { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.%s.\n", "IFO"); + } + } + /* lower functions free the pointer, reallocate */ + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + ifofile->file = DVDOpenFile(dvd, title, DVD_READ_INFO_BACKUP_FILE); + if(!ifoOpen_File(ifofile, title, "BUP")) { + if(title) { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", + title, "BUP"); + } + } else { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.%s.\n", "BUP"); + } + } + return NULL; + } + } + return ifofile; +} + +static ifo_handle_t *ifoOpen_File(ifo_handle_t *ifofile, int title, + char *suffix) { + if(!ifofile->file) { + free(ifofile); + return NULL; + } + + /* First check if this is a VMGI file. */ + if(ifoRead_VMG(ifofile)) { + + /* These are both mandatory. */ + if(!ifoRead_FP_PGC(ifofile) || !ifoRead_TT_SRPT(ifofile)) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s).\n", + suffix); + } + ifoClose(ifofile); + return NULL; + } + + ifoRead_PGCI_UT(ifofile); + ifoRead_PTL_MAIT(ifofile); + + /* This is also mandatory. */ + if(!ifoRead_VTS_ATRT(ifofile)) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s).\n", + suffix); + } + ifoClose(ifofile); + return NULL; + } + + ifoRead_TXTDT_MGI(ifofile); + ifoRead_C_ADT(ifofile); + ifoRead_VOBU_ADMAP(ifofile); + + return ifofile; + } + + if(ifoRead_VTS(ifofile)) { + + if(!ifoRead_VTS_PTT_SRPT(ifofile) || !ifoRead_PGCIT(ifofile)) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.%s).\n", + title, suffix); + } + ifoClose(ifofile); + return NULL; + } + + ifoRead_PGCI_UT(ifofile); + ifoRead_VTS_TMAPT(ifofile); + ifoRead_C_ADT(ifofile); + ifoRead_VOBU_ADMAP(ifofile); + + if(!ifoRead_TITLE_C_ADT(ifofile) || !ifoRead_TITLE_VOBU_ADMAP(ifofile)) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.%s).\n", + title, suffix); + } + ifoClose(ifofile); + return NULL; + } + + return ifofile; + } + + if(title) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid IFO for title %d (VTS_%02d_0.%s).\n", + title, title, suffix); + } + } else { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid IFO for VMGM (VIDEO_TS.%s).\n", + suffix); + } + } + ifoClose(ifofile); + return NULL; +} + + +ifo_handle_t *ifoOpenVMGI(dvd_reader_t *dvd) { + ifo_handle_t *ifofile; + + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + ifofile->file = DVDOpenFile(dvd, 0, DVD_READ_INFO_FILE); + if(!ifoOpenVMGI_File(ifofile, "IFO")) { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.IFO: %s\n", + strerror(errno)); + } + + /* lower functions free the pointer, reallocate */ + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + ifofile->file = DVDOpenFile(dvd, 0, DVD_READ_INFO_BACKUP_FILE); + if(!ifoOpenVMGI_File(ifofile, "BUP")) + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.BUP: %s\n", + strerror(errno)); + } + return NULL; + } + return ifofile; +} + +static ifo_handle_t *ifoOpenVMGI_File(ifo_handle_t *ifofile, char *suffix) { + if(!ifofile->file) { + free(ifofile); + return NULL; + } + + if(ifoRead_VMG(ifofile)) + return ifofile; + + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s).\n", + suffix); + } + ifoClose(ifofile); + return NULL; +} + + +ifo_handle_t *ifoOpenVTSI(dvd_reader_t *dvd, int title) { + ifo_handle_t *ifofile; + + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + if(title <= 0 || title > 99) { + if(dvdread_verbose(dvd) >= 0) { + fprintf(stderr, "libdvdread: ifoOpenVTSI invalid title (%d).\n", title); + } + free(ifofile); + errno = EINVAL; + return NULL; + } + + ifofile->file = DVDOpenFile(dvd, title, DVD_READ_INFO_FILE); + if(!ifoOpenVTSI_File(ifofile, title, "IFO")) { + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", title, "IFO"); + } + /* lower functions free the pointer, reallocate */ + ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); + if(!ifofile) + return NULL; + + memset(ifofile, 0, sizeof(ifo_handle_t)); + + ifofile->file = DVDOpenFile(dvd, title, DVD_READ_INFO_BACKUP_FILE); + if(!ifoOpenVTSI_File(ifofile, title, "BUP")) + if(dvdread_verbose(dvd) >= 1) { + fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", title, "BUP"); + } + return NULL; + } + return ifofile; +} + +static ifo_handle_t *ifoOpenVTSI_File(ifo_handle_t* ifofile, int title, char *suffix) { + if(!ifofile->file) { + free(ifofile); + return NULL; + } + + ifoRead_VTS(ifofile); + if(ifofile->vtsi_mat) + return ifofile; + + if(dvdread_verbose(device_of_file(ifofile->file)) >= 0) { + fprintf(stderr, "libdvdread: Invalid IFO for title %d (VTS_%02d_0.%s).\n", + title, title, suffix); + } + ifoClose(ifofile); + return NULL; +} + + +void ifoClose(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + ifoFree_VOBU_ADMAP(ifofile); + ifoFree_TITLE_VOBU_ADMAP(ifofile); + ifoFree_C_ADT(ifofile); + ifoFree_TITLE_C_ADT(ifofile); + ifoFree_TXTDT_MGI(ifofile); + ifoFree_VTS_ATRT(ifofile); + ifoFree_PTL_MAIT(ifofile); + ifoFree_PGCI_UT(ifofile); + ifoFree_TT_SRPT(ifofile); + ifoFree_FP_PGC(ifofile); + ifoFree_PGCIT(ifofile); + ifoFree_VTS_PTT_SRPT(ifofile); + ifoFree_VTS_TMAPT(ifofile); + + if(ifofile->vmgi_mat) + free(ifofile->vmgi_mat); + + if(ifofile->vtsi_mat) + free(ifofile->vtsi_mat); + + DVDCloseFile(ifofile->file); + ifofile->file = 0; + free(ifofile); + ifofile = 0; +} + + +static int ifoRead_VMG(ifo_handle_t *ifofile) { + vmgi_mat_t *vmgi_mat; + + vmgi_mat = (vmgi_mat_t *)malloc(sizeof(vmgi_mat_t)); + if(!vmgi_mat) + return 0; + + ifofile->vmgi_mat = vmgi_mat; + + if(!DVDFileSeek_(ifofile->file, 0)) { + free(ifofile->vmgi_mat); + ifofile->vmgi_mat = 0; + return 0; + } + + if(!DVDReadBytes(ifofile->file, vmgi_mat, sizeof(vmgi_mat_t))) { + free(ifofile->vmgi_mat); + ifofile->vmgi_mat = 0; + return 0; + } + + if(strncmp("DVDVIDEO-VMG", vmgi_mat->vmg_identifier, 12) != 0) { + free(ifofile->vmgi_mat); + ifofile->vmgi_mat = 0; + return 0; + } + + B2N_32(vmgi_mat->vmg_last_sector); + B2N_32(vmgi_mat->vmgi_last_sector); + B2N_32(vmgi_mat->vmg_category); + B2N_16(vmgi_mat->vmg_nr_of_volumes); + B2N_16(vmgi_mat->vmg_this_volume_nr); + B2N_16(vmgi_mat->vmg_nr_of_title_sets); + B2N_64(vmgi_mat->vmg_pos_code); + B2N_32(vmgi_mat->vmgi_last_byte); + B2N_32(vmgi_mat->first_play_pgc); + B2N_32(vmgi_mat->vmgm_vobs); + B2N_32(vmgi_mat->tt_srpt); + B2N_32(vmgi_mat->vmgm_pgci_ut); + B2N_32(vmgi_mat->ptl_mait); + B2N_32(vmgi_mat->vts_atrt); + B2N_32(vmgi_mat->txtdt_mgi); + B2N_32(vmgi_mat->vmgm_c_adt); + B2N_32(vmgi_mat->vmgm_vobu_admap); + B2N_16(vmgi_mat->vmgm_audio_attr.lang_code); + B2N_16(vmgi_mat->vmgm_subp_attr.lang_code); + + + CHECK_ZERO(vmgi_mat->zero_1); + CHECK_ZERO(vmgi_mat->zero_2); + CHECK_ZERO(vmgi_mat->zero_3); + CHECK_ZERO(vmgi_mat->zero_4); + CHECK_ZERO(vmgi_mat->zero_5); + CHECK_ZERO(vmgi_mat->zero_6); + CHECK_ZERO(vmgi_mat->zero_7); + CHECK_ZERO(vmgi_mat->zero_8); + CHECK_ZERO(vmgi_mat->zero_9); + CHECK_ZERO(vmgi_mat->zero_10); + CHECK_VALUE(vmgi_mat->vmg_last_sector != 0); + CHECK_VALUE(vmgi_mat->vmgi_last_sector != 0); + CHECK_VALUE(vmgi_mat->vmgi_last_sector * 2 <= vmgi_mat->vmg_last_sector); + CHECK_VALUE(vmgi_mat->vmgi_last_sector * 2 <= vmgi_mat->vmg_last_sector); + CHECK_VALUE(vmgi_mat->vmg_nr_of_volumes != 0); + CHECK_VALUE(vmgi_mat->vmg_this_volume_nr != 0); + CHECK_VALUE(vmgi_mat->vmg_this_volume_nr <= vmgi_mat->vmg_nr_of_volumes); + CHECK_VALUE(vmgi_mat->disc_side == 1 || vmgi_mat->disc_side == 2); + CHECK_VALUE(vmgi_mat->vmg_nr_of_title_sets != 0); + CHECK_VALUE(vmgi_mat->vmgi_last_byte >= 341); + CHECK_VALUE(vmgi_mat->vmgi_last_byte / DVD_BLOCK_LEN <= + vmgi_mat->vmgi_last_sector); + /* It seems that first_play_pgc is optional. */ + CHECK_VALUE(vmgi_mat->first_play_pgc < vmgi_mat->vmgi_last_byte); + CHECK_VALUE(vmgi_mat->vmgm_vobs == 0 || + (vmgi_mat->vmgm_vobs > vmgi_mat->vmgi_last_sector && + vmgi_mat->vmgm_vobs < vmgi_mat->vmg_last_sector)); + CHECK_VALUE(vmgi_mat->tt_srpt <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->vmgm_pgci_ut <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->ptl_mait <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->vts_atrt <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->txtdt_mgi <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->vmgm_c_adt <= vmgi_mat->vmgi_last_sector); + CHECK_VALUE(vmgi_mat->vmgm_vobu_admap <= vmgi_mat->vmgi_last_sector); + + CHECK_VALUE(vmgi_mat->nr_of_vmgm_audio_streams <= 1); + CHECK_VALUE(vmgi_mat->nr_of_vmgm_subp_streams <= 1); + + return 1; +} + + +static int ifoRead_VTS(ifo_handle_t *ifofile) { + vtsi_mat_t *vtsi_mat; + int i; + + vtsi_mat = (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t)); + if(!vtsi_mat) + return 0; + + ifofile->vtsi_mat = vtsi_mat; + + if(!DVDFileSeek_(ifofile->file, 0)) { + free(ifofile->vtsi_mat); + ifofile->vtsi_mat = 0; + return 0; + } + + if(!(DVDReadBytes(ifofile->file, vtsi_mat, sizeof(vtsi_mat_t)))) { + free(ifofile->vtsi_mat); + ifofile->vtsi_mat = 0; + return 0; + } + + if(strncmp("DVDVIDEO-VTS", vtsi_mat->vts_identifier, 12) != 0) { + free(ifofile->vtsi_mat); + ifofile->vtsi_mat = 0; + return 0; + } + + B2N_32(vtsi_mat->vts_last_sector); + B2N_32(vtsi_mat->vtsi_last_sector); + B2N_32(vtsi_mat->vts_category); + B2N_32(vtsi_mat->vtsi_last_byte); + B2N_32(vtsi_mat->vtsm_vobs); + B2N_32(vtsi_mat->vtstt_vobs); + B2N_32(vtsi_mat->vts_ptt_srpt); + B2N_32(vtsi_mat->vts_pgcit); + B2N_32(vtsi_mat->vtsm_pgci_ut); + B2N_32(vtsi_mat->vts_tmapt); + B2N_32(vtsi_mat->vtsm_c_adt); + B2N_32(vtsi_mat->vtsm_vobu_admap); + B2N_32(vtsi_mat->vts_c_adt); + B2N_32(vtsi_mat->vts_vobu_admap); + B2N_16(vtsi_mat->vtsm_audio_attr.lang_code); + B2N_16(vtsi_mat->vtsm_subp_attr.lang_code); + for(i = 0; i < 8; i++) + B2N_16(vtsi_mat->vts_audio_attr[i].lang_code); + for(i = 0; i < 32; i++) + B2N_16(vtsi_mat->vts_subp_attr[i].lang_code); + + + CHECK_ZERO(vtsi_mat->zero_1); + CHECK_ZERO(vtsi_mat->zero_2); + CHECK_ZERO(vtsi_mat->zero_3); + CHECK_ZERO(vtsi_mat->zero_4); + CHECK_ZERO(vtsi_mat->zero_5); + CHECK_ZERO(vtsi_mat->zero_6); + CHECK_ZERO(vtsi_mat->zero_7); + CHECK_ZERO(vtsi_mat->zero_8); + CHECK_ZERO(vtsi_mat->zero_9); + CHECK_ZERO(vtsi_mat->zero_10); + CHECK_ZERO(vtsi_mat->zero_11); + CHECK_ZERO(vtsi_mat->zero_12); + CHECK_ZERO(vtsi_mat->zero_13); + CHECK_ZERO(vtsi_mat->zero_14); + CHECK_ZERO(vtsi_mat->zero_15); + CHECK_ZERO(vtsi_mat->zero_16); + CHECK_ZERO(vtsi_mat->zero_17); + CHECK_ZERO(vtsi_mat->zero_18); + CHECK_ZERO(vtsi_mat->zero_19); + CHECK_ZERO(vtsi_mat->zero_20); + CHECK_ZERO(vtsi_mat->zero_21); + CHECK_VALUE(vtsi_mat->vtsi_last_sector*2 <= vtsi_mat->vts_last_sector); + CHECK_VALUE(vtsi_mat->vtsi_last_byte/DVD_BLOCK_LEN <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vtsm_vobs == 0 || + (vtsi_mat->vtsm_vobs > vtsi_mat->vtsi_last_sector && + vtsi_mat->vtsm_vobs < vtsi_mat->vts_last_sector)); + CHECK_VALUE(vtsi_mat->vtstt_vobs == 0 || + (vtsi_mat->vtstt_vobs > vtsi_mat->vtsi_last_sector && + vtsi_mat->vtstt_vobs < vtsi_mat->vts_last_sector)); + CHECK_VALUE(vtsi_mat->vts_ptt_srpt <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vts_pgcit <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vtsm_pgci_ut <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vts_tmapt <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vtsm_c_adt <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vtsm_vobu_admap <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vts_c_adt <= vtsi_mat->vtsi_last_sector); + CHECK_VALUE(vtsi_mat->vts_vobu_admap <= vtsi_mat->vtsi_last_sector); + + CHECK_VALUE(vtsi_mat->nr_of_vtsm_audio_streams <= 1); + CHECK_VALUE(vtsi_mat->nr_of_vtsm_subp_streams <= 1); + + CHECK_VALUE(vtsi_mat->nr_of_vts_audio_streams <= 8); + for(i = vtsi_mat->nr_of_vts_audio_streams; i < 8; i++) + CHECK_ZERO(vtsi_mat->vts_audio_attr[i]); + + CHECK_VALUE(vtsi_mat->nr_of_vts_subp_streams <= 32); + for(i = vtsi_mat->nr_of_vts_subp_streams; i < 32; i++) + CHECK_ZERO(vtsi_mat->vts_subp_attr[i]); + + for(i = 0; i < 8; i++) { + CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero1); + CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero2); + CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero3); + CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero4); + CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero5); + CHECK_ZERO(vtsi_mat->vts_mu_audio_attr[i].zero6); + } + + return 1; +} + + +static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile, + pgc_command_tbl_t *cmd_tbl, + unsigned int offset) { + unsigned int total; + + memset(cmd_tbl, 0, sizeof(pgc_command_tbl_t)); + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, cmd_tbl, PGC_COMMAND_TBL_SIZE))) + return 0; + + B2N_16(cmd_tbl->nr_of_pre); + B2N_16(cmd_tbl->nr_of_post); + B2N_16(cmd_tbl->nr_of_cell); + B2N_16(cmd_tbl->last_byte); + + total = cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_cell; + CHECK_VALUE(PGC_COMMAND_TBL_SIZE + total * COMMAND_DATA_SIZE + <= cmd_tbl->last_byte + 1U); + CHECK_VALUE(total <= 255); + + if(cmd_tbl->nr_of_pre != 0) { + unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE; + cmd_tbl->pre_cmds = (vm_cmd_t *)malloc(pre_cmds_size); + if(!cmd_tbl->pre_cmds) + return 0; + + if(!(DVDReadBytes(ifofile->file, cmd_tbl->pre_cmds, pre_cmds_size))) { + free(cmd_tbl->pre_cmds); + return 0; + } + } + + if(cmd_tbl->nr_of_post != 0) { + unsigned int post_cmds_size = cmd_tbl->nr_of_post * COMMAND_DATA_SIZE; + cmd_tbl->post_cmds = (vm_cmd_t *)malloc(post_cmds_size); + if(!cmd_tbl->post_cmds) { + if(cmd_tbl->pre_cmds) + free(cmd_tbl->pre_cmds); + return 0; + } + if(!(DVDReadBytes(ifofile->file, cmd_tbl->post_cmds, post_cmds_size))) { + if(cmd_tbl->pre_cmds) + free(cmd_tbl->pre_cmds); + free(cmd_tbl->post_cmds); + return 0; + } + } + + if(cmd_tbl->nr_of_cell != 0) { + unsigned int cell_cmds_size = cmd_tbl->nr_of_cell * COMMAND_DATA_SIZE; + cmd_tbl->cell_cmds = (vm_cmd_t *)malloc(cell_cmds_size); + if(!cmd_tbl->cell_cmds) { + if(cmd_tbl->pre_cmds) + free(cmd_tbl->pre_cmds); + if(cmd_tbl->post_cmds) + free(cmd_tbl->post_cmds); + return 0; + } + if(!(DVDReadBytes(ifofile->file, cmd_tbl->cell_cmds, cell_cmds_size))) { + if(cmd_tbl->pre_cmds) + free(cmd_tbl->pre_cmds); + if(cmd_tbl->post_cmds) + free(cmd_tbl->post_cmds); + free(cmd_tbl->cell_cmds); + return 0; + } + } + + /* + * Make a run over all the commands and see that we can interpret them all? + */ + return 1; +} + + +static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) { + if(cmd_tbl) { + if(cmd_tbl->nr_of_pre && cmd_tbl->pre_cmds) + free(cmd_tbl->pre_cmds); + if(cmd_tbl->nr_of_post && cmd_tbl->post_cmds) + free(cmd_tbl->post_cmds); + if(cmd_tbl->nr_of_cell && cmd_tbl->cell_cmds) + free(cmd_tbl->cell_cmds); + free(cmd_tbl); + } +} + +static int ifoRead_PGC_PROGRAM_MAP(ifo_handle_t *ifofile, + pgc_program_map_t *program_map, + unsigned int nr, unsigned int offset) { + unsigned int size = nr * sizeof(pgc_program_map_t); + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, program_map, size))) + return 0; + + return 1; +} + +static int ifoRead_CELL_PLAYBACK_TBL(ifo_handle_t *ifofile, + cell_playback_t *cell_playback, + unsigned int nr, unsigned int offset) { + unsigned int i; + unsigned int size = nr * sizeof(cell_playback_t); + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, cell_playback, size))) + return 0; + + for(i = 0; i < nr; i++) { + B2N_32(cell_playback[i].first_sector); + B2N_32(cell_playback[i].first_ilvu_end_sector); + B2N_32(cell_playback[i].last_vobu_start_sector); + B2N_32(cell_playback[i].last_sector); + + /* Changed < to <= because this was false in the movie 'Pi'. */ + CHECK_VALUE(cell_playback[i].last_vobu_start_sector <= + cell_playback[i].last_sector); + CHECK_VALUE(cell_playback[i].first_sector <= + cell_playback[i].last_vobu_start_sector); + } + + return 1; +} + + +static int ifoRead_CELL_POSITION_TBL(ifo_handle_t *ifofile, + cell_position_t *cell_position, + unsigned int nr, unsigned int offset) { + unsigned int i; + unsigned int size = nr * sizeof(cell_position_t); + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, cell_position, size))) + return 0; + + for(i = 0; i < nr; i++) { + B2N_16(cell_position[i].vob_id_nr); + CHECK_ZERO(cell_position[i].zero_1); + } + + return 1; +} + +static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) { + unsigned int i; + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, pgc, PGC_SIZE))) + return 0; + + B2N_16(pgc->next_pgc_nr); + B2N_16(pgc->prev_pgc_nr); + B2N_16(pgc->goup_pgc_nr); + B2N_16(pgc->command_tbl_offset); + B2N_16(pgc->program_map_offset); + B2N_16(pgc->cell_playback_offset); + B2N_16(pgc->cell_position_offset); + + for(i = 0; i < 8; i++) + B2N_16(pgc->audio_control[i]); + for(i = 0; i < 32; i++) + B2N_32(pgc->subp_control[i]); + for(i = 0; i < 16; i++) + B2N_32(pgc->palette[i]); + + CHECK_ZERO(pgc->zero_1); + CHECK_VALUE(pgc->nr_of_programs <= pgc->nr_of_cells); + + /* verify time (look at print_time) */ + for(i = 0; i < 8; i++) + if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */ + CHECK_ZERO(pgc->audio_control[i]); + for(i = 0; i < 32; i++) + if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */ + CHECK_ZERO(pgc->subp_control[i]); + + /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */ + if(pgc->nr_of_programs == 0) { + CHECK_ZERO(pgc->still_time); + CHECK_ZERO(pgc->pg_playback_mode); /* ??*/ + CHECK_VALUE(pgc->program_map_offset == 0); + CHECK_VALUE(pgc->cell_playback_offset == 0); + CHECK_VALUE(pgc->cell_position_offset == 0); + } else { + CHECK_VALUE(pgc->program_map_offset != 0); + CHECK_VALUE(pgc->cell_playback_offset != 0); + CHECK_VALUE(pgc->cell_position_offset != 0); + } + + if(pgc->command_tbl_offset != 0) { + pgc->command_tbl = malloc(sizeof(pgc_command_tbl_t)); + if(!pgc->command_tbl) + return 0; + + if(!ifoRead_PGC_COMMAND_TBL(ifofile, pgc->command_tbl, + offset + pgc->command_tbl_offset)) { + free(pgc->command_tbl); + return 0; + } + } else { + pgc->command_tbl = NULL; + } + + if(pgc->program_map_offset != 0) { + if(pgc->nr_of_programs != 0) { + + pgc->program_map = malloc(pgc->nr_of_programs * sizeof(pgc_program_map_t)); + if(!pgc->program_map) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + return 0; + } + if(!ifoRead_PGC_PROGRAM_MAP(ifofile, pgc->program_map,pgc->nr_of_programs, + offset + pgc->program_map_offset)) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + free(pgc->program_map); + return 0; + } + } else { + pgc->program_map = NULL; + } + } else { + pgc->program_map = NULL; + } + + if(pgc->cell_playback_offset != 0) { + if(pgc->nr_of_cells != 0) { + + pgc->cell_playback = malloc(pgc->nr_of_cells * sizeof(cell_playback_t)); + if(!pgc->cell_playback) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + if(pgc->program_map) + free(pgc->program_map); + return 0; + } + if(!ifoRead_CELL_PLAYBACK_TBL(ifofile, pgc->cell_playback, + pgc->nr_of_cells, + offset + pgc->cell_playback_offset)) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + if(pgc->program_map) + free(pgc->program_map); + free(pgc->cell_playback); + return 0; + } + } else { + pgc->cell_playback = NULL; + } + } else { + pgc->cell_playback = NULL; + } + + if(pgc->cell_position_offset != 0) { + if(pgc->nr_of_cells != 0) { + + pgc->cell_position = malloc(pgc->nr_of_cells * sizeof(cell_position_t)); + if(!pgc->cell_position) { + ifoFree_PGC(pgc); + return 0; + } + if(!ifoRead_CELL_POSITION_TBL(ifofile, pgc->cell_position, + pgc->nr_of_cells, + offset + pgc->cell_position_offset)) { + ifoFree_PGC(pgc); + return 0; + } + } else { + pgc->cell_position = NULL; + } + } else { + pgc->cell_position = NULL; + } + + return 1; +} + +int ifoRead_FP_PGC(ifo_handle_t *ifofile) { + + if(!ifofile) + return 0; + + if(!ifofile->vmgi_mat) + return 0; + + /* It seems that first_play_pgc is optional after all. */ + ifofile->first_play_pgc = 0; + if(ifofile->vmgi_mat->first_play_pgc == 0) + return 1; + + ifofile->first_play_pgc = (pgc_t *)malloc(sizeof(pgc_t)); + if(!ifofile->first_play_pgc) + return 0; + + if(!ifoRead_PGC(ifofile, ifofile->first_play_pgc, + ifofile->vmgi_mat->first_play_pgc)) { + free(ifofile->first_play_pgc); + ifofile->first_play_pgc = 0; + return 0; + } + + return 1; +} + +static void ifoFree_PGC(pgc_t *pgc) { + if(pgc) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + if(pgc->program_map) + free(pgc->program_map); + if(pgc->cell_playback) + free(pgc->cell_playback); + if(pgc->cell_position) + free(pgc->cell_position); + } +} + +void ifoFree_FP_PGC(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->first_play_pgc) { + ifoFree_PGC(ifofile->first_play_pgc); + free(ifofile->first_play_pgc); + ifofile->first_play_pgc = 0; + } +} + + +int ifoRead_TT_SRPT(ifo_handle_t *ifofile) { + tt_srpt_t *tt_srpt; + int i, info_length; + + if(!ifofile) + return 0; + + if(!ifofile->vmgi_mat) + return 0; + + if(ifofile->vmgi_mat->tt_srpt == 0) /* mandatory */ + return 0; + + if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->tt_srpt * DVD_BLOCK_LEN)) + return 0; + + tt_srpt = (tt_srpt_t *)malloc(sizeof(tt_srpt_t)); + if(!tt_srpt) + return 0; + + ifofile->tt_srpt = tt_srpt; + + if(!(DVDReadBytes(ifofile->file, tt_srpt, TT_SRPT_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read read TT_SRPT.\n"); + } + free(tt_srpt); + return 0; + } + + B2N_16(tt_srpt->nr_of_srpts); + B2N_32(tt_srpt->last_byte); + + info_length = tt_srpt->last_byte + 1 - TT_SRPT_SIZE; + + tt_srpt->title = (title_info_t *)malloc(info_length); + if(!tt_srpt->title) { + free(tt_srpt); + ifofile->tt_srpt = 0; + return 0; + } + if(!(DVDReadBytes(ifofile->file, tt_srpt->title, info_length))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read read TT_SRPT.\n"); + } + ifoFree_TT_SRPT(ifofile); + return 0; + } + + for(i = 0; i < tt_srpt->nr_of_srpts; i++) { + B2N_16(tt_srpt->title[i].nr_of_ptts); + B2N_16(tt_srpt->title[i].parental_id); + B2N_32(tt_srpt->title[i].title_set_sector); + } + + + CHECK_ZERO(tt_srpt->zero_1); + CHECK_VALUE(tt_srpt->nr_of_srpts != 0); + CHECK_VALUE(tt_srpt->nr_of_srpts < 100); /*??*/ + CHECK_VALUE(tt_srpt->nr_of_srpts * sizeof(title_info_t) <= info_length); + + for(i = 0; i < tt_srpt->nr_of_srpts; i++) { + CHECK_VALUE(tt_srpt->title[i].pb_ty.zero_1 == 0); + CHECK_VALUE(tt_srpt->title[i].nr_of_angles != 0); + CHECK_VALUE(tt_srpt->title[i].nr_of_angles < 10); + /*CHECK_VALUE(tt_srpt->title[i].nr_of_ptts != 0); + / XXX: this assertion breaks Ghostbusters:*/ + CHECK_VALUE(tt_srpt->title[i].nr_of_ptts < 1000); /*??*/ + CHECK_VALUE(tt_srpt->title[i].title_set_nr != 0); + CHECK_VALUE(tt_srpt->title[i].title_set_nr < 100); /* ?? */ + CHECK_VALUE(tt_srpt->title[i].vts_ttn != 0); + CHECK_VALUE(tt_srpt->title[i].vts_ttn < 100); /* ?? */ + /*CHECK_VALUE(tt_srpt->title[i].title_set_sector != 0);*/ + } + + /* Make this a function*/ +#if 0 + if(memcmp((uint8_t *)tt_srpt->title + + tt_srpt->nr_of_srpts * sizeof(title_info_t), + my_friendly_zeros, + info_length - tt_srpt->nr_of_srpts * sizeof(title_info_t))) { + fprintf(stderr, "VMG_PTT_SRPT slack is != 0, "); + hexdump((uint8_t *)tt_srpt->title + + tt_srpt->nr_of_srpts * sizeof(title_info_t), + info_length - tt_srpt->nr_of_srpts * sizeof(title_info_t)); + } +#endif + + return 1; +} + + +void ifoFree_TT_SRPT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->tt_srpt) { + free(ifofile->tt_srpt->title); + free(ifofile->tt_srpt); + ifofile->tt_srpt = 0; + } +} + + +int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) { + vts_ptt_srpt_t *vts_ptt_srpt; + int info_length, i, j; + uint32_t *data; + + if(!ifofile) + return 0; + + if(!ifofile->vtsi_mat) + return 0; + + if(ifofile->vtsi_mat->vts_ptt_srpt == 0) /* mandatory */ + return 0; + + if(!DVDFileSeek_(ifofile->file, + ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN)) + return 0; + + vts_ptt_srpt = (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t)); + if(!vts_ptt_srpt) + return 0; + + ifofile->vts_ptt_srpt = vts_ptt_srpt; + + if(!(DVDReadBytes(ifofile->file, vts_ptt_srpt, VTS_PTT_SRPT_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read PTT search table.\n"); + } + free(vts_ptt_srpt); + return 0; + } + + B2N_16(vts_ptt_srpt->nr_of_srpts); + B2N_32(vts_ptt_srpt->last_byte); + + CHECK_ZERO(vts_ptt_srpt->zero_1); + CHECK_VALUE(vts_ptt_srpt->nr_of_srpts != 0); + CHECK_VALUE(vts_ptt_srpt->nr_of_srpts < 100); /* ??*/ + + info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE; + + data = (uint32_t *)malloc(info_length); + if(!data) { + free(vts_ptt_srpt); + ifofile->vts_ptt_srpt = 0; + return 0; + } + if(!(DVDReadBytes(ifofile->file, data, info_length))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read PTT search table.\n"); + } + free(vts_ptt_srpt); + free(data); + ifofile->vts_ptt_srpt = 0; + return 0; + } + + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { + B2N_32(data[i]); + /* assert(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1); + Magic Knight Rayearth Daybreak is mastered very strange and has + Titles with 0 PTTs. They all have a data[i] offsets beyond the end of + of the vts_ptt_srpt structure. */ + CHECK_VALUE(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1 + 4); + } + + vts_ptt_srpt->ttu_offset = data; + + vts_ptt_srpt->title = malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t)); + if(!vts_ptt_srpt->title) { + free(vts_ptt_srpt); + free(data); + ifofile->vts_ptt_srpt = 0; + return 0; + } + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { + int n; + if(i < vts_ptt_srpt->nr_of_srpts - 1) + n = (data[i+1] - data[i]); + else + n = (vts_ptt_srpt->last_byte + 1 - data[i]); + /* assert(n > 0 && (n % 4) == 0); + Magic Knight Rayearth Daybreak is mastered very strange and has + Titles with 0 PTTs. */ + if(n < 0) n = 0; + CHECK_VALUE(n % 4 == 0); + + vts_ptt_srpt->title[i].nr_of_ptts = n / 4; + vts_ptt_srpt->title[i].ptt = malloc(n * sizeof(ptt_info_t)); + if(!vts_ptt_srpt->title[i].ptt) { + for(n = 0; n < i; n++) + free(vts_ptt_srpt->title[n].ptt); + free(vts_ptt_srpt); + free(data); + ifofile->vts_ptt_srpt = 0; + return 0; + } + for(j = 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) { + /* The assert placed here because of Magic Knight Rayearth Daybreak */ + CHECK_VALUE(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1); + vts_ptt_srpt->title[i].ptt[j].pgcn + = *(uint16_t*)(((char *)data) + data[i] + 4*j - VTS_PTT_SRPT_SIZE); + vts_ptt_srpt->title[i].ptt[j].pgn + = *(uint16_t*)(((char *)data) + data[i] + 4*j + 2 - VTS_PTT_SRPT_SIZE); + } + } + + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { + for(j = 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) { + B2N_16(vts_ptt_srpt->title[i].ptt[j].pgcn); + B2N_16(vts_ptt_srpt->title[i].ptt[j].pgn); + } + } + + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { + CHECK_VALUE(vts_ptt_srpt->title[i].nr_of_ptts < 1000); /* ??*/ + for(j = 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) { + CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgcn != 0 ); + CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgcn < 1000); /* ??*/ + CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn != 0); + CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn < 100); /* ?? */ + } + } + + return 1; +} + + +void ifoFree_VTS_PTT_SRPT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->vts_ptt_srpt) { + int i; + for(i = 0; i < ifofile->vts_ptt_srpt->nr_of_srpts; i++) + free(ifofile->vts_ptt_srpt->title[i].ptt); + free(ifofile->vts_ptt_srpt->ttu_offset); + free(ifofile->vts_ptt_srpt->title); + free(ifofile->vts_ptt_srpt); + ifofile->vts_ptt_srpt = 0; + } +} + + +int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) { + ptl_mait_t *ptl_mait; + int info_length; + unsigned int i, j; + + if(!ifofile) + return 0; + + if(!ifofile->vmgi_mat) + return 0; + + if(ifofile->vmgi_mat->ptl_mait == 0) + return 1; + + if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN)) + return 0; + + ptl_mait = (ptl_mait_t *)malloc(sizeof(ptl_mait_t)); + if(!ptl_mait) + return 0; + + ifofile->ptl_mait = ptl_mait; + + if(!(DVDReadBytes(ifofile->file, ptl_mait, PTL_MAIT_SIZE))) { + free(ptl_mait); + ifofile->ptl_mait = 0; + return 0; + } + + B2N_16(ptl_mait->nr_of_countries); + B2N_16(ptl_mait->nr_of_vtss); + B2N_32(ptl_mait->last_byte); + + CHECK_VALUE(ptl_mait->nr_of_countries != 0); + CHECK_VALUE(ptl_mait->nr_of_countries < 100); /* ?? */ + CHECK_VALUE(ptl_mait->nr_of_vtss != 0); + CHECK_VALUE(ptl_mait->nr_of_vtss < 100); /* ?? */ + CHECK_VALUE(ptl_mait->nr_of_countries * PTL_MAIT_COUNTRY_SIZE + <= ptl_mait->last_byte + 1 - PTL_MAIT_SIZE); + + info_length = ptl_mait->nr_of_countries * sizeof(ptl_mait_country_t); + ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length); + if(!ptl_mait->countries) { + free(ptl_mait); + ifofile->ptl_mait = 0; + return 0; + } + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + if(!(DVDReadBytes(ifofile->file, &ptl_mait->countries[i], PTL_MAIT_COUNTRY_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read PTL_MAIT.\n"); + } + free(ptl_mait->countries); + free(ptl_mait); + ifofile->ptl_mait = 0; + return 0; + } + } + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + B2N_16(ptl_mait->countries[i].country_code); + B2N_16(ptl_mait->countries[i].pf_ptl_mai_start_byte); + } + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + CHECK_ZERO(ptl_mait->countries[i].zero_1); + CHECK_ZERO(ptl_mait->countries[i].zero_2); + CHECK_VALUE(ptl_mait->countries[i].pf_ptl_mai_start_byte + + 16U * (ptl_mait->nr_of_vtss + 1) <= ptl_mait->last_byte + 1U); + } + + for(i = 0; i < ptl_mait->nr_of_countries; i++) { + uint16_t *pf_temp; + + if(!DVDFileSeek_(ifofile->file, + ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN + + ptl_mait->countries[i].pf_ptl_mai_start_byte)) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to seak PTL_MAIT table.\n"); + } + free(ptl_mait->countries); + free(ptl_mait); + return 0; + } + info_length = (ptl_mait->nr_of_vtss + 1) * sizeof(pf_level_t); + pf_temp = (uint16_t *)malloc(info_length); + if(!pf_temp) { + for(j = 0; j < i ; j++) { + free(ptl_mait->countries[j].pf_ptl_mai); + } + free(ptl_mait->countries); + free(ptl_mait); + return 0; + } + if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table.\n"); + } + free(pf_temp); + for(j = 0; j < i ; j++) { + free(ptl_mait->countries[j].pf_ptl_mai); + } + free(ptl_mait->countries); + free(ptl_mait); + return 0; + } + for (j = 0; j < ((ptl_mait->nr_of_vtss + 1) * 8); j++) { + B2N_16(pf_temp[j]); + } + ptl_mait->countries[i].pf_ptl_mai = (pf_level_t *)malloc(info_length); + if(!ptl_mait->countries[i].pf_ptl_mai) { + free(pf_temp); + for(j = 0; j < i ; j++) { + free(ptl_mait->countries[j].pf_ptl_mai); + } + free(ptl_mait->countries); + free(ptl_mait); + return 0; + } + { /* Transpose the array so we can use C indexing. */ + int level, vts; + for(level = 0; level < 8; level++) { + for(vts = 0; vts <= ptl_mait->nr_of_vtss; vts++) { + ptl_mait->countries[i].pf_ptl_mai[vts][level] = + pf_temp[(7-level)*(ptl_mait->nr_of_vtss+1) + vts]; + } + } + free(pf_temp); + } + } + return 1; +} + +void ifoFree_PTL_MAIT(ifo_handle_t *ifofile) { + unsigned int i; + + if(!ifofile) + return; + + if(ifofile->ptl_mait) { + for(i = 0; i < ifofile->ptl_mait->nr_of_countries; i++) { + free(ifofile->ptl_mait->countries[i].pf_ptl_mai); + } + free(ifofile->ptl_mait->countries); + free(ifofile->ptl_mait); + ifofile->ptl_mait = 0; + } +} + +int ifoRead_VTS_TMAPT(ifo_handle_t *ifofile) { + vts_tmapt_t *vts_tmapt; + uint32_t *vts_tmap_srp; + unsigned int offset; + int info_length; + unsigned int i, j; + + if(!ifofile) + return 0; + + if(!ifofile->vtsi_mat) + return 0; + + /* Seems to be optional, at least when there are no OneSequencial Titles */ + if(ifofile->vtsi_mat->vts_tmapt == 0) { + ifofile->vts_tmapt = NULL; + return 1; + } + + offset = ifofile->vtsi_mat->vts_tmapt * DVD_BLOCK_LEN; + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + vts_tmapt = (vts_tmapt_t *)malloc(sizeof(vts_tmapt_t)); + if(!vts_tmapt) + return 0; + + ifofile->vts_tmapt = vts_tmapt; + + if(!(DVDReadBytes(ifofile->file, vts_tmapt, VTS_TMAPT_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read VTS_TMAPT.\n"); + } + free(vts_tmapt); + ifofile->vts_tmapt = NULL; + return 0; + } + + B2N_16(vts_tmapt->nr_of_tmaps); + B2N_32(vts_tmapt->last_byte); + + CHECK_ZERO(vts_tmapt->zero_1); + + info_length = vts_tmapt->nr_of_tmaps * 4; + + vts_tmap_srp = (uint32_t *)malloc(info_length); + if(!vts_tmap_srp) { + free(vts_tmapt); + ifofile->vts_tmapt = NULL; + return 0; + } + + vts_tmapt->tmap_offset = vts_tmap_srp; + + if(!(DVDReadBytes(ifofile->file, vts_tmap_srp, info_length))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read VTS_TMAPT.\n"); + } + free(vts_tmap_srp); + free(vts_tmapt); + ifofile->vts_tmapt = NULL; + return 0; + } + + for (i = 0; i < vts_tmapt->nr_of_tmaps; i++) { + B2N_32(vts_tmap_srp[i]); + } + + + info_length = vts_tmapt->nr_of_tmaps * sizeof(vts_tmap_t); + + vts_tmapt->tmap = (vts_tmap_t *)malloc(info_length); + if(!vts_tmapt->tmap) { + free(vts_tmap_srp); + free(vts_tmapt); + ifofile->vts_tmapt = NULL; + return 0; + } + + memset(vts_tmapt->tmap, 0, info_length); /* So ifoFree_VTS_TMAPT works. */ + + for(i = 0; i < vts_tmapt->nr_of_tmaps; i++) { + if(!DVDFileSeek_(ifofile->file, offset + vts_tmap_srp[i])) { + ifoFree_VTS_TMAPT(ifofile); + return 0; + } + + if(!(DVDReadBytes(ifofile->file, &vts_tmapt->tmap[i], VTS_TMAP_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read VTS_TMAP.\n"); + } + ifoFree_VTS_TMAPT(ifofile); + return 0; + } + + B2N_16(vts_tmapt->tmap[i].nr_of_entries); + CHECK_ZERO(vts_tmapt->tmap[i].zero_1); + + if(vts_tmapt->tmap[i].nr_of_entries == 0) { /* Early out if zero entries */ + vts_tmapt->tmap[i].map_ent = NULL; + continue; + } + + info_length = vts_tmapt->tmap[i].nr_of_entries * sizeof(map_ent_t); + + vts_tmapt->tmap[i].map_ent = (map_ent_t *)malloc(info_length); + if(!vts_tmapt->tmap[i].map_ent) { + ifoFree_VTS_TMAPT(ifofile); + return 0; + } + + if(!(DVDReadBytes(ifofile->file, vts_tmapt->tmap[i].map_ent, info_length))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read VTS_TMAP_ENT.\n"); + } + ifoFree_VTS_TMAPT(ifofile); + return 0; + } + + for(j = 0; j < vts_tmapt->tmap[i].nr_of_entries; j++) + B2N_32(vts_tmapt->tmap[i].map_ent[j]); + } + + return 1; +} + +void ifoFree_VTS_TMAPT(ifo_handle_t *ifofile) { + unsigned int i; + + if(!ifofile) + return; + + if(ifofile->vts_tmapt) { + for(i = 0; i < ifofile->vts_tmapt->nr_of_tmaps; i++) + if(ifofile->vts_tmapt->tmap[i].map_ent) + free(ifofile->vts_tmapt->tmap[i].map_ent); + free(ifofile->vts_tmapt->tmap); + free(ifofile->vts_tmapt->tmap_offset); + free(ifofile->vts_tmapt); + ifofile->vts_tmapt = NULL; + } +} + + +int ifoRead_TITLE_C_ADT(ifo_handle_t *ifofile) { + + if(!ifofile) + return 0; + + if(!ifofile->vtsi_mat) + return 0; + + if(ifofile->vtsi_mat->vts_c_adt == 0) /* mandatory */ + return 0; + + ifofile->vts_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t)); + if(!ifofile->vts_c_adt) + return 0; + + if(!ifoRead_C_ADT_internal(ifofile, ifofile->vts_c_adt, + ifofile->vtsi_mat->vts_c_adt)) { + free(ifofile->vts_c_adt); + ifofile->vts_c_adt = 0; + return 0; + } + + return 1; +} + +int ifoRead_C_ADT(ifo_handle_t *ifofile) { + unsigned int sector; + + if(!ifofile) + return 0; + + if(ifofile->vmgi_mat) { + if(ifofile->vmgi_mat->vmgm_c_adt == 0) + return 1; + sector = ifofile->vmgi_mat->vmgm_c_adt; + } else if(ifofile->vtsi_mat) { + if(ifofile->vtsi_mat->vtsm_c_adt == 0) + return 1; + sector = ifofile->vtsi_mat->vtsm_c_adt; + } else { + return 0; + } + + ifofile->menu_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t)); + if(!ifofile->menu_c_adt) + return 0; + + if(!ifoRead_C_ADT_internal(ifofile, ifofile->menu_c_adt, sector)) { + free(ifofile->menu_c_adt); + ifofile->menu_c_adt = 0; + return 0; + } + + return 1; +} + +static int ifoRead_C_ADT_internal(ifo_handle_t *ifofile, + c_adt_t *c_adt, unsigned int sector) { + int i, info_length; + + if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) + return 0; + + if(!(DVDReadBytes(ifofile->file, c_adt, C_ADT_SIZE))) + return 0; + + B2N_16(c_adt->nr_of_vobs); + B2N_32(c_adt->last_byte); + + info_length = c_adt->last_byte + 1 - C_ADT_SIZE; + + CHECK_ZERO(c_adt->zero_1); + /* assert(c_adt->nr_of_vobs > 0); + Magic Knight Rayearth Daybreak is mastered very strange and has + Titles with a VOBS that has no cells. */ + CHECK_VALUE(info_length % sizeof(cell_adr_t) == 0); + + /* assert(info_length / sizeof(cell_adr_t) >= c_adt->nr_of_vobs); + Enemy of the State region 2 (de) has Titles where nr_of_vobs field + is to high, they high ones are never referenced though. */ + if(info_length / sizeof(cell_adr_t) < c_adt->nr_of_vobs) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: *C_ADT nr_of_vobs > avaiable info entries\n"); + } + c_adt->nr_of_vobs = info_length / sizeof(cell_adr_t); + } + + c_adt->cell_adr_table = (cell_adr_t *)malloc(info_length); + if(!c_adt->cell_adr_table) + return 0; + + if(info_length && + !(DVDReadBytes(ifofile->file, c_adt->cell_adr_table, info_length))) { + free(c_adt->cell_adr_table); + return 0; + } + + for(i = 0; i < info_length/sizeof(cell_adr_t); i++) { + B2N_16(c_adt->cell_adr_table[i].vob_id); + B2N_32(c_adt->cell_adr_table[i].start_sector); + B2N_32(c_adt->cell_adr_table[i].last_sector); + + CHECK_ZERO(c_adt->cell_adr_table[i].zero_1); + CHECK_VALUE(c_adt->cell_adr_table[i].vob_id > 0); + CHECK_VALUE(c_adt->cell_adr_table[i].vob_id <= c_adt->nr_of_vobs); + CHECK_VALUE(c_adt->cell_adr_table[i].cell_id > 0); + CHECK_VALUE(c_adt->cell_adr_table[i].start_sector < + c_adt->cell_adr_table[i].last_sector); + } + + return 1; +} + + +static void ifoFree_C_ADT_internal(c_adt_t *c_adt) { + if(c_adt) { + free(c_adt->cell_adr_table); + free(c_adt); + } +} + +void ifoFree_C_ADT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + ifoFree_C_ADT_internal(ifofile->menu_c_adt); + ifofile->menu_c_adt = 0; +} + +void ifoFree_TITLE_C_ADT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + ifoFree_C_ADT_internal(ifofile->vts_c_adt); + ifofile->vts_c_adt = 0; +} + +int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *ifofile) { + if(!ifofile) + return 0; + + if(!ifofile->vtsi_mat) + return 0; + + if(ifofile->vtsi_mat->vts_vobu_admap == 0) /* mandatory */ + return 0; + + ifofile->vts_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t)); + if(!ifofile->vts_vobu_admap) + return 0; + + if(!ifoRead_VOBU_ADMAP_internal(ifofile, ifofile->vts_vobu_admap, + ifofile->vtsi_mat->vts_vobu_admap)) { + free(ifofile->vts_vobu_admap); + ifofile->vts_vobu_admap = 0; + return 0; + } + + return 1; +} + +int ifoRead_VOBU_ADMAP(ifo_handle_t *ifofile) { + unsigned int sector; + + if(!ifofile) + return 0; + + if(ifofile->vmgi_mat) { + if(ifofile->vmgi_mat->vmgm_vobu_admap == 0) + return 1; + sector = ifofile->vmgi_mat->vmgm_vobu_admap; + } else if(ifofile->vtsi_mat) { + if(ifofile->vtsi_mat->vtsm_vobu_admap == 0) + return 1; + sector = ifofile->vtsi_mat->vtsm_vobu_admap; + } else { + return 0; + } + + ifofile->menu_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t)); + if(!ifofile->menu_vobu_admap) + return 0; + + if(!ifoRead_VOBU_ADMAP_internal(ifofile, ifofile->menu_vobu_admap, sector)) { + free(ifofile->menu_vobu_admap); + ifofile->menu_vobu_admap = 0; + return 0; + } + + return 1; +} + +static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile, + vobu_admap_t *vobu_admap, + unsigned int sector) { + unsigned int i; + int info_length; + + if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) + return 0; + + if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE))) + return 0; + + B2N_32(vobu_admap->last_byte); + + info_length = vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE; + /* assert(info_length > 0); + Magic Knight Rayearth Daybreak is mastered very strange and has + Titles with a VOBS that has no VOBUs. */ + CHECK_VALUE(info_length % sizeof(uint32_t) == 0); + + vobu_admap->vobu_start_sectors = (uint32_t *)malloc(info_length); + if(!vobu_admap->vobu_start_sectors) { + return 0; + } + if(info_length && + !(DVDReadBytes(ifofile->file, + vobu_admap->vobu_start_sectors, info_length))) { + free(vobu_admap->vobu_start_sectors); + return 0; + } + + for(i = 0; i < info_length/sizeof(uint32_t); i++) + B2N_32(vobu_admap->vobu_start_sectors[i]); + + return 1; +} + + +static void ifoFree_VOBU_ADMAP_internal(vobu_admap_t *vobu_admap) { + if(vobu_admap) { + free(vobu_admap->vobu_start_sectors); + free(vobu_admap); + } +} + +void ifoFree_VOBU_ADMAP(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + ifoFree_VOBU_ADMAP_internal(ifofile->menu_vobu_admap); + ifofile->menu_vobu_admap = 0; +} + +void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + ifoFree_VOBU_ADMAP_internal(ifofile->vts_vobu_admap); + ifofile->vts_vobu_admap = 0; +} + +int ifoRead_PGCIT(ifo_handle_t *ifofile) { + + if(!ifofile) + return 0; + + if(!ifofile->vtsi_mat) + return 0; + + if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */ + return 0; + + ifofile->vts_pgcit = (pgcit_t *)malloc(sizeof(pgcit_t)); + if(!ifofile->vts_pgcit) + return 0; + + if(!ifoRead_PGCIT_internal(ifofile, ifofile->vts_pgcit, + ifofile->vtsi_mat->vts_pgcit * DVD_BLOCK_LEN)) { + free(ifofile->vts_pgcit); + ifofile->vts_pgcit = 0; + return 0; + } + + return 1; +} + +static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, + unsigned int offset) { + int i, info_length; + uint8_t *data, *ptr; + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, pgcit, PGCIT_SIZE))) + return 0; + + B2N_16(pgcit->nr_of_pgci_srp); + B2N_32(pgcit->last_byte); + + CHECK_ZERO(pgcit->zero_1); + /* assert(pgcit->nr_of_pgci_srp != 0); + Magic Knight Rayearth Daybreak is mastered very strange and has + Titles with 0 PTTs. */ + CHECK_VALUE(pgcit->nr_of_pgci_srp < 10000); /* ?? seen max of 1338*/ + + info_length = pgcit->nr_of_pgci_srp * PGCI_SRP_SIZE; + data = malloc(info_length); + if(!data) + return 0; + + if(info_length && !(DVDReadBytes(ifofile->file, data, info_length))) { + free(data); + return 0; + } + + pgcit->pgci_srp = malloc(pgcit->nr_of_pgci_srp * sizeof(pgci_srp_t)); + if(!pgcit->pgci_srp) { + free(data); + return 0; + } + ptr = data; + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { + memcpy(&pgcit->pgci_srp[i], ptr, PGCI_SRP_SIZE); + ptr += PGCI_SRP_SIZE; + B2N_16(pgcit->pgci_srp[i].ptl_id_mask); + B2N_32(pgcit->pgci_srp[i].pgc_start_byte); + CHECK_VALUE(pgcit->pgci_srp[i].unknown1 == 0); + } + free(data); + + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) + CHECK_VALUE(pgcit->pgci_srp[i].pgc_start_byte + PGC_SIZE <= pgcit->last_byte+1); + + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { + pgcit->pgci_srp[i].pgc = malloc(sizeof(pgc_t)); + if(!pgcit->pgci_srp[i].pgc) { + int j; + for(j = 0; j < i; j++) { + ifoFree_PGC(pgcit->pgci_srp[j].pgc); + free(pgcit->pgci_srp[j].pgc); + } + free(pgcit->pgci_srp); + pgcit->pgci_srp = NULL; + return 0; + } + if(!ifoRead_PGC(ifofile, pgcit->pgci_srp[i].pgc, + offset + pgcit->pgci_srp[i].pgc_start_byte)) { + int j; + for(j = 0; j < i; j++) { + ifoFree_PGC(pgcit->pgci_srp[j].pgc); + free(pgcit->pgci_srp[j].pgc); + } + free(pgcit->pgci_srp); + pgcit->pgci_srp = NULL; + return 0; + } + } + + return 1; +} + +static void ifoFree_PGCIT_internal(pgcit_t *pgcit) { + if(pgcit) { + int i; + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { + ifoFree_PGC(pgcit->pgci_srp[i].pgc); + free(pgcit->pgci_srp[i].pgc); + } + free(pgcit->pgci_srp); + } +} + +void ifoFree_PGCIT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->vts_pgcit) { + ifoFree_PGCIT_internal(ifofile->vts_pgcit); + free(ifofile->vts_pgcit); + ifofile->vts_pgcit = 0; + } +} + + +int ifoRead_PGCI_UT(ifo_handle_t *ifofile) { + pgci_ut_t *pgci_ut; + unsigned int sector; + unsigned int i; + int info_length; + uint8_t *data, *ptr; + + if(!ifofile) + return 0; + + if(ifofile->vmgi_mat) { + if(ifofile->vmgi_mat->vmgm_pgci_ut == 0) + return 1; + sector = ifofile->vmgi_mat->vmgm_pgci_ut; + } else if(ifofile->vtsi_mat) { + if(ifofile->vtsi_mat->vtsm_pgci_ut == 0) + return 1; + sector = ifofile->vtsi_mat->vtsm_pgci_ut; + } else { + return 0; + } + + ifofile->pgci_ut = (pgci_ut_t *)malloc(sizeof(pgci_ut_t)); + if(!ifofile->pgci_ut) + return 0; + + if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) { + free(ifofile->pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + + if(!(DVDReadBytes(ifofile->file, ifofile->pgci_ut, PGCI_UT_SIZE))) { + free(ifofile->pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + + pgci_ut = ifofile->pgci_ut; + + B2N_16(pgci_ut->nr_of_lus); + B2N_32(pgci_ut->last_byte); + + CHECK_ZERO(pgci_ut->zero_1); + CHECK_VALUE(pgci_ut->nr_of_lus != 0); + CHECK_VALUE(pgci_ut->nr_of_lus < 100); /* ?? 3-4 ?*/ + CHECK_VALUE((uint32_t)pgci_ut->nr_of_lus * PGCI_LU_SIZE < pgci_ut->last_byte); + + info_length = pgci_ut->nr_of_lus * PGCI_LU_SIZE; + data = malloc(info_length); + if(!data) { + free(pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + if(!(DVDReadBytes(ifofile->file, data, info_length))) { + free(data); + free(pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + + pgci_ut->lu = malloc(pgci_ut->nr_of_lus * sizeof(pgci_lu_t)); + if(!pgci_ut->lu) { + free(data); + free(pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + ptr = data; + for(i = 0; i < pgci_ut->nr_of_lus; i++) { + memcpy(&pgci_ut->lu[i], ptr, PGCI_LU_SIZE); + ptr += PGCI_LU_SIZE; + B2N_16(pgci_ut->lu[i].lang_code); + B2N_32(pgci_ut->lu[i].lang_start_byte); + } + free(data); + + for(i = 0; i < pgci_ut->nr_of_lus; i++) { + /* Maybe this is only defined for v1.1 and later titles? + If the bits in 'lu[i].exists' are enumerated abcd efgh then: + VTS_x_yy.IFO VIDEO_TS.IFO + a == 0x83 "Root" 0x82 "Title" + b == 0x84 "Subpicture" + c == 0x85 "Audio" + d == 0x86 "Angle" + e == 0x87 "PTT" + */ + CHECK_VALUE((pgci_ut->lu[i].exists & 0x07) == 0); + } + + for(i = 0; i < pgci_ut->nr_of_lus; i++) { + pgci_ut->lu[i].pgcit = malloc(sizeof(pgcit_t)); + if(!pgci_ut->lu[i].pgcit) { + unsigned int j; + for(j = 0; j < i; j++) { + ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); + free(pgci_ut->lu[j].pgcit); + } + free(pgci_ut->lu); + free(pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + if(!ifoRead_PGCIT_internal(ifofile, pgci_ut->lu[i].pgcit, + sector * DVD_BLOCK_LEN + + pgci_ut->lu[i].lang_start_byte)) { + unsigned int j; + for(j = 0; j < i; j++) { + ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); + free(pgci_ut->lu[j].pgcit); + } + free(pgci_ut->lu[i].pgcit); + free(pgci_ut->lu); + free(pgci_ut); + ifofile->pgci_ut = 0; + return 0; + } + /* FIXME: Iterate and verify that all menus that should exists accordingly + / to pgci_ut->lu[i].exists really do? */ + } + + return 1; +} + + +void ifoFree_PGCI_UT(ifo_handle_t *ifofile) { + unsigned int i; + + if(!ifofile) + return; + + if(ifofile->pgci_ut) { + for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) { + ifoFree_PGCIT_internal(ifofile->pgci_ut->lu[i].pgcit); + free(ifofile->pgci_ut->lu[i].pgcit); + } + free(ifofile->pgci_ut->lu); + free(ifofile->pgci_ut); + ifofile->pgci_ut = 0; + } +} + +static int ifoRead_VTS_ATTRIBUTES(ifo_handle_t *ifofile, + vts_attributes_t *vts_attributes, + unsigned int offset) { + unsigned int i; + + if(!DVDFileSeek_(ifofile->file, offset)) + return 0; + + if(!(DVDReadBytes(ifofile->file, vts_attributes, sizeof(vts_attributes_t)))) + return 0; + + B2N_32(vts_attributes->last_byte); + B2N_32(vts_attributes->vts_cat); + B2N_16(vts_attributes->vtsm_audio_attr.lang_code); + B2N_16(vts_attributes->vtsm_subp_attr.lang_code); + for(i = 0; i < 8; i++) + B2N_16(vts_attributes->vtstt_audio_attr[i].lang_code); + for(i = 0; i < 32; i++) + B2N_16(vts_attributes->vtstt_subp_attr[i].lang_code); + + CHECK_ZERO(vts_attributes->zero_1); + CHECK_ZERO(vts_attributes->zero_2); + CHECK_ZERO(vts_attributes->zero_3); + CHECK_ZERO(vts_attributes->zero_4); + CHECK_ZERO(vts_attributes->zero_5); + CHECK_ZERO(vts_attributes->zero_6); + CHECK_ZERO(vts_attributes->zero_7); + CHECK_VALUE(vts_attributes->nr_of_vtsm_audio_streams <= 1); + CHECK_VALUE(vts_attributes->nr_of_vtsm_subp_streams <= 1); + CHECK_VALUE(vts_attributes->nr_of_vtstt_audio_streams <= 8); + for(i = vts_attributes->nr_of_vtstt_audio_streams; i < 8; i++) + CHECK_ZERO(vts_attributes->vtstt_audio_attr[i]); + CHECK_VALUE(vts_attributes->nr_of_vtstt_subp_streams <= 32); + { + unsigned int nr_coded; + CHECK_VALUE(vts_attributes->last_byte + 1 >= VTS_ATTRIBUTES_MIN_SIZE); + nr_coded = (vts_attributes->last_byte + 1 - VTS_ATTRIBUTES_MIN_SIZE)/6; + /* This is often nr_coded = 70, how do you know how many there really are?*/ + if(nr_coded > 32) { /* We haven't read more from disk/file anyway*/ + nr_coded = 32; + } + CHECK_VALUE(vts_attributes->nr_of_vtstt_subp_streams <= nr_coded); + for(i = vts_attributes->nr_of_vtstt_subp_streams; i < nr_coded; i++) + CHECK_ZERO(vts_attributes->vtstt_subp_attr[i]); + } + + return 1; +} + + + +int ifoRead_VTS_ATRT(ifo_handle_t *ifofile) { + vts_atrt_t *vts_atrt; + unsigned int i, info_length, sector; + uint32_t *data; + + if(!ifofile) + return 0; + + if(!ifofile->vmgi_mat) + return 0; + + if(ifofile->vmgi_mat->vts_atrt == 0) /* mandatory */ + return 0; + + sector = ifofile->vmgi_mat->vts_atrt; + if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) + return 0; + + vts_atrt = (vts_atrt_t *)malloc(sizeof(vts_atrt_t)); + if(!vts_atrt) + return 0; + + ifofile->vts_atrt = vts_atrt; + + if(!(DVDReadBytes(ifofile->file, vts_atrt, VTS_ATRT_SIZE))) { + free(vts_atrt); + ifofile->vts_atrt = 0; + return 0; + } + + B2N_16(vts_atrt->nr_of_vtss); + B2N_32(vts_atrt->last_byte); + + CHECK_ZERO(vts_atrt->zero_1); + CHECK_VALUE(vts_atrt->nr_of_vtss != 0); + CHECK_VALUE(vts_atrt->nr_of_vtss < 100); /*??*/ + CHECK_VALUE((uint32_t)vts_atrt->nr_of_vtss * (4 + VTS_ATTRIBUTES_MIN_SIZE) + + VTS_ATRT_SIZE < vts_atrt->last_byte + 1); + + info_length = vts_atrt->nr_of_vtss * sizeof(uint32_t); + data = (uint32_t *)malloc(info_length); + if(!data) { + free(vts_atrt); + ifofile->vts_atrt = 0; + return 0; + } + + vts_atrt->vts_atrt_offsets = data; + + if(!(DVDReadBytes(ifofile->file, data, info_length))) { + free(data); + free(vts_atrt); + ifofile->vts_atrt = 0; + return 0; + } + + for(i = 0; i < vts_atrt->nr_of_vtss; i++) { + B2N_32(data[i]); + CHECK_VALUE(data[i] + VTS_ATTRIBUTES_MIN_SIZE < vts_atrt->last_byte + 1); + } + + info_length = vts_atrt->nr_of_vtss * sizeof(vts_attributes_t); + vts_atrt->vts = (vts_attributes_t *)malloc(info_length); + if(!vts_atrt->vts) { + free(data); + free(vts_atrt); + ifofile->vts_atrt = 0; + return 0; + } + for(i = 0; i < vts_atrt->nr_of_vtss; i++) { + unsigned int offset = data[i]; + if(!ifoRead_VTS_ATTRIBUTES(ifofile, &(vts_atrt->vts[i]), + (sector * DVD_BLOCK_LEN) + offset)) { + free(data); + free(vts_atrt); + ifofile->vts_atrt = 0; + return 0; + } + + /* This assert cant be in ifoRead_VTS_ATTRIBUTES*/ + CHECK_VALUE(offset + vts_atrt->vts[i].last_byte <= vts_atrt->last_byte + 1); + /* Is this check correct?*/ + } + + return 1; +} + + +void ifoFree_VTS_ATRT(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->vts_atrt) { + free(ifofile->vts_atrt->vts); + free(ifofile->vts_atrt->vts_atrt_offsets); + free(ifofile->vts_atrt); + ifofile->vts_atrt = 0; + } +} + + +int ifoRead_TXTDT_MGI(ifo_handle_t *ifofile) { + txtdt_mgi_t *txtdt_mgi; + + if(!ifofile) + return 0; + + if(!ifofile->vmgi_mat) + return 0; + + /* Return successfully if there is nothing to read. */ + if(ifofile->vmgi_mat->txtdt_mgi == 0) + return 1; + + if(!DVDFileSeek_(ifofile->file, + ifofile->vmgi_mat->txtdt_mgi * DVD_BLOCK_LEN)) + return 0; + + txtdt_mgi = (txtdt_mgi_t *)malloc(sizeof(txtdt_mgi_t)); + if(!txtdt_mgi) { + return 0; + } + ifofile->txtdt_mgi = txtdt_mgi; + + if(!(DVDReadBytes(ifofile->file, txtdt_mgi, TXTDT_MGI_SIZE))) { + if(dvdread_verbose(device_of_file(ifofile->file)) >= 1) { + fprintf(stderr, "libdvdread: Unable to read TXTDT_MGI.\n"); + } + free(txtdt_mgi); + ifofile->txtdt_mgi = 0; + return 0; + } + + /* fprintf(stderr, "-- Not done yet --\n");*/ + return 1; +} + +void ifoFree_TXTDT_MGI(ifo_handle_t *ifofile) { + if(!ifofile) + return; + + if(ifofile->txtdt_mgi) { + free(ifofile->txtdt_mgi); + ifofile->txtdt_mgi = 0; + } +} + diff -Nru k9copy-2.1.0/src/dvdreadnew/ifo_read.h k9copy-2.2.0/src/dvdreadnew/ifo_read.h --- k9copy-2.1.0/src/dvdreadnew/ifo_read.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/ifo_read.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,228 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef IFO_READ_H_INCLUDED +#define IFO_READ_H_INCLUDED + +/* + * Copyright (C) 2000, 2001, 2002 Bj�rn Englund , + * H�kan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "ifo_types.h" +#include "dvd_reader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * handle = ifoOpen(dvd, title); + * + * Opens an IFO and reads in all the data for the IFO file corresponding to the + * given title. If title 0 is given, the video manager IFO file is read. + * Returns a handle to a completely parsed structure. + */ +ifo_handle_t *ifoOpen(dvd_reader_t *, int ); + +/** + * handle = ifoOpenVMGI(dvd); + * + * Opens an IFO and reads in _only_ the vmgi_mat data. This call can be used + * together with the calls below to read in each segment of the IFO file on + * demand. + */ +ifo_handle_t *ifoOpenVMGI(dvd_reader_t *); + +/** + * handle = ifoOpenVTSI(dvd, title); + * + * Opens an IFO and reads in _only_ the vtsi_mat data. This call can be used + * together with the calls below to read in each segment of the IFO file on + * demand. + */ +ifo_handle_t *ifoOpenVTSI(dvd_reader_t *, int); + +/** + * ifoClose(ifofile); + * Cleans up the IFO information. This will free all data allocated for the + * substructures. + */ +void ifoClose(ifo_handle_t *); + +/** + * The following functions are for reading only part of the VMGI/VTSI files. + * Returns 1 if the data was successfully read and 0 on error. + */ + +/** + * okay = ifoRead_PLT_MAIT(ifofile); + * + * Read in the Parental Management Information table, filling the + * ifofile->ptl_mait structure and its substructures. This data is only + * located in the video manager information file. This fills the + * ifofile->ptl_mait structure and all its substructures. + */ +int ifoRead_PTL_MAIT(ifo_handle_t *); + +/** + * okay = ifoRead_VTS_ATRT(ifofile); + * + * Read in the attribute table for the main menu vob, filling the + * ifofile->vts_atrt structure and its substructures. Only located in the + * video manager information file. This fills in the ifofile->vts_atrt + * structure and all its substructures. + */ +int ifoRead_VTS_ATRT(ifo_handle_t *); + +/** + * okay = ifoRead_TT_SRPT(ifofile); + * + * Reads the title info for the main menu, filling the ifofile->tt_srpt + * structure and its substructures. This data is only located in the video + * manager information file. This structure is mandatory in the IFO file. + */ +int ifoRead_TT_SRPT(ifo_handle_t *); + +/** + * okay = ifoRead_VTS_PTT_SRPT(ifofile); + * + * Reads in the part of title search pointer table, filling the + * ifofile->vts_ptt_srpt structure and its substructures. This data is only + * located in the video title set information file. This structure is + * mandatory, and must be included in the VTSI file. + */ +int ifoRead_VTS_PTT_SRPT(ifo_handle_t *); + +/** + * okay = ifoRead_FP_PGC(ifofile); + * + * Reads in the first play program chain data, filling the + * ifofile->first_play_pgc structure. This data is only located in the video + * manager information file (VMGI). This structure is optional. + */ +int ifoRead_FP_PGC(ifo_handle_t *); + +/** + * okay = ifoRead_PGCIT(ifofile); + * + * Reads in the program chain information table for the video title set. Fills + * in the ifofile->vts_pgcit structure and its substructures, which includes + * the data for each program chain in the set. This data is only located in + * the video title set information file. This structure is mandatory, and must + * be included in the VTSI file. + */ +int ifoRead_PGCIT(ifo_handle_t *); + +/** + * okay = ifoRead_PGCI_UT(ifofile); + * + * Reads in the menu PGCI unit table for the menu VOB. For the video manager, + * this corresponds to the VIDEO_TS.VOB file, and for each title set, this + * corresponds to the VTS_XX_0.VOB file. This data is located in both the + * video manager and video title set information files. For VMGI files, this + * fills the ifofile->vmgi_pgci_ut structure and all its substructures. For + * VTSI files, this fills the ifofile->vtsm_pgci_ut structure. + */ +int ifoRead_PGCI_UT(ifo_handle_t *); + +/** + * okay = ifoRead_VTS_TMAPT(ifofile); + * + * Reads in the VTS Time Map Table, this data is only located in the video + * title set information file. This fills the ifofile->vts_tmapt structure + * and all its substructures. When pressent enables VOBU level time-based + * seeking for One_Sequential_PGC_Titles. + */ +int ifoRead_VTS_TMAPT(ifo_handle_t *); + +/** + * okay = ifoRead_C_ADT(ifofile); + * + * Reads in the cell address table for the menu VOB. For the video manager, + * this corresponds to the VIDEO_TS.VOB file, and for each title set, this + * corresponds to the VTS_XX_0.VOB file. This data is located in both the + * video manager and video title set information files. For VMGI files, this + * fills the ifofile->vmgm_c_adt structure and all its substructures. For VTSI + * files, this fills the ifofile->vtsm_c_adt structure. + */ +int ifoRead_C_ADT(ifo_handle_t *); + +/** + * okay = ifoRead_TITLE_C_ADT(ifofile); + * + * Reads in the cell address table for the video title set corresponding to + * this IFO file. This data is only located in the video title set information + * file. This structure is mandatory, and must be included in the VTSI file. + * This call fills the ifofile->vts_c_adt structure and its substructures. + */ +int ifoRead_TITLE_C_ADT(ifo_handle_t *); + +/** + * okay = ifoRead_VOBU_ADMAP(ifofile); + * + * Reads in the VOBU address map for the menu VOB. For the video manager, this + * corresponds to the VIDEO_TS.VOB file, and for each title set, this + * corresponds to the VTS_XX_0.VOB file. This data is located in both the + * video manager and video title set information files. For VMGI files, this + * fills the ifofile->vmgm_vobu_admap structure and all its substructures. For + * VTSI files, this fills the ifofile->vtsm_vobu_admap structure. + */ +int ifoRead_VOBU_ADMAP(ifo_handle_t *); + +/** + * okay = ifoRead_TITLE_VOBU_ADMAP(ifofile); + * + * Reads in the VOBU address map for the associated video title set. This data + * is only located in the video title set information file. This structure is + * mandatory, and must be included in the VTSI file. Fills the + * ifofile->vts_vobu_admap structure and its substructures. + */ +int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *); + +/** + * okay = ifoRead_TXTDT_MGI(ifofile); + * + * Reads in the text data strings for the DVD. Fills the ifofile->txtdt_mgi + * structure and all its substructures. This data is only located in the video + * manager information file. This structure is mandatory, and must be included + * in the VMGI file. + */ +int ifoRead_TXTDT_MGI(ifo_handle_t *); + +/** + * The following functions are used for freeing parsed sections of the + * ifo_handle_t structure and the allocated substructures. The free calls + * below are safe: they will not mind if you attempt to free part of an IFO + * file which was not read in or which does not exist. + */ +void ifoFree_PTL_MAIT(ifo_handle_t *); +void ifoFree_VTS_ATRT(ifo_handle_t *); +void ifoFree_TT_SRPT(ifo_handle_t *); +void ifoFree_VTS_PTT_SRPT(ifo_handle_t *); +void ifoFree_FP_PGC(ifo_handle_t *); +void ifoFree_PGCIT(ifo_handle_t *); +void ifoFree_PGCI_UT(ifo_handle_t *); +void ifoFree_VTS_TMAPT(ifo_handle_t *); +void ifoFree_C_ADT(ifo_handle_t *); +void ifoFree_TITLE_C_ADT(ifo_handle_t *); +void ifoFree_VOBU_ADMAP(ifo_handle_t *); +void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *); +void ifoFree_TXTDT_MGI(ifo_handle_t *); + +#ifdef __cplusplus +}; +#endif +#endif /* IFO_READ_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/ifo_types.h k9copy-2.2.0/src/dvdreadnew/ifo_types.h --- k9copy-2.1.0/src/dvdreadnew/ifo_types.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/ifo_types.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,893 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef IFO_TYPES_H_INCLUDED +#define IFO_TYPES_H_INCLUDED + +/* + * Copyright (C) 2000, 2001 Bj�rn Englund , + * H�kan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "dvd_reader.h" + +#if defined(__BEOS__) +#if !defined(_INTTYPES_H_) && !defined(_INTTYPES_H) && !defined(_STDINT_H_) && !defined(_STDINT_H) +#error "Must include or before any libdvdread header." +#endif +#else +#if !defined(UINT8_MAX) || !defined(UINT16_MAX) || !defined(INT32_MAX) +#error "Must include or before any libdvdread header." +#endif +#endif + +#undef ATTRIBUTE_PACKED +#undef PRAGMA_PACK_BEGIN +#undef PRAGMA_PACK_END + +#if defined(__GNUC__) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +#define ATTRIBUTE_PACKED __attribute__ ((packed)) +#define PRAGMA_PACK 0 +#endif +#endif + +#if !defined(ATTRIBUTE_PACKED) +#define ATTRIBUTE_PACKED +#define PRAGMA_PACK 1 +#endif + +#if PRAGMA_PACK +#pragma pack(1) +#endif + + +/** + * Common + * + * The following structures are used in both the VMGI and VTSI. + */ + + +/** + * DVD Time Information. + */ +typedef struct { + uint8_t hour; + uint8_t minute; + uint8_t second; + uint8_t frame_u; /* The two high bits are the frame rate. */ +} ATTRIBUTE_PACKED dvd_time_t; + +/** + * Type to store per-command data. + */ +typedef struct { + uint8_t bytes[8]; +} ATTRIBUTE_PACKED vm_cmd_t; +#define COMMAND_DATA_SIZE 8U + + +/** + * Video Attributes. + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int mpeg_version : 2; + unsigned int video_format : 2; + unsigned int display_aspect_ratio : 2; + unsigned int permitted_df : 2; + + unsigned int line21_cc_1 : 1; + unsigned int line21_cc_2 : 1; + unsigned int unknown1 : 1; + unsigned int bit_rate : 1; + + unsigned int picture_size : 2; + unsigned int letterboxed : 1; + unsigned int film_mode : 1; +#else + unsigned int permitted_df : 2; + unsigned int display_aspect_ratio : 2; + unsigned int video_format : 2; + unsigned int mpeg_version : 2; + + unsigned int film_mode : 1; + unsigned int letterboxed : 1; + unsigned int picture_size : 2; + + unsigned int bit_rate : 1; + unsigned int unknown1 : 1; + unsigned int line21_cc_2 : 1; + unsigned int line21_cc_1 : 1; +#endif +} ATTRIBUTE_PACKED video_attr_t; + +/** + * Audio Attributes. + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int audio_format : 3; + unsigned int multichannel_extension : 1; + unsigned int lang_type : 2; + unsigned int application_mode : 2; + + unsigned int quantization : 2; + unsigned int sample_frequency : 2; + unsigned int unknown1 : 1; + unsigned int channels : 3; +#else + unsigned int application_mode : 2; + unsigned int lang_type : 2; + unsigned int multichannel_extension : 1; + unsigned int audio_format : 3; + + unsigned int channels : 3; + unsigned int unknown1 : 1; + unsigned int sample_frequency : 2; + unsigned int quantization : 2; +#endif + uint16_t lang_code; + uint8_t lang_extension; + uint8_t code_extension; + uint8_t unknown3; + union { + struct { +#ifdef WORDS_BIGENDIAN + unsigned int unknown4 : 1; + unsigned int channel_assignment : 3; + unsigned int version : 2; + unsigned int mc_intro : 1; /* probably 0: true, 1:false */ + unsigned int mode : 1; /* Karaoke mode 0: solo 1: duet */ +#else + unsigned int mode : 1; + unsigned int mc_intro : 1; + unsigned int version : 2; + unsigned int channel_assignment : 3; + unsigned int unknown4 : 1; +#endif + } ATTRIBUTE_PACKED karaoke; + struct { +#ifdef WORDS_BIGENDIAN + unsigned int unknown5 : 4; + unsigned int dolby_encoded : 1; /* suitable for surround decoding */ + unsigned int unknown6 : 3; +#else + unsigned int unknown6 : 3; + unsigned int dolby_encoded : 1; + unsigned int unknown5 : 4; +#endif + } ATTRIBUTE_PACKED surround; + } ATTRIBUTE_PACKED app_info; +} ATTRIBUTE_PACKED audio_attr_t; + + +/** + * MultiChannel Extension + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int zero1 : 7; + unsigned int ach0_gme : 1; + + unsigned int zero2 : 7; + unsigned int ach1_gme : 1; + + unsigned int zero3 : 4; + unsigned int ach2_gv1e : 1; + unsigned int ach2_gv2e : 1; + unsigned int ach2_gm1e : 1; + unsigned int ach2_gm2e : 1; + + unsigned int zero4 : 4; + unsigned int ach3_gv1e : 1; + unsigned int ach3_gv2e : 1; + unsigned int ach3_gmAe : 1; + unsigned int ach3_se2e : 1; + + unsigned int zero5 : 4; + unsigned int ach4_gv1e : 1; + unsigned int ach4_gv2e : 1; + unsigned int ach4_gmBe : 1; + unsigned int ach4_seBe : 1; +#else + unsigned int ach0_gme : 1; + unsigned int zero1 : 7; + + unsigned int ach1_gme : 1; + unsigned int zero2 : 7; + + unsigned int ach2_gm2e : 1; + unsigned int ach2_gm1e : 1; + unsigned int ach2_gv2e : 1; + unsigned int ach2_gv1e : 1; + unsigned int zero3 : 4; + + unsigned int ach3_se2e : 1; + unsigned int ach3_gmAe : 1; + unsigned int ach3_gv2e : 1; + unsigned int ach3_gv1e : 1; + unsigned int zero4 : 4; + + unsigned int ach4_seBe : 1; + unsigned int ach4_gmBe : 1; + unsigned int ach4_gv2e : 1; + unsigned int ach4_gv1e : 1; + unsigned int zero5 : 4; +#endif + uint8_t zero6[19]; +} ATTRIBUTE_PACKED multichannel_ext_t; + + +/** + * Subpicture Attributes. + */ +typedef struct { + /* + * type: 0 not specified + * 1 language + * 2 other + * coding mode: 0 run length + * 1 extended + * 2 other + * language: indicates language if type == 1 + * lang extension: if type == 1 contains the lang extension + */ +#ifdef WORDS_BIGENDIAN + unsigned int code_mode : 3; + unsigned int zero1 : 3; + unsigned int type : 2; +#else + unsigned int type : 2; + unsigned int zero1 : 3; + unsigned int code_mode : 3; +#endif + uint8_t zero2; + uint16_t lang_code; + uint8_t lang_extension; + uint8_t code_extension; +} ATTRIBUTE_PACKED subp_attr_t; + + + +/** + * PGC Command Table. + */ +typedef struct { + uint16_t nr_of_pre; + uint16_t nr_of_post; + uint16_t nr_of_cell; + uint16_t last_byte; + vm_cmd_t *pre_cmds; + vm_cmd_t *post_cmds; + vm_cmd_t *cell_cmds; +} ATTRIBUTE_PACKED pgc_command_tbl_t; +#define PGC_COMMAND_TBL_SIZE 8U + +/** + * PGC Program Map + */ +typedef uint8_t pgc_program_map_t; + +/** + * Cell Playback Information. + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int block_mode : 2; + unsigned int block_type : 2; + unsigned int seamless_play : 1; + unsigned int interleaved : 1; + unsigned int stc_discontinuity: 1; + unsigned int seamless_angle : 1; + + unsigned int playback_mode : 1; /**< When set, enter StillMode after each VOBU */ + unsigned int restricted : 1; /**< ?? drop out of fastforward? */ + unsigned int unknown2 : 6; +#else + unsigned int seamless_angle : 1; + unsigned int stc_discontinuity: 1; + unsigned int interleaved : 1; + unsigned int seamless_play : 1; + unsigned int block_type : 2; + unsigned int block_mode : 2; + + unsigned int unknown2 : 6; + unsigned int restricted : 1; + unsigned int playback_mode : 1; +#endif + uint8_t still_time; + uint8_t cell_cmd_nr; + dvd_time_t playback_time; + uint32_t first_sector; + uint32_t first_ilvu_end_sector; + uint32_t last_vobu_start_sector; + uint32_t last_sector; +} ATTRIBUTE_PACKED cell_playback_t; + +#define BLOCK_TYPE_NONE 0x0 +#define BLOCK_TYPE_ANGLE_BLOCK 0x1 + +#define BLOCK_MODE_NOT_IN_BLOCK 0x0 +#define BLOCK_MODE_FIRST_CELL 0x1 +#define BLOCK_MODE_IN_BLOCK 0x2 +#define BLOCK_MODE_LAST_CELL 0x3 + +/** + * Cell Position Information. + */ +typedef struct { + uint16_t vob_id_nr; + uint8_t zero_1; + uint8_t cell_nr; +} ATTRIBUTE_PACKED cell_position_t; + +/** + * User Operations. + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int zero : 7; /* 25-31 */ + unsigned int video_pres_mode_change : 1; /* 24 */ + + unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ + unsigned int angle_change : 1; + unsigned int subpic_stream_change : 1; + unsigned int audio_stream_change : 1; + unsigned int pause_on : 1; + unsigned int still_off : 1; + unsigned int button_select_or_activate : 1; + unsigned int resume : 1; /* 16 */ + + unsigned int chapter_menu_call : 1; /* 15 */ + unsigned int angle_menu_call : 1; + unsigned int audio_menu_call : 1; + unsigned int subpic_menu_call : 1; + unsigned int root_menu_call : 1; + unsigned int title_menu_call : 1; + unsigned int backward_scan : 1; + unsigned int forward_scan : 1; /* 8 */ + + unsigned int next_pg_search : 1; /* 7 */ + unsigned int prev_or_top_pg_search : 1; + unsigned int time_or_chapter_search : 1; + unsigned int go_up : 1; + unsigned int stop : 1; + unsigned int title_play : 1; + unsigned int chapter_search_or_play : 1; + unsigned int title_or_time_play : 1; /* 0 */ +#else + unsigned int video_pres_mode_change : 1; /* 24 */ + unsigned int zero : 7; /* 25-31 */ + + unsigned int resume : 1; /* 16 */ + unsigned int button_select_or_activate : 1; + unsigned int still_off : 1; + unsigned int pause_on : 1; + unsigned int audio_stream_change : 1; + unsigned int subpic_stream_change : 1; + unsigned int angle_change : 1; + unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ + + unsigned int forward_scan : 1; /* 8 */ + unsigned int backward_scan : 1; + unsigned int title_menu_call : 1; + unsigned int root_menu_call : 1; + unsigned int subpic_menu_call : 1; + unsigned int audio_menu_call : 1; + unsigned int angle_menu_call : 1; + unsigned int chapter_menu_call : 1; /* 15 */ + + unsigned int title_or_time_play : 1; /* 0 */ + unsigned int chapter_search_or_play : 1; + unsigned int title_play : 1; + unsigned int stop : 1; + unsigned int go_up : 1; + unsigned int time_or_chapter_search : 1; + unsigned int prev_or_top_pg_search : 1; + unsigned int next_pg_search : 1; /* 7 */ +#endif +} ATTRIBUTE_PACKED user_ops_t; + +/** + * Program Chain Information. + */ +typedef struct { + uint16_t zero_1; + uint8_t nr_of_programs; + uint8_t nr_of_cells; + dvd_time_t playback_time; + user_ops_t prohibited_ops; + uint16_t audio_control[8]; /* New type? */ + uint32_t subp_control[32]; /* New type? */ + uint16_t next_pgc_nr; + uint16_t prev_pgc_nr; + uint16_t goup_pgc_nr; + uint8_t pg_playback_mode; + uint8_t still_time; + uint32_t palette[16]; /* New type struct {zero_1, Y, Cr, Cb} ? */ + uint16_t command_tbl_offset; + uint16_t program_map_offset; + uint16_t cell_playback_offset; + uint16_t cell_position_offset; + pgc_command_tbl_t *command_tbl; + pgc_program_map_t *program_map; + cell_playback_t *cell_playback; + cell_position_t *cell_position; +} ATTRIBUTE_PACKED pgc_t; +#define PGC_SIZE 236U + +/** + * Program Chain Information Search Pointer. + */ +typedef struct { + uint8_t entry_id; +#ifdef WORDS_BIGENDIAN + unsigned int block_mode : 2; + unsigned int block_type : 2; + unsigned int unknown1 : 4; +#else + unsigned int unknown1 : 4; + unsigned int block_type : 2; + unsigned int block_mode : 2; +#endif + uint16_t ptl_id_mask; + uint32_t pgc_start_byte; + pgc_t *pgc; +} ATTRIBUTE_PACKED pgci_srp_t; +#define PGCI_SRP_SIZE 8U + +/** + * Program Chain Information Table. + */ +typedef struct { + uint16_t nr_of_pgci_srp; + uint16_t zero_1; + uint32_t last_byte; + pgci_srp_t *pgci_srp; +} ATTRIBUTE_PACKED pgcit_t; +#define PGCIT_SIZE 8U + +/** + * Menu PGCI Language Unit. + */ +typedef struct { + uint16_t lang_code; + uint8_t lang_extension; + uint8_t exists; + uint32_t lang_start_byte; + pgcit_t *pgcit; +} ATTRIBUTE_PACKED pgci_lu_t; +#define PGCI_LU_SIZE 8U + +/** + * Menu PGCI Unit Table. + */ +typedef struct { + uint16_t nr_of_lus; + uint16_t zero_1; + uint32_t last_byte; + pgci_lu_t *lu; +} ATTRIBUTE_PACKED pgci_ut_t; +#define PGCI_UT_SIZE 8U + +/** + * Cell Address Information. + */ +typedef struct { + uint16_t vob_id; + uint8_t cell_id; + uint8_t zero_1; + uint32_t start_sector; + uint32_t last_sector; +} ATTRIBUTE_PACKED cell_adr_t; + +/** + * Cell Address Table. + */ +typedef struct { + uint16_t nr_of_vobs; /* VOBs */ + uint16_t zero_1; + uint32_t last_byte; + cell_adr_t *cell_adr_table; /* No explicit size given. */ +} ATTRIBUTE_PACKED c_adt_t; +#define C_ADT_SIZE 8U + +/** + * VOBU Address Map. + */ +typedef struct { + uint32_t last_byte; + uint32_t *vobu_start_sectors; +} ATTRIBUTE_PACKED vobu_admap_t; +#define VOBU_ADMAP_SIZE 4U + + + + +/** + * VMGI + * + * The following structures relate to the Video Manager. + */ + +/** + * Video Manager Information Management Table. + */ +typedef struct { + char vmg_identifier[12]; + uint32_t vmg_last_sector; + uint8_t zero_1[12]; + uint32_t vmgi_last_sector; + uint8_t zero_2; + uint8_t specification_version; + uint32_t vmg_category; + uint16_t vmg_nr_of_volumes; + uint16_t vmg_this_volume_nr; + uint8_t disc_side; + uint8_t zero_3[19]; + uint16_t vmg_nr_of_title_sets; /* Number of VTSs. */ + char provider_identifier[32]; + uint64_t vmg_pos_code; + uint8_t zero_4[24]; + uint32_t vmgi_last_byte; + uint32_t first_play_pgc; + uint8_t zero_5[56]; + uint32_t vmgm_vobs; /* sector */ + uint32_t tt_srpt; /* sector */ + uint32_t vmgm_pgci_ut; /* sector */ + uint32_t ptl_mait; /* sector */ + uint32_t vts_atrt; /* sector */ + uint32_t txtdt_mgi; /* sector */ + uint32_t vmgm_c_adt; /* sector */ + uint32_t vmgm_vobu_admap; /* sector */ + uint8_t zero_6[32]; + + video_attr_t vmgm_video_attr; + uint8_t zero_7; + uint8_t nr_of_vmgm_audio_streams; /* should be 0 or 1 */ + audio_attr_t vmgm_audio_attr; + audio_attr_t zero_8[7]; + uint8_t zero_9[17]; + uint8_t nr_of_vmgm_subp_streams; /* should be 0 or 1 */ + subp_attr_t vmgm_subp_attr; + subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */ +} ATTRIBUTE_PACKED vmgi_mat_t; + +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int zero_1 : 1; + unsigned int multi_or_random_pgc_title : 1; /* 0: one sequential pgc title */ + unsigned int jlc_exists_in_cell_cmd : 1; + unsigned int jlc_exists_in_prepost_cmd : 1; + unsigned int jlc_exists_in_button_cmd : 1; + unsigned int jlc_exists_in_tt_dom : 1; + unsigned int chapter_search_or_play : 1; /* UOP 1 */ + unsigned int title_or_time_play : 1; /* UOP 0 */ +#else + unsigned int title_or_time_play : 1; + unsigned int chapter_search_or_play : 1; + unsigned int jlc_exists_in_tt_dom : 1; + unsigned int jlc_exists_in_button_cmd : 1; + unsigned int jlc_exists_in_prepost_cmd : 1; + unsigned int jlc_exists_in_cell_cmd : 1; + unsigned int multi_or_random_pgc_title : 1; + unsigned int zero_1 : 1; +#endif +} ATTRIBUTE_PACKED playback_type_t; + +/** + * Title Information. + */ +typedef struct { + playback_type_t pb_ty; + uint8_t nr_of_angles; + uint16_t nr_of_ptts; + uint16_t parental_id; + uint8_t title_set_nr; + uint8_t vts_ttn; + uint32_t title_set_sector; +} ATTRIBUTE_PACKED title_info_t; + +/** + * PartOfTitle Search Pointer Table. + */ +typedef struct { + uint16_t nr_of_srpts; + uint16_t zero_1; + uint32_t last_byte; + title_info_t *title; +} ATTRIBUTE_PACKED tt_srpt_t; +#define TT_SRPT_SIZE 8U + + +/** + * Parental Management Information Unit Table. + * Level 1 (US: G), ..., 7 (US: NC-17), 8 + */ +typedef uint16_t pf_level_t[8]; + +/** + * Parental Management Information Unit Table. + */ +typedef struct { + uint16_t country_code; + uint16_t zero_1; + uint16_t pf_ptl_mai_start_byte; + uint16_t zero_2; + pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is first */ +} ATTRIBUTE_PACKED ptl_mait_country_t; +#define PTL_MAIT_COUNTRY_SIZE 8U + +/** + * Parental Management Information Table. + */ +typedef struct { + uint16_t nr_of_countries; + uint16_t nr_of_vtss; + uint32_t last_byte; + ptl_mait_country_t *countries; +} ATTRIBUTE_PACKED ptl_mait_t; +#define PTL_MAIT_SIZE 8U + +/** + * Video Title Set Attributes. + */ +typedef struct { + uint32_t last_byte; + uint32_t vts_cat; + + video_attr_t vtsm_vobs_attr; + uint8_t zero_1; + uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */ + audio_attr_t vtsm_audio_attr; + audio_attr_t zero_2[7]; + uint8_t zero_3[16]; + uint8_t zero_4; + uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */ + subp_attr_t vtsm_subp_attr; + subp_attr_t zero_5[27]; + + uint8_t zero_6[2]; + + video_attr_t vtstt_vobs_video_attr; + uint8_t zero_7; + uint8_t nr_of_vtstt_audio_streams; + audio_attr_t vtstt_audio_attr[8]; + uint8_t zero_8[16]; + uint8_t zero_9; + uint8_t nr_of_vtstt_subp_streams; + subp_attr_t vtstt_subp_attr[32]; +} ATTRIBUTE_PACKED vts_attributes_t; +#define VTS_ATTRIBUTES_SIZE 542U +#define VTS_ATTRIBUTES_MIN_SIZE 356U + +/** + * Video Title Set Attribute Table. + */ +typedef struct { + uint16_t nr_of_vtss; + uint16_t zero_1; + uint32_t last_byte; + vts_attributes_t *vts; + uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes */ +} ATTRIBUTE_PACKED vts_atrt_t; +#define VTS_ATRT_SIZE 8U + +/** + * Text Data. (Incomplete) + */ +typedef struct { + uint32_t last_byte; /* offsets are relative here */ + uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */ +#if 0 + uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */ + uint16_t zero_1; + + uint8_t type_of_info; /* ?? 01 == disc, 02 == Title, 04 == Title part */ + uint8_t unknown1; + uint8_t unknown2; + uint8_t unknown3; + uint8_t unknown4; /* ?? allways 0x30 language?, text format? */ + uint8_t unknown5; + uint16_t offset; /* from first */ + + char text[12]; /* ended by 0x09 */ +#endif +} ATTRIBUTE_PACKED txtdt_t; + +/** + * Text Data Language Unit. (Incomplete) + */ +typedef struct { + uint16_t lang_code; + uint16_t unknown; /* 0x0001, title 1? disc 1? side 1? */ + uint32_t txtdt_start_byte; /* prt, rel start of vmg_txtdt_mgi */ + txtdt_t *txtdt; +} ATTRIBUTE_PACKED txtdt_lu_t; +#define TXTDT_LU_SIZE 8U + +/** + * Text Data Manager Information. (Incomplete) + */ +typedef struct { + char disc_name[14]; /* how many bytes?? */ + uint16_t nr_of_language_units; /* 32bit?? */ + uint32_t last_byte; + txtdt_lu_t *lu; +} ATTRIBUTE_PACKED txtdt_mgi_t; +#define TXTDT_MGI_SIZE 20U + + +/** + * VTS + * + * Structures relating to the Video Title Set (VTS). + */ + +/** + * Video Title Set Information Management Table. + */ +typedef struct { + char vts_identifier[12]; + uint32_t vts_last_sector; + uint8_t zero_1[12]; + uint32_t vtsi_last_sector; + uint8_t zero_2; + uint8_t specification_version; + uint32_t vts_category; + uint16_t zero_3; + uint16_t zero_4; + uint8_t zero_5; + uint8_t zero_6[19]; + uint16_t zero_7; + uint8_t zero_8[32]; + uint64_t zero_9; + uint8_t zero_10[24]; + uint32_t vtsi_last_byte; + uint32_t zero_11; + uint8_t zero_12[56]; + uint32_t vtsm_vobs; /* sector */ + uint32_t vtstt_vobs; /* sector */ + uint32_t vts_ptt_srpt; /* sector */ + uint32_t vts_pgcit; /* sector */ + uint32_t vtsm_pgci_ut; /* sector */ + uint32_t vts_tmapt; /* sector */ + uint32_t vtsm_c_adt; /* sector */ + uint32_t vtsm_vobu_admap; /* sector */ + uint32_t vts_c_adt; /* sector */ + uint32_t vts_vobu_admap; /* sector */ + uint8_t zero_13[24]; + + video_attr_t vtsm_video_attr; + uint8_t zero_14; + uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */ + audio_attr_t vtsm_audio_attr; + audio_attr_t zero_15[7]; + uint8_t zero_16[17]; + uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */ + subp_attr_t vtsm_subp_attr; + subp_attr_t zero_17[27]; + uint8_t zero_18[2]; + + video_attr_t vts_video_attr; + uint8_t zero_19; + uint8_t nr_of_vts_audio_streams; + audio_attr_t vts_audio_attr[8]; + uint8_t zero_20[17]; + uint8_t nr_of_vts_subp_streams; + subp_attr_t vts_subp_attr[32]; + uint16_t zero_21; + multichannel_ext_t vts_mu_audio_attr[8]; + /* XXX: how much 'padding' here, if any? */ +} ATTRIBUTE_PACKED vtsi_mat_t; + +/** + * PartOfTitle Unit Information. + */ +typedef struct { + uint16_t pgcn; + uint16_t pgn; +} ATTRIBUTE_PACKED ptt_info_t; + +/** + * PartOfTitle Information. + */ +typedef struct { + uint16_t nr_of_ptts; + ptt_info_t *ptt; +} ATTRIBUTE_PACKED ttu_t; + +/** + * PartOfTitle Search Pointer Table. + */ +typedef struct { + uint16_t nr_of_srpts; + uint16_t zero_1; + uint32_t last_byte; + ttu_t *title; + uint32_t *ttu_offset; /* offset table for each ttu */ +} ATTRIBUTE_PACKED vts_ptt_srpt_t; +#define VTS_PTT_SRPT_SIZE 8U + + +/** + * Time Map Entry. + */ +/* Should this be bit field at all or just the uint32_t? */ +typedef uint32_t map_ent_t; + +/** + * Time Map. + */ +typedef struct { + uint8_t tmu; /* Time unit, in seconds */ + uint8_t zero_1; + uint16_t nr_of_entries; + map_ent_t *map_ent; +} ATTRIBUTE_PACKED vts_tmap_t; +#define VTS_TMAP_SIZE 4U + +/** + * Time Map Table. + */ +typedef struct { + uint16_t nr_of_tmaps; + uint16_t zero_1; + uint32_t last_byte; + vts_tmap_t *tmap; + uint32_t *tmap_offset; /* offset table for each tmap */ +} ATTRIBUTE_PACKED vts_tmapt_t; +#define VTS_TMAPT_SIZE 8U + + +#if PRAGMA_PACK +#pragma pack() +#endif + + +/** + * The following structure defines an IFO file. The structure is divided into + * two parts, the VMGI, or Video Manager Information, which is read from the + * VIDEO_TS.[IFO,BUP] file, and the VTSI, or Video Title Set Information, which + * is read in from the VTS_XX_0.[IFO,BUP] files. + */ +typedef struct { + dvd_file_t *file; + + /* VMGI */ + vmgi_mat_t *vmgi_mat; + tt_srpt_t *tt_srpt; + pgc_t *first_play_pgc; + ptl_mait_t *ptl_mait; + vts_atrt_t *vts_atrt; + txtdt_mgi_t *txtdt_mgi; + + /* Common */ + pgci_ut_t *pgci_ut; + c_adt_t *menu_c_adt; + vobu_admap_t *menu_vobu_admap; + + /* VTSI */ + vtsi_mat_t *vtsi_mat; + vts_ptt_srpt_t *vts_ptt_srpt; + pgcit_t *vts_pgcit; + vts_tmapt_t *vts_tmapt; + c_adt_t *vts_c_adt; + vobu_admap_t *vts_vobu_admap; +} ifo_handle_t; + +#endif /* IFO_TYPES_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/md5.c k9copy-2.2.0/src/dvdreadnew/md5.c --- k9copy-2.1.0/src/dvdreadnew/md5.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/md5.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,407 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* md5.c - Functions to compute MD5 message digest of files or memory blocks + according to the definition of MD5 in RFC 1321 from April 1992. + Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc. + NOTE: The canonical source of this file is maintained with the GNU C + Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Ulrich Drepper , 1995. */ + +#include "config.h" + +#include +#include +#include +#include "md5.h" + +#ifdef _LIBC +# include +# if __BYTE_ORDER == __BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +# endif +#endif + +#ifdef WORDS_BIGENDIAN +# define SWAP(n) \ + (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) +#else +# define SWAP(n) (n) +#endif + + +/* This array contains the bytes used to pad the buffer to the next + 64-byte boundary. (RFC 1321, 3.1: Step 1) */ +static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; + + +/* Initialize structure containing state of computation. + (RFC 1321, 3.3: Step 3) */ +void +md5_init_ctx (ctx) + struct md5_ctx *ctx; +{ + ctx->A = 0x67452301; + ctx->B = 0xefcdab89; + ctx->C = 0x98badcfe; + ctx->D = 0x10325476; + + ctx->total[0] = ctx->total[1] = 0; + ctx->buflen = 0; +} + +/* Put result from CTX in first 16 bytes following RESBUF. The result + must be in little endian byte order. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +void * +md5_read_ctx (ctx, resbuf) + const struct md5_ctx *ctx; + void *resbuf; +{ + ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); + ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); + ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); + ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); + + return resbuf; +} + +/* Process the remaining bytes in the internal buffer and the usual + prolog according to the standard and write the result to RESBUF. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +void * +md5_finish_ctx (ctx, resbuf) + struct md5_ctx *ctx; + void *resbuf; +{ + /* Take yet unprocessed bytes into account. */ + md5_uint32 bytes = ctx->buflen; + size_t pad; + + /* Now count remaining bytes. */ + ctx->total[0] += bytes; + if (ctx->total[0] < bytes) + ++ctx->total[1]; + + pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; + memcpy (&ctx->buffer[bytes], fillbuf, pad); + + /* Put the 64-bit file length in *bits* at the end of the buffer. */ + *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); + *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | + (ctx->total[0] >> 29)); + + /* Process last bytes. */ + md5_process_block (ctx->buffer, bytes + pad + 8, ctx); + + return md5_read_ctx (ctx, resbuf); +} + +/* Compute MD5 message digest for bytes read from STREAM. The + resulting message digest number will be written into the 16 bytes + beginning at RESBLOCK. */ +int +md5_stream (stream, resblock) + FILE *stream; + void *resblock; +{ + /* Important: BLOCKSIZE must be a multiple of 64. */ +#define BLOCKSIZE 4096 + struct md5_ctx ctx; + char buffer[BLOCKSIZE + 72]; + size_t sum; + + /* Initialize the computation context. */ + md5_init_ctx (&ctx); + + /* Iterate over full file contents. */ + while (1) + { + /* We read the file in blocks of BLOCKSIZE bytes. One call of the + computation function processes the whole buffer so that with the + next round of the loop another block can be read. */ + size_t n; + sum = 0; + + /* Read block. Take care for partial reads. */ + do + { + n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); + + sum += n; + } + while (sum < BLOCKSIZE && n != 0); + if (n == 0 && ferror (stream)) + return 1; + + /* If end of file is reached, end the loop. */ + if (n == 0) + break; + + /* Process buffer with BLOCKSIZE bytes. Note that + BLOCKSIZE % 64 == 0 + */ + md5_process_block (buffer, BLOCKSIZE, &ctx); + } + + /* Add the last bytes if necessary. */ + if (sum > 0) + md5_process_bytes (buffer, sum, &ctx); + + /* Construct result in desired memory. */ + md5_finish_ctx (&ctx, resblock); + return 0; +} + +/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The + result is always in little endian byte order, so that a byte-wise + output yields to the wanted ASCII representation of the message + digest. */ +void * +md5_buffer (buffer, len, resblock) + const char *buffer; + size_t len; + void *resblock; +{ + struct md5_ctx ctx; + + /* Initialize the computation context. */ + md5_init_ctx (&ctx); + + /* Process whole buffer but last len % 64 bytes. */ + md5_process_bytes (buffer, len, &ctx); + + /* Put result in desired memory area. */ + return md5_finish_ctx (&ctx, resblock); +} + + +void +md5_process_bytes (buffer, len, ctx) + const void *buffer; + size_t len; + struct md5_ctx *ctx; +{ + /* When we already have some bits in our internal buffer concatenate + both inputs first. */ + if (ctx->buflen != 0) + { + size_t left_over = ctx->buflen; + size_t add = 128 - left_over > len ? len : 128 - left_over; + + memcpy (&ctx->buffer[left_over], buffer, add); + ctx->buflen += add; + + if (left_over + add > 64) + { + md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx); + /* The regions in the following copy operation cannot overlap. */ + memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], + (left_over + add) & 63); + ctx->buflen = (left_over + add) & 63; + } + + buffer = (const char *) buffer + add; + len -= add; + } + + /* Process available complete blocks. */ + if (len > 64) + { + md5_process_block (buffer, len & ~63, ctx); + buffer = (const char *) buffer + (len & ~63); + len &= 63; + } + + /* Move remaining bytes in internal buffer. */ + if (len > 0) + { + memcpy (ctx->buffer, buffer, len); + ctx->buflen = len; + } +} + + +/* These are the four functions used in the four steps of the MD5 algorithm + and defined in the RFC 1321. The first function is a little bit optimized + (as found in Colin Plumbs public domain implementation). */ +/* #define FF(b, c, d) ((b & c) | (~b & d)) */ +#define FF(b, c, d) (d ^ (b & (c ^ d))) +#define FG(b, c, d) FF (d, b, c) +#define FH(b, c, d) (b ^ c ^ d) +#define FI(b, c, d) (c ^ (b | ~d)) + +/* Process LEN bytes of BUFFER, accumulating context into CTX. + It is assumed that LEN % 64 == 0. */ + +void +md5_process_block (buffer, len, ctx) + const void *buffer; + size_t len; + struct md5_ctx *ctx; +{ + md5_uint32 correct_words[16]; + const md5_uint32 *words = buffer; + size_t nwords = len / sizeof (md5_uint32); + const md5_uint32 *endp = words + nwords; + md5_uint32 A = ctx->A; + md5_uint32 B = ctx->B; + md5_uint32 C = ctx->C; + md5_uint32 D = ctx->D; + + /* First increment the byte count. RFC 1321 specifies the possible + length of the file up to 2^64 bits. Here we only compute the + number of bytes. Do a double word increment. */ + ctx->total[0] += len; + if (ctx->total[0] < len) + ++ctx->total[1]; + + /* Process all bytes in the buffer with 64 bytes in each round of + the loop. */ + while (words < endp) + { + md5_uint32 *cwp = correct_words; + md5_uint32 A_save = A; + md5_uint32 B_save = B; + md5_uint32 C_save = C; + md5_uint32 D_save = D; + + /* First round: using the given function, the context and a constant + the next context is computed. Because the algorithms processing + unit is a 32-bit word and it is determined to work on words in + little endian byte order we perhaps have to change the byte order + before the computation. To reduce the work for the next steps + we store the swapped words in the array CORRECT_WORDS. */ + +#define OP(a, b, c, d, s, T) \ + do \ + { \ + a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ + ++words; \ + a = rol (a, s); \ + a += b; \ + } \ + while (0) + + /* Before we start, one word to the strange constants. + They are defined in RFC 1321 as + + T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64, or + perl -e 'foreach(1..64){printf "0x%08x\n", int (4294967296 * abs (sin $_))}' + */ + + /* Round 1. */ + OP (A, B, C, D, 7, 0xd76aa478); + OP (D, A, B, C, 12, 0xe8c7b756); + OP (C, D, A, B, 17, 0x242070db); + OP (B, C, D, A, 22, 0xc1bdceee); + OP (A, B, C, D, 7, 0xf57c0faf); + OP (D, A, B, C, 12, 0x4787c62a); + OP (C, D, A, B, 17, 0xa8304613); + OP (B, C, D, A, 22, 0xfd469501); + OP (A, B, C, D, 7, 0x698098d8); + OP (D, A, B, C, 12, 0x8b44f7af); + OP (C, D, A, B, 17, 0xffff5bb1); + OP (B, C, D, A, 22, 0x895cd7be); + OP (A, B, C, D, 7, 0x6b901122); + OP (D, A, B, C, 12, 0xfd987193); + OP (C, D, A, B, 17, 0xa679438e); + OP (B, C, D, A, 22, 0x49b40821); + + /* For the second to fourth round we have the possibly swapped words + in CORRECT_WORDS. Redefine the macro to take an additional first + argument specifying the function to use. */ +#undef OP +#define OP(f, a, b, c, d, k, s, T) \ + do \ + { \ + a += f (b, c, d) + correct_words[k] + T; \ + a = rol (a, s); \ + a += b; \ + } \ + while (0) + + /* Round 2. */ + OP (FG, A, B, C, D, 1, 5, 0xf61e2562); + OP (FG, D, A, B, C, 6, 9, 0xc040b340); + OP (FG, C, D, A, B, 11, 14, 0x265e5a51); + OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); + OP (FG, A, B, C, D, 5, 5, 0xd62f105d); + OP (FG, D, A, B, C, 10, 9, 0x02441453); + OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); + OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); + OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); + OP (FG, D, A, B, C, 14, 9, 0xc33707d6); + OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); + OP (FG, B, C, D, A, 8, 20, 0x455a14ed); + OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); + OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); + OP (FG, C, D, A, B, 7, 14, 0x676f02d9); + OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); + + /* Round 3. */ + OP (FH, A, B, C, D, 5, 4, 0xfffa3942); + OP (FH, D, A, B, C, 8, 11, 0x8771f681); + OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); + OP (FH, B, C, D, A, 14, 23, 0xfde5380c); + OP (FH, A, B, C, D, 1, 4, 0xa4beea44); + OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); + OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); + OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); + OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); + OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); + OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); + OP (FH, B, C, D, A, 6, 23, 0x04881d05); + OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); + OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); + OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); + OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); + + /* Round 4. */ + OP (FI, A, B, C, D, 0, 6, 0xf4292244); + OP (FI, D, A, B, C, 7, 10, 0x432aff97); + OP (FI, C, D, A, B, 14, 15, 0xab9423a7); + OP (FI, B, C, D, A, 5, 21, 0xfc93a039); + OP (FI, A, B, C, D, 12, 6, 0x655b59c3); + OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); + OP (FI, C, D, A, B, 10, 15, 0xffeff47d); + OP (FI, B, C, D, A, 1, 21, 0x85845dd1); + OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); + OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); + OP (FI, C, D, A, B, 6, 15, 0xa3014314); + OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); + OP (FI, A, B, C, D, 4, 6, 0xf7537e82); + OP (FI, D, A, B, C, 11, 10, 0xbd3af235); + OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); + OP (FI, B, C, D, A, 9, 21, 0xeb86d391); + + /* Add the starting values of the context. */ + A += A_save; + B += B_save; + C += C_save; + D += D_save; + } + + /* Put checksum in context given as argument. */ + ctx->A = A; + ctx->B = B; + ctx->C = C; + ctx->D = D; +} diff -Nru k9copy-2.1.0/src/dvdreadnew/md5.h k9copy-2.2.0/src/dvdreadnew/md5.h --- k9copy-2.1.0/src/dvdreadnew/md5.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/md5.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,162 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* md5.h - Declaration of functions and data types used for MD5 sum + computing library functions. + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. + NOTE: The canonical source of this file is maintained with the GNU C + Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _MD5_H +#define _MD5_H + +#include + +#if defined HAVE_LIMITS_H || _LIBC +# include +#endif + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#ifdef _LIBC +# include +typedef u_int32_t md5_uint32; +#else +# if defined __STDC__ && __STDC__ +# define UINT_MAX_32_BITS 4294967295U +# else +# define UINT_MAX_32_BITS 0xFFFFFFFF +# endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +# ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +# endif + +# if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned int md5_uint32; +# else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short md5_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long md5_uint32; +# else +/* The following line is intended to evoke an error. + Using #error is not portable enough. */ +"Cannot determine unsigned 32-bit data type." +# endif +# endif +# endif +#endif + +#undef __P +#if defined (__STDC__) && __STDC__ +#define __P(x) x +#else +#define __P(x) () +#endif + +/* Structure to save state of computation between the single steps. */ +struct md5_ctx +{ + md5_uint32 A; + md5_uint32 B; + md5_uint32 C; + md5_uint32 D; + + md5_uint32 total[2]; + md5_uint32 buflen; + char buffer[128]; +}; + +/* + * The following three functions are build up the low level used in + * the functions `md5_stream' and `md5_buffer'. + */ + +/* Initialize structure containing state of computation. + (RFC 1321, 3.3: Step 3) */ +extern void md5_init_ctx __P ((struct md5_ctx *ctx)); + +/* Starting with the result of former calls of this function (or the + initialization function update the context for the next LEN bytes + starting at BUFFER. + It is necessary that LEN is a multiple of 64!!! */ +extern void md5_process_block __P ((const void *buffer, size_t len, + struct md5_ctx *ctx)); + +/* Starting with the result of former calls of this function (or the + initialization function update the context for the next LEN bytes + starting at BUFFER. + It is NOT required that LEN is a multiple of 64. */ +extern void md5_process_bytes __P ((const void *buffer, size_t len, + struct md5_ctx *ctx)); + +/* Process the remaining bytes in the buffer and put result from CTX + in first 16 bytes following RESBUF. The result is always in little + endian byte order, so that a byte-wise output yields to the wanted + ASCII representation of the message digest. + + IMPORTANT: On some systems it is required that RESBUF be correctly + aligned for a 32 bits value. */ +extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); + + +/* Put result from CTX in first 16 bytes following RESBUF. The result is + always in little endian byte order, so that a byte-wise output yields + to the wanted ASCII representation of the message digest. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); + + +/* Compute MD5 message digest for bytes read from STREAM. The + resulting message digest number will be written into the 16 bytes + beginning at RESBLOCK. */ +extern int md5_stream __P ((FILE *stream, void *resblock)); + +/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The + result is always in little endian byte order, so that a byte-wise + output yields to the wanted ASCII representation of the message + digest. */ +extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); + +/* The following is from gnupg-1.0.2's cipher/bithelp.h. */ +/* Rotate a 32 bit integer by n bytes */ +#if defined __GNUC__ && defined __i386__ +static md5_uint32 +rol(md5_uint32 x, int n) +{ + __asm__("roll %%cl,%0" + :"=r" (x) + :"0" (x),"c" (n)); + return x; +} +#else +# define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) +#endif + +#endif diff -Nru k9copy-2.1.0/src/dvdreadnew/nav_read.c k9copy-2.2.0/src/dvdreadnew/nav_read.c --- k9copy-2.1.0/src/dvdreadnew/nav_read.c 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/nav_read.c 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,209 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/* + * Copyright (C) 2000, 2001, 2002, 2003 H�kan Hjort + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#if defined(HAVE_INTTYPES_H) +#include +#elif defined(HAVE_STDINT_H) +#include +#endif + +#include "bswap.h" +#include "nav_types.h" +#include "nav_read.h" +#include "dvdread_internal.h" + +void navRead_PCI(pci_t *pci, unsigned char *buffer) { + int i, j; + + CHECK_VALUE(sizeof(pci_t) == PCI_BYTES - 1); /* -1 for substream id*/ + + memcpy(pci, buffer, sizeof(pci_t)); + + /* Endian conversions */ + + /* pci pci_gi */ + B2N_32(pci->pci_gi.nv_pck_lbn); + B2N_16(pci->pci_gi.vobu_cat); + B2N_32(pci->pci_gi.vobu_s_ptm); + B2N_32(pci->pci_gi.vobu_e_ptm); + B2N_32(pci->pci_gi.vobu_se_e_ptm); + + /* pci nsml_agli */ + for(i = 0; i < 9; i++) + B2N_32(pci->nsml_agli.nsml_agl_dsta[i]); + + /* pci hli hli_gi */ + B2N_16(pci->hli.hl_gi.hli_ss); + B2N_32(pci->hli.hl_gi.hli_s_ptm); + B2N_32(pci->hli.hl_gi.hli_e_ptm); + B2N_32(pci->hli.hl_gi.btn_se_e_ptm); + + /* pci hli btn_colit */ + for(i = 0; i < 3; i++) + for(j = 0; j < 2; j++) + B2N_32(pci->hli.btn_colit.btn_coli[i][j]); + + /* NOTE: I've had to change the structure from the disk layout to get + * the packing to work with Sun's Forte C compiler. */ + + /* pci hli btni */ + for(i = 0; i < 36; i++) { + char tmp[sizeof(pci->hli.btnit[i])], swap; + memcpy(tmp, &(pci->hli.btnit[i]), sizeof(pci->hli.btnit[i])); + /* Byte 4 to 7 are 'rotated' was: ABCD EFGH IJ is: ABCG DEFH IJ */ + swap = tmp[6]; + tmp[6] = tmp[5]; + tmp[5] = tmp[4]; + tmp[4] = tmp[3]; + tmp[3] = swap; + + /* Then there are the two B2N_24(..) calls */ +#ifndef WORDS_BIGENDIAN + swap = tmp[0]; + tmp[0] = tmp[2]; + tmp[2] = swap; + + swap = tmp[4]; + tmp[4] = tmp[6]; + tmp[6] = swap; +#endif + memcpy(&(pci->hli.btnit[i]), tmp, sizeof(pci->hli.btnit[i])); + } + + +#ifndef NDEBUG + /* Asserts */ + + /* pci pci gi */ + CHECK_VALUE(pci->pci_gi.zero1 == 0); + + /* pci hli hli_gi */ + CHECK_VALUE(pci->hli.hl_gi.zero1 == 0); + CHECK_VALUE(pci->hli.hl_gi.zero2 == 0); + CHECK_VALUE(pci->hli.hl_gi.zero3 == 0); + CHECK_VALUE(pci->hli.hl_gi.zero4 == 0); + CHECK_VALUE(pci->hli.hl_gi.zero5 == 0); + + /* Are there buttons defined here? */ + if((pci->hli.hl_gi.hli_ss & 0x03) != 0) { + CHECK_VALUE(pci->hli.hl_gi.btn_ns != 0); + CHECK_VALUE(pci->hli.hl_gi.btngr_ns != 0); + } else { + CHECK_VALUE((pci->hli.hl_gi.btn_ns != 0 && pci->hli.hl_gi.btngr_ns != 0) + || (pci->hli.hl_gi.btn_ns == 0 && pci->hli.hl_gi.btngr_ns == 0)); + } + + /* pci hli btnit */ + for(i = 0; i < pci->hli.hl_gi.btngr_ns; i++) { + for(j = 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) { + int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j; + CHECK_VALUE(pci->hli.btnit[n].zero1 == 0); + CHECK_VALUE(pci->hli.btnit[n].zero2 == 0); + CHECK_VALUE(pci->hli.btnit[n].zero3 == 0); + CHECK_VALUE(pci->hli.btnit[n].zero4 == 0); + CHECK_VALUE(pci->hli.btnit[n].zero5 == 0); + CHECK_VALUE(pci->hli.btnit[n].zero6 == 0); + + if (j < pci->hli.hl_gi.btn_ns) { + CHECK_VALUE(pci->hli.btnit[n].x_start <= pci->hli.btnit[n].x_end); + CHECK_VALUE(pci->hli.btnit[n].y_start <= pci->hli.btnit[n].y_end); + CHECK_VALUE(pci->hli.btnit[n].up <= pci->hli.hl_gi.btn_ns); + CHECK_VALUE(pci->hli.btnit[n].down <= pci->hli.hl_gi.btn_ns); + CHECK_VALUE(pci->hli.btnit[n].left <= pci->hli.hl_gi.btn_ns); + CHECK_VALUE(pci->hli.btnit[n].right <= pci->hli.hl_gi.btn_ns); + /*vmcmd_verify(pci->hli.btnit[n].cmd);*/ + } else { + int k; + CHECK_VALUE(pci->hli.btnit[n].btn_coln == 0); + CHECK_VALUE(pci->hli.btnit[n].auto_action_mode == 0); + CHECK_VALUE(pci->hli.btnit[n].x_start == 0); + CHECK_VALUE(pci->hli.btnit[n].y_start == 0); + CHECK_VALUE(pci->hli.btnit[n].x_end == 0); + CHECK_VALUE(pci->hli.btnit[n].y_end == 0); + CHECK_VALUE(pci->hli.btnit[n].up == 0); + CHECK_VALUE(pci->hli.btnit[n].down == 0); + CHECK_VALUE(pci->hli.btnit[n].left == 0); + CHECK_VALUE(pci->hli.btnit[n].right == 0); + for (k = 0; k < 8; k++) + CHECK_VALUE(pci->hli.btnit[n].cmd.bytes[k] == 0); /*CHECK_ZERO?*/ + } + } + } +#endif /* !NDEBUG */ +} + +void navRead_DSI(dsi_t *dsi, unsigned char *buffer) { + int i; + + CHECK_VALUE(sizeof(dsi_t) == DSI_BYTES - 1); /* -1 for substream id*/ + + memcpy(dsi, buffer, sizeof(dsi_t)); + + /* Endian conversions */ + + /* dsi dsi gi */ + B2N_32(dsi->dsi_gi.nv_pck_scr); + B2N_32(dsi->dsi_gi.nv_pck_lbn); + B2N_32(dsi->dsi_gi.vobu_ea); + B2N_32(dsi->dsi_gi.vobu_1stref_ea); + B2N_32(dsi->dsi_gi.vobu_2ndref_ea); + B2N_32(dsi->dsi_gi.vobu_3rdref_ea); + B2N_16(dsi->dsi_gi.vobu_vob_idn); + + /* dsi sml pbi */ + B2N_16(dsi->sml_pbi.category); + B2N_32(dsi->sml_pbi.ilvu_ea); + B2N_32(dsi->sml_pbi.ilvu_sa); + B2N_16(dsi->sml_pbi.size); + B2N_32(dsi->sml_pbi.vob_v_s_s_ptm); + B2N_32(dsi->sml_pbi.vob_v_e_e_ptm); + + /* dsi sml agli */ + for(i = 0; i < 9; i++) { + B2N_32(dsi->sml_agli.data[ i ].address); + B2N_16(dsi->sml_agli.data[ i ].size); + } + + /* dsi vobu sri */ + B2N_32(dsi->vobu_sri.next_video); + for(i = 0; i < 19; i++) + B2N_32(dsi->vobu_sri.fwda[i]); + B2N_32(dsi->vobu_sri.next_vobu); + B2N_32(dsi->vobu_sri.prev_vobu); + for(i = 0; i < 19; i++) + B2N_32(dsi->vobu_sri.bwda[i]); + B2N_32(dsi->vobu_sri.prev_video); + + /* dsi synci */ + for(i = 0; i < 8; i++) + B2N_16(dsi->synci.a_synca[i]); + for(i = 0; i < 32; i++) + B2N_32(dsi->synci.sp_synca[i]); + + + /* Asserts */ + + /* dsi dsi gi */ + CHECK_VALUE(dsi->dsi_gi.zero1 == 0); +} + diff -Nru k9copy-2.1.0/src/dvdreadnew/nav_read.h k9copy-2.2.0/src/dvdreadnew/nav_read.h --- k9copy-2.1.0/src/dvdreadnew/nav_read.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/nav_read.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,52 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef NAV_READ_H_INCLUDED +#define NAV_READ_H_INCLUDED + +/* + * Copyright (C) 2000, 2001, 2002 H�kan Hjort . + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "nav_types.h" + +/** + * Parsing of NAV data, PCI and DSI parts. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Reads the PCI packet data pointed to into th pci struct. + * + * @param pci Pointer to the PCI data structure to be filled in. + * @param bufffer Pointer to the buffer of the on disc PCI data. + */ +void navRead_PCI(pci_t *, unsigned char *); + +/** + * Reads the DSI packet data pointed to into dsi struct. + * + * @param dsi Pointer to the DSI data structure to be filled in. + * @param bufffer Pointer to the buffer of the on disc DSI data. + */ +void navRead_DSI(dsi_t *, unsigned char *); + +#ifdef __cplusplus +}; +#endif +#endif /* NAV_READ_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/dvdreadnew/nav_types.h k9copy-2.2.0/src/dvdreadnew/nav_types.h --- k9copy-2.1.0/src/dvdreadnew/nav_types.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/dvdreadnew/nav_types.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,307 @@ +/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#ifndef NAV_TYPES_H_INCLUDED +#define NAV_TYPES_H_INCLUDED + +/* + * Copyright (C) 2000, 2001, 2002 H�kan Hjort + * + * The data structures in this file should represent the layout of the + * pci and dsi packets as they are stored in the stream. Information + * found by reading the source to VOBDUMP is the base for the structure + * and names of these data types. + * + * VOBDUMP: a program for examining DVD .VOB files. + * Copyright 1998, 1999 Eric Smith + * + * VOBDUMP is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. Note that I am not + * granting permission to redistribute or modify VOBDUMP under the terms + * of any later version of the General Public License. + * + * This program is distributed in the hope that it will be useful (or at + * least amusing), but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +#include "ifo_types.h"/* only dvd_time_t, vm_cmd_t and user_ops_t */ +/* If it's ever removed add a uintX_t test. */ + +#undef ATTRIBUTE_PACKED +#undef PRAGMA_PACK_BEGIN +#undef PRAGMA_PACK_END + +#if defined(__GNUC__) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +#define ATTRIBUTE_PACKED __attribute__ ((packed)) +#define PRAGMA_PACK 0 +#endif +#endif + +#if !defined(ATTRIBUTE_PACKED) +#define ATTRIBUTE_PACKED +#define PRAGMA_PACK 1 +#endif + + +/* The length including the substream id byte. */ +#define PCI_BYTES 0x3d4 +#define DSI_BYTES 0x3fa + +#define PS2_PCI_SUBSTREAM_ID 0x00 +#define PS2_DSI_SUBSTREAM_ID 0x01 + +/* Remove this */ +#define DSI_START_BYTE 1031 + + +#if PRAGMA_PACK +#pragma pack(1) +#endif + + +/** + * PCI General Information + */ +typedef struct { + uint32_t nv_pck_lbn; /**< sector address of this nav pack */ + uint16_t vobu_cat; /**< 'category' of vobu */ + uint16_t zero1; /**< reserved */ + user_ops_t vobu_uop_ctl; /**< UOP of vobu */ + uint32_t vobu_s_ptm; /**< start presentation time of vobu */ + uint32_t vobu_e_ptm; /**< end presentation time of vobu */ + uint32_t vobu_se_e_ptm; /**< end ptm of sequence end in vobu */ + dvd_time_t e_eltm; /**< Cell elapsed time */ + char vobu_isrc[32]; +} ATTRIBUTE_PACKED pci_gi_t; + +/** + * Non Seamless Angle Information + */ +typedef struct { + uint32_t nsml_agl_dsta[9]; /**< address of destination vobu in AGL_C#n */ +} ATTRIBUTE_PACKED nsml_agli_t; + +/** + * Highlight General Information + * + * For btngrX_dsp_ty the bits have the following meaning: + * 000b: normal 4/3 only buttons + * XX1b: wide (16/9) buttons + * X1Xb: letterbox buttons + * 1XXb: pan&scan buttons + */ +typedef struct { + uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: different 2: equal 3: eual except for button cmds */ + uint32_t hli_s_ptm; /**< start ptm of hli */ + uint32_t hli_e_ptm; /**< end ptm of hli */ + uint32_t btn_se_e_ptm; /**< end ptm of button select */ +#ifdef WORDS_BIGENDIAN + unsigned int zero1 : 2; /**< reserved */ + unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or 3 with 36/18/12 buttons */ + unsigned int zero2 : 1; /**< reserved */ + unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream for button group 1 */ + unsigned int zero3 : 1; /**< reserved */ + unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream for button group 2 */ + unsigned int zero4 : 1; /**< reserved */ + unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream for button group 3 */ +#else + unsigned int btngr1_dsp_ty : 3; + unsigned int zero2 : 1; + unsigned int btngr_ns : 2; + unsigned int zero1 : 2; + unsigned int btngr3_dsp_ty : 3; + unsigned int zero4 : 1; + unsigned int btngr2_dsp_ty : 3; + unsigned int zero3 : 1; +#endif + uint8_t btn_ofn; /**< button offset number range 0-255 */ + uint8_t btn_ns; /**< number of valid buttons <= 36/18/12 (low 6 bits) */ + uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low 6 bits) nsl_btn_ns <= btn_ns */ + uint8_t zero5; /**< reserved */ + uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */ + uint8_t foac_btnn; /**< forcedly activated button (low 6 bits) */ +} ATTRIBUTE_PACKED hl_gi_t; + + +/** + * Button Color Information Table + * Each entry beeing a 32bit word that contains the color indexs and alpha + * values to use. They are all represented by 4 bit number and stored + * like this [Ci3, Ci2, Ci1, Ci0, A3, A2, A1, A0]. The actual palette + * that the indexes reference is in the PGC. + * @TODO split the uint32_t into a struct + */ +typedef struct { + uint32_t btn_coli[3][2]; /**< [button color number-1][select:0/action:1] */ +} ATTRIBUTE_PACKED btn_colit_t; + +/** + * Button Information + * + * NOTE: I've had to change the structure from the disk layout to get + * the packing to work with Sun's Forte C compiler. + * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ + */ +typedef struct { +#ifdef WORDS_BIGENDIAN + unsigned int btn_coln : 2; /**< button color number */ + unsigned int x_start : 10; /**< x start offset within the overlay */ + unsigned int zero1 : 2; /**< reserved */ + unsigned int x_end : 10; /**< x end offset within the overlay */ + + unsigned int zero3 : 2; /**< reserved */ + unsigned int up : 6; /**< button index when pressing up */ + + unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if selected */ + unsigned int y_start : 10; /**< y start offset within the overlay */ + unsigned int zero2 : 2; /**< reserved */ + unsigned int y_end : 10; /**< y end offset within the overlay */ + + unsigned int zero4 : 2; /**< reserved */ + unsigned int down : 6; /**< button index when pressing down */ + unsigned int zero5 : 2; /**< reserved */ + unsigned int left : 6; /**< button index when pressing left */ + unsigned int zero6 : 2; /**< reserved */ + unsigned int right : 6; /**< button index when pressing right */ +#else + unsigned int x_end : 10; + unsigned int zero1 : 2; + unsigned int x_start : 10; + unsigned int btn_coln : 2; + + unsigned int up : 6; + unsigned int zero3 : 2; + + unsigned int y_end : 10; + unsigned int zero2 : 2; + unsigned int y_start : 10; + unsigned int auto_action_mode : 2; + + unsigned int down : 6; + unsigned int zero4 : 2; + unsigned int left : 6; + unsigned int zero5 : 2; + unsigned int right : 6; + unsigned int zero6 : 2; +#endif + vm_cmd_t cmd; +} ATTRIBUTE_PACKED btni_t; + +/** + * Highlight Information + */ +typedef struct { + hl_gi_t hl_gi; + btn_colit_t btn_colit; + btni_t btnit[36]; +} ATTRIBUTE_PACKED hli_t; + +/** + * PCI packet + */ +typedef struct { + pci_gi_t pci_gi; + nsml_agli_t nsml_agli; + hli_t hli; + uint8_t zero1[189]; +} ATTRIBUTE_PACKED pci_t; + + + + +/** + * DSI General Information + */ +typedef struct { + uint32_t nv_pck_scr; + uint32_t nv_pck_lbn; /**< sector address of this nav pack */ + uint32_t vobu_ea; /**< end address of this VOBU */ + uint32_t vobu_1stref_ea; /**< end address of the 1st reference image */ + uint32_t vobu_2ndref_ea; /**< end address of the 2nd reference image */ + uint32_t vobu_3rdref_ea; /**< end address of the 3rd reference image */ + uint16_t vobu_vob_idn; /**< VOB Id number that this VOBU is part of */ + uint8_t zero1; /**< reserved */ + uint8_t vobu_c_idn; /**< Cell Id number that this VOBU is part of */ + dvd_time_t c_eltm; /**< Cell elapsed time */ +} ATTRIBUTE_PACKED dsi_gi_t; + +/** + * Seamless Playback Information + */ +typedef struct { + uint16_t category; /**< 'category' of seamless VOBU */ + uint32_t ilvu_ea; /**< end address of interleaved Unit */ + uint32_t ilvu_sa; /**< start address of next interleaved unit */ + uint16_t size; /**< size of next interleaved unit */ + uint32_t vob_v_s_s_ptm; /**< video start ptm in vob */ + uint32_t vob_v_e_e_ptm; /**< video end ptm in vob */ + struct { + uint32_t stp_ptm1; + uint32_t stp_ptm2; + uint32_t gap_len1; + uint32_t gap_len2; + } vob_a[8]; +} ATTRIBUTE_PACKED sml_pbi_t; + +/** + * Seamless Angle Infromation for one angle + */ +typedef struct { + uint32_t address; /**< offset to next ILVU, high bit is before/after */ + uint16_t size; /**< byte size of the ILVU pointed to by address */ +} ATTRIBUTE_PACKED sml_agl_data_t; + +/** + * Seamless Angle Infromation + */ +typedef struct { + sml_agl_data_t data[9]; +} ATTRIBUTE_PACKED sml_agli_t; + +/** + * VOBU Search Information + */ +typedef struct { + uint32_t next_video; /**< Next vobu that contains video */ + uint32_t fwda[19]; /**< Forwards, time */ + uint32_t next_vobu; + uint32_t prev_vobu; + uint32_t bwda[19]; /**< Backwards, time */ + uint32_t prev_video; +} ATTRIBUTE_PACKED vobu_sri_t; + +#define SRI_END_OF_CELL 0x3fffffff + +/** + * Synchronous Information + */ +typedef struct { + uint16_t a_synca[8]; /**< offset to first audio packet for this VOBU */ + uint32_t sp_synca[32]; /**< offset to first subpicture packet */ +} ATTRIBUTE_PACKED synci_t; + +/** + * DSI packet + */ +typedef struct { + dsi_gi_t dsi_gi; + sml_pbi_t sml_pbi; + sml_agli_t sml_agli; + vobu_sri_t vobu_sri; + synci_t synci; + uint8_t zero1[471]; +} ATTRIBUTE_PACKED dsi_t; + + +#if PRAGMA_PACK +#pragma pack() +#endif + +#endif /* NAV_TYPES_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/import/cmake_install.cmake k9copy-2.2.0/src/import/cmake_install.cmake --- k9copy-2.1.0/src/import/cmake_install.cmake 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/import/k9avidecode.cpp k9copy-2.2.0/src/import/k9avidecode.cpp --- k9copy-2.1.0/src/import/k9avidecode.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9avidecode.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -23,7 +23,7 @@ #endif -k9AviDecode::k9AviDecode(QObject *parent, const char *name) +k9AviDecode::k9AviDecode(QObject *parent, const char *) : QObject(parent) { CodecHandle=0; FormatHandle=0; @@ -118,7 +118,7 @@ m_error =i18n("Couldn't find stream information"); return false; // Couldn't find stream information } - int i; + uint i; // Find the first video stream m_videoStream=-1; @@ -200,15 +200,15 @@ AVRational time_base = m_FormatCtx->streams[m_videoStream]->time_base; int64_t fspos = (int64_t)(_seconds * AV_TIME_BASE); fspos=av_rescale_q(fspos, AV_TIME_BASE_Q, time_base); - int i=av_seek_frame(m_FormatCtx, m_videoStream, fspos, AVSEEK_FLAG_BACKWARD ); - double pos=av_gettime() / 1000000; +// int i=av_seek_frame(m_FormatCtx, m_videoStream, fspos, AVSEEK_FLAG_BACKWARD ); +// double pos=av_gettime() / 1000000; } void k9AviDecode::readFrame(double _seconds) { AVRational time_base = m_FormatCtx->streams[m_videoStream]->time_base; int64_t fspos = (int64_t)(_seconds * AV_TIME_BASE); fspos=av_rescale_q(fspos, AV_TIME_BASE_Q, time_base); - int res=av_seek_frame(m_FormatCtx, m_videoStream, fspos, AVSEEK_FLAG_BACKWARD ); +// int res=av_seek_frame(m_FormatCtx, m_videoStream, fspos, AVSEEK_FLAG_BACKWARD ); avcodec_flush_buffers(m_CodecCtx); int frameFinished=0; AVPacket packet; diff -Nru k9copy-2.1.0/src/import/k9avifile.cpp k9copy-2.2.0/src/import/k9avifile.cpp --- k9copy-2.1.0/src/import/k9avifile.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9avifile.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -13,7 +13,7 @@ #include "k9avifile.h" #include "k9title.h" -k9AviFile::k9AviFile(k9Title *parent, const char *name) +k9AviFile::k9AviFile(k9Title *parent, const char *) : QObject(parent) { m_num=parent->getFiles()->count(); setTitle(parent); diff -Nru k9copy-2.1.0/src/import/k9import.cpp k9copy-2.2.0/src/import/k9import.cpp --- k9copy-2.1.0/src/import/k9import.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9import.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -30,7 +30,7 @@ #include #include #include "k9menu.h" -k9Import::k9Import(QWidget* parent, const char* name,k9CdDrives *_drives) +k9Import::k9Import(QWidget* parent, const char* ,k9CdDrives *_drives) : QWidget(parent) { Ui_import.setupUi(this); setWindowTitle(KDialog::makeStandardCaption(i18n("import"),this)); @@ -117,7 +117,7 @@ } -void k9Import::volumeChanged(const QString &device,const QString &volumeName) {} +void k9Import::volumeChanged(const QString &device,const QString &volumeName) { Q_UNUSED(device); Q_UNUSED(volumeName);} @@ -286,24 +286,6 @@ } } -void k9Import::setProgressWindow(QWidget *_widget) { - /* m_toolView=m_parent->setToolWindow(_widget,KDockWidget::DockRight,i18n("processing"),i18n("processing")); - m_dockWidget = m_parent->getVisibleDock(); - m_parent->setActions( false); - m_toolView->show(); - // this->setEnabled(false); - */ -} - -void k9Import::removeProgressWindow() { - /* m_parent->setActions(true); - - m_parent->removeToolWindow( m_toolView); - this->setEnabled(true); - if (m_dockWidget!=NULL) - m_dockWidget->changeHideShowState(); - */ -} void k9Import::execute() { QString filename; @@ -322,7 +304,6 @@ p->setModal(true); p->show(); - setProgressWindow(p); m_newDVD->setProcessList(p); m_newDVD->setWorkDir(outputDir); m_newDVD->execute(); @@ -333,8 +314,7 @@ k9BurnDVD b; - setProgressWindow( b.getDialog()); - b.setworkDir(config.getPrefOutput() +"/DVD"); + b.setworkDir(config.getPrefOutput() +"/dvd"); b.setUseK3b(config.getPrefK3b() ); b.setAutoBurn(config.getPrefAutoBurn()); b.setvolId("DVD"); @@ -345,7 +325,6 @@ } else b.makeIso(filename); b.burn(); - removeProgressWindow(); } // m_parent->removeDockWidget(doc); } diff -Nru k9copy-2.1.0/src/import/k9import.h k9copy-2.2.0/src/import/k9import.h --- k9copy-2.1.0/src/import/k9import.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9import.h 2009-02-19 22:30:17.000000000 +0100 @@ -60,8 +60,6 @@ void titleAdded(); protected: /*$PROTECTED_FUNCTIONS$*/ - void setProgressWindow(QWidget *_widget); - void removeProgressWindow(); void readDrives(); void addDrive (k9CdDrive *_drive); diff -Nru k9copy-2.1.0/src/import/k9lvitemimport.cpp k9copy-2.2.0/src/import/k9lvitemimport.cpp --- k9copy-2.1.0/src/import/k9lvitemimport.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9lvitemimport.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -24,9 +24,8 @@ bool k9LvItemImport::operator< ( const QTreeWidgetItem & other ) const { - int col=treeWidget()->sortColumn(); +// int col=treeWidget()->sortColumn(); - int res; if (other.type()== TITLE) { k9LvItemImport *item2=(k9LvItemImport*)&other; return this->getTitle()->getNum() < item2->getTitle()->getNum(); diff -Nru k9copy-2.1.0/src/import/k9menubutton.cpp k9copy-2.2.0/src/import/k9menubutton.cpp --- k9copy-2.1.0/src/import/k9menubutton.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9menubutton.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -99,7 +99,7 @@ emit sigsetHeight(getHeight()); } -k9MenuButton::k9MenuButton(Q3Canvas *parent, const char *name) +k9MenuButton::k9MenuButton(Q3Canvas *parent, const char *) : QObject(parent),m_width(0),m_height(0) { m_canvas=parent; diff -Nru k9copy-2.1.0/src/import/k9menu.cpp k9copy-2.2.0/src/import/k9menu.cpp --- k9copy-2.1.0/src/import/k9menu.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9menu.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -22,7 +22,7 @@ #include #include -k9Menu::k9Menu(QObject *parent, const char *name) +k9Menu::k9Menu(QObject *parent, const char *) : QObject(parent),m_format(PAL) { // m_buttons.setAutoDelete(false); m_canvas=new Q3Canvas(this); diff -Nru k9copy-2.1.0/src/import/k9menuedit.cpp k9copy-2.2.0/src/import/k9menuedit.cpp --- k9copy-2.1.0/src/import/k9menuedit.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9menuedit.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -30,7 +30,7 @@ -k9MenuEdit::k9MenuEdit(QWidget* parent, const char* name,Q3Canvas *_canvas) +k9MenuEdit::k9MenuEdit(QWidget* parent, const char* ,Q3Canvas *_canvas) : QWidget(parent) { Ui_menuEdit.setupUi(this); Ui_menuEdit.bAddText->setIcon (SmallIcon("add")); @@ -52,7 +52,6 @@ } void k9MenuEdit::itemSelected() { - bool unselect=true; m_noUpdate=true; m_canvas->update(); Ui_menuEdit.urBackground->setUrl(KUrl("")); diff -Nru k9copy-2.1.0/src/import/k9menueditor.cpp k9copy-2.2.0/src/import/k9menueditor.cpp --- k9copy-2.1.0/src/import/k9menueditor.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9menueditor.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -28,7 +28,7 @@ } -void k9MenuEditor::contentsMouseReleaseEvent(QMouseEvent* e) { +void k9MenuEditor::contentsMouseReleaseEvent(QMouseEvent* ) { m_canvasSelection->release(); emit itemSelected(); } @@ -139,7 +139,7 @@ void k9MenuEditor::contentsMouseMoveEvent(QMouseEvent* e) { updateCursor(e); - if ( moving && (e->buttons() & Qt::LeftButton ==Qt::LeftButton) ) { + if ( moving && ((e->buttons() & Qt::LeftButton) ==Qt::LeftButton) ) { if (moving->rtti() !=Q3CanvasItem::Rtti_Text || moving==m_menu->getText()) { QPoint p = inverseWorldMatrix().map(e->pos()); int offsetX=p.x() - moving_start.x(); diff -Nru k9copy-2.1.0/src/import/k9newdvd.cpp k9copy-2.2.0/src/import/k9newdvd.cpp --- k9copy-2.1.0/src/import/k9newdvd.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9newdvd.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -33,7 +33,7 @@ #include "nav_types.h" #include "ifo_types.h" #include "dvdread.h" -k9NewDVD::k9NewDVD(QObject *parent, const char *name) +k9NewDVD::k9NewDVD(QObject *parent, const char *) : QObject(parent) { m_workDir=KStandardDirs::locateLocal("tmp", "k9copy/" ) ; m_rootMenu=new k9Menu(this); @@ -65,7 +65,7 @@ } -void k9NewDVD::drawImage(QImage _image) { +void k9NewDVD::drawImage(QImage ) { // m_progress->setImage(*_image); } @@ -299,7 +299,6 @@ QFile f(_aviFile->getFileName()); f.open(QIODevice::ReadOnly); QFile *output=NULL; - int cpt=0; double msecs=0; QTime totalTime(0,0,0); int64_t scr=0; diff -Nru k9copy-2.1.0/src/import/k9newtitle.cpp k9copy-2.2.0/src/import/k9newtitle.cpp --- k9copy-2.1.0/src/import/k9newtitle.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9newtitle.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -107,7 +107,7 @@ QTime t; item->setText(1,t.addSecs(fileInfo.getDuration()).toString("hh:mm:ss")); - double increment; + double increment=0; int maxCh; if (Ui_newTitle.rbLength->isChecked()) { QTime t; diff -Nru k9copy-2.1.0/src/import/k9title.cpp k9copy-2.2.0/src/import/k9title.cpp --- k9copy-2.1.0/src/import/k9title.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/import/k9title.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -13,7 +13,7 @@ #include "k9newdvd.h" #include "k9menu.h" -k9Title::k9Title(k9NewDVD *parent, const char *name) +k9Title::k9Title(k9NewDVD *parent, const char *) : QObject(parent) { m_num=parent->getTitles()->count(); diff -Nru k9copy-2.1.0/src/main/ffmpegCmdGen.ui k9copy-2.2.0/src/main/ffmpegCmdGen.ui --- k9copy-2.1.0/src/main/ffmpegCmdGen.ui 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/main/ffmpegCmdGen.ui 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,965 @@ + + ffmpegCmdGen + + + + 0 + 0 + 485 + 359 + + + + Form + + + + 0 + + + 0 + + + + + 0 + + + + + + + + 0 + 0 + + + + Qt::ScrollBarAlwaysOn + + + true + + + + + 0 + 0 + 449 + 571 + + + + + 0 + 0 + + + + + + + + + Set the video bitrate in bit/s (default = 200 kb/s) + + + b + + + + + + + $VIDBRk + + + k + + + 0 + + + 100000 + + + + + + + Set the number of video frames to record + + + vframes + + + + + + + 0 + + + 100000 + + + + + + + Set frame rate (Hz value, fraction or abbreviation), (default = 25) + + + r + + + + + + + 0 + + + 100000 + + + + + + + Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source) + + + s + + + + + + + true + + + + $WIDTHx$HEIGHT + + + + + sqcif + + + + + qcif + + + + + cif + + + + + 4cif + + + + + qqvga + + + + + qvga + + + + + vga + + + + + svga + + + + + xga + + + + + uxga + + + + + qxga + + + + + sxga + + + + + qsxga + + + + + hsxga + + + + + wvga + + + + + wsxga + + + + + wuxga + + + + + woxga + + + + + wqsxga + + + + + wquxga + + + + + whuxga + + + + + cga + + + + + ega + + + + + hd480 + + + + + hd720 + + + + + hd1080 + + + + + + + + Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777) + + + aspect + + + + + + + true + + + + 4:3 + + + + + 16:9 + + + + + + + + Set top crop band size (in pixels) + + + croptop + + + + + + + 0 + + + 100000 + + + + + + + Set bottom crop band size (in pixels) + + + cropbottom + + + + + + + 0 + + + 100000 + + + + + + + Set left crop band size (in pixels) + + + cropleft + + + + + + + 0 + + + 100000 + + + + + + + Set right crop band size (in pixels). + + + cropright + + + + + + + Set right crop band size (in pixels) + + + 0 + + + 100000 + + + + + + + Set top pad band size (in pixels) + + + padtop + + + + + + + 0 + + + 100000 + + + + + + + Set bottom pad band size (in pixels) + + + padbottom + + + + + + + 0 + + + 100000 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 100 + 20 + + + + + + + + Set left pad band size (in pixels) + + + padleft + + + + + + + 0 + + + 100000 + + + + + + + Set right pad band size (in pixels). + + + padright + + + + + + + Set right crop band size (in pixels) + + + 0 + + + 100000 + + + + + + + Set color of padded bands. The value for padcolor is expressed as a six digit hexadecimal number where the first two digits represent red, the middle two digits green and last two digits blue (default = 000000 (black)) + + + padcolor + + + + + + + HHHHHH; + + + + + + + Set video bitrate tolerance (in bit/s) + + + bt + + + + + + + 0 + + + 100000 + + + + + + + Set max video bitrate (in bit/s) + + + maxrate + + + + + + + 0 + + + 100000 + + + + + + + Set min video bitrate (in bit/s) + + + minrate + + + + + + + 0 + + + 100000 + + + + + + + Set video buffer verifier buffer size (in bits) + + + bufsize + + + + + + + 0 + + + 100000 + + + + + + + Force video codec to codec. Use the copy special value to tell that the raw codec data must be copied as is + + + vcodec + + + + + + + true + + + + copy + + + + + + + + Use same video quality as source (implies VBR) + + + sameq + + + + + + + pass + + + + + + + $PASS + + + true + + + + + + + passlogfile + + + + + + + $PASSLOGFILE + + + true + + + + + + + + + Qt::Vertical + + + + 20 + 18 + + + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + FFMpeg Video options + + + + + + + + + + + Qt::ScrollBarAsNeeded + + + true + + + + + 0 + 0 + 465 + 318 + + + + + 0 + 111 + + + + + + + + + Set the number of audio frames to record + + + aframes + + + + + + + 0 + + + 100000 + + + + + + + Set the audio sampling frequency (default = 44100 Hz) + + + ar + + + + + + + 0 + + + 100000 + + + 44100 + + + + + + + Set the audio bitrate in bit/s (default = 64k) + + + ab + + + + + + + $AUDBRk + + + k + + + 0 + + + 100000 + + + + + + + Set the number of audio channels (default = 1) + + + ac + + + + + + + 1 + + + 7 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 100 + 37 + + + + + + + + Force audio codec to codec. Use the copy special value to specify that the raw codec data must be copied as is + + + acodec + + + + + + + true + + + + COPY + + + + + + + + Force audio tag/fourcc + + + atag + + + + + + + nnnnn; + + + + + + + Bitstream filters + + + absf + + + + + + + + dump_extra + + + + + remove_extra + + + + + noise + + + + + mp3comp + + + + + mp3decomp + + + + + + + + Qt::Vertical + + + + 105 + 13 + + + + + + + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + FFMpeg Audio options + + + + + + + + + + + + KComboBox + QComboBox +
kcombobox.h
+
+ + KIntSpinBox + QSpinBox +
knuminput.h
+
+ + KLineEdit + QLineEdit +
klineedit.h
+
+
+ + +
diff -Nru k9copy-2.1.0/src/main/k9copy.cpp k9copy-2.2.0/src/main/k9copy.cpp --- k9copy-2.1.0/src/main/k9copy.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9copy.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -63,7 +63,6 @@ // backupAction->setChecked(true); setupGUI(); k9Dialogs::setMainWidget(this); - } @@ -79,7 +78,6 @@ m_actions["open"]->setEnabled(true); m_actions["quit"]->setEnabled(true); m_actions["preferences"]->setEnabled(true); - m_actions["playtitle"]->setEnabled(true); m_actions["copy"]->setEnabled(true); // m_actions["create"]->setEnabled(false); m_actions["mp4"]->setEnabled(true); @@ -95,13 +93,14 @@ m_useDvdAuthor=config.getUseDvdAuthor(); - if (config.getPrefVersion() != VERSION) { + /* + if (config.getPrefVersion() != VERSION) { initCodecs(); config.read(); config.setPrefVersion(VERSION); config.save(); } - +*/ m_k9Main=new k9Main(this,0,&m_drives); setCentralWidget(m_k9Main); @@ -236,14 +235,14 @@ //PlayTitleAction = new KAction(i18n("Play title"),(QObject*)actionCollection()); //, SLOT(ActionPlayTitle()),"PlayTitle" - QPixmap img; + /* QPixmap img; img.loadFromData( img_preview, sizeof( img_preview ), "PNG" ); // PlayTitleAction->setIcon(QIcon(img)); PlayTitleAction = new KAction(KIcon(img), i18n("Play title"), this); actionCollection()->addAction( "PlayTitle", PlayTitleAction ); connect(PlayTitleAction, SIGNAL(triggered(bool)),this, SLOT(ActionPlayTitle())); m_actions["playtitle"]=PlayTitleAction; - + */ CopyAction = new KAction(KIcon("dvdcopy"),i18n("Copy"),this); actionCollection()->addAction("Copy",CopyAction); @@ -283,24 +282,7 @@ m_actions["author"]=authorAction; -/* backupAction= new KRadioAction(i18n("DVD Backup"),0, - this, SLOT(ActionBackup()), - actionCollection(), "backup"); - - backupAction->setExclusiveGroup("mode"); - m_actions["backup"]=backupAction; - - authorAction= new KRadioAction(i18n("DVD Author"),0, - this, SLOT(ActionAuthor()), - actionCollection(), "author"); - authorAction->setExclusiveGroup("mode"); - m_actions["author"]=authorAction; - m_actions["create"]= new KAction(i18n("Create DVD"),0, - this, SLOT(ActionCreate()), - actionCollection(), "Create"); - m_actions["create"]->setIcon("author"); -*/ } @@ -309,7 +291,6 @@ m_actions["open"]->setEnabled(enabled); m_actions["quit"]->setEnabled(enabled); m_actions["preferences"]->setEnabled(enabled); - m_actions["playtitle"]->setEnabled(enabled); m_actions["copy"]->setEnabled(enabled); m_actions["mp4"]->setEnabled(enabled); m_actions["mpeg"]->setEnabled(enabled); @@ -494,7 +475,7 @@ kapp->quit(); } -void k9Copy::setEnabledCreateDVD(bool _state) { +void k9Copy::setEnabledCreateDVD(bool ) { // m_actions["create"]->setEnabled(_state); } diff -Nru k9copy-2.1.0/src/main/k9ffmpegcmdgen.cpp k9copy-2.2.0/src/main/k9ffmpegcmdgen.cpp --- k9copy-2.1.0/src/main/k9ffmpegcmdgen.cpp 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/main/k9ffmpegcmdgen.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,170 @@ +// +// C++ Implementation: k9ffmpegcmdgen +// +// Description: +// +// +// Author: <>, (C) 2009 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "k9ffmpegcmdgen.h" +#include +#include + +k9ffmpegCmdGen::k9ffmpegCmdGen(QWidget* parent) + : QWidget(parent) { + Ui_ffmpegCmdGen.setupUi(this); + readCodecs(); +} + +k9ffmpegCmdGen::~k9ffmpegCmdGen() { + +} + +void k9ffmpegCmdGen::getStdout(KProcess *,char *_data, int _size) { + QString tmp(QByteArray(_data,_size)); + m_codecs=m_codecs.append(tmp); +} + +void k9ffmpegCmdGen::readCodecs() { + k9Process process(this,0); + connect (&process,SIGNAL(receivedStdout(KProcess*, char*, int)),this,SLOT(getStdout(KProcess*, char*, int))); + process << "ffmpeg" <<"-formats"; + process.start(); + process.sync(); + QStringList c=m_codecs.split("\n"); + + bool skip=true; + foreach (QString s,c) { + if (!skip && s!="") { + bool encoder=s.mid(2,1)=="E"; + bool video =s.mid(3,1)=="V"; + bool audio =s.mid(3,1)=="A"; + QString codecName=s.mid(8,16).trimmed(); + if (audio && encoder) + Ui_ffmpegCmdGen.acodec->addItem(codecName); + else if(video && encoder) + Ui_ffmpegCmdGen.vcodec->addItem(codecName); + } + if (s=="Codecs:") + skip=false; + if (s=="" && !skip) + break; + } +} + + +void k9ffmpegCmdGen::show (FFMpegCmdType _type) { + m_type=_type; + QStringList slCmd=m_cmd.split(' '); + for ( int i=0; i< slCmd.count();i++) { + QString opt=slCmd.at(i); + if (opt.startsWith("-")) { + QString optName=opt.mid(1); + QWidget *w=Ui_ffmpegCmdGen.stkOptions->findChild(optName); + + QLineEdit *le= dynamic_cast(w); + QComboBox *cb= dynamic_cast(w); + KIntSpinBox *ni = dynamic_cast(w); + QCheckBox *ck=dynamic_cast(w); + if (le) { + if (isetText(slCmd.at(++i)); + } else if (cb) { + if (iisEditable()) + cb->setEditText(slCmd.at(++i)); + else + cb->setCurrentIndex(cb->findText(slCmd.at(++i))); + + } + } else if (ni) { + QString text; + if (isetSpecialValueText(text); + else + ni->setValue(val); + } else if (ck) { + ck->setCheckState(Qt::Checked); + } + + // looking for the corresponding checkbox + if (w) { + QList wl =Ui_ffmpegCmdGen.stkOptions->findChildren(); + foreach (QCheckBox *ck,wl) { + if (ck->text() == optName) { + ck->setCheckState(Qt::Checked); + } + + } + } + } + } + switch ( _type) { + case AUDIO: + Ui_ffmpegCmdGen.stkOptions->setCurrentIndex(1); + break; + case VIDEO: + Ui_ffmpegCmdGen.stkOptions->setCurrentIndex(0); + break; + + } +} + +bool k9ffmpegCmdGen::getFFMpegCmd(FFMpegCmdType _type,QString &_cmd) { + KDialog *dlg= new KDialog(); + k9ffmpegCmdGen *cmdGen=new k9ffmpegCmdGen(dlg); + dlg->resize(cmdGen->width(),cmdGen->height()); + cmdGen->setCmd(_cmd); + cmdGen->show(_type); + dlg->setMainWidget(cmdGen); + dlg->setCaption(i18n("ffmpeg command generator")); + + if (dlg->exec()) + _cmd=cmdGen->getCmd(); + delete dlg; + return true; +} + +QString k9ffmpegCmdGen::getCmd() { + m_cmd.clear(); + QStringList cmd; + + QList wl =Ui_ffmpegCmdGen.stkOptions->findChildren(); + foreach(QCheckBox *ck,wl) { + if (ck->checkState()==Qt::Checked) { + QString name=ck->text().replace("&",""); + QWidget *w=Ui_ffmpegCmdGen.stkOptions->findChild(name); + cmd << "-"+name; + if (w) { + QLineEdit *le= dynamic_cast(w); + QComboBox *cb= dynamic_cast(w); + KIntSpinBox *ni = dynamic_cast(w); + if (le) + cmd << le->text(); + else if (cb) + cmd << cb->currentText(); + else if (ni) + cmd << ni->text(); + } + + } + } + + m_cmd=cmd.join(" "); + + return m_cmd; +} + + +void k9ffmpegCmdGen::setCmd(const QString& theValue) { + m_cmd = theValue; +} diff -Nru k9copy-2.1.0/src/main/k9ffmpegcmdgen.h k9copy-2.2.0/src/main/k9ffmpegcmdgen.h --- k9copy-2.1.0/src/main/k9ffmpegcmdgen.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/main/k9ffmpegcmdgen.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,48 @@ +// +// C++ Interface: k9ffmpegcmdgen +// +// Description: +// +// +// Author: <>, (C) 2009 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef K9FFMPEGCMDGEN_H +#define K9FFMPEGCMDGEN_H + +#include "k9common.h" +#include "ui_ffmpegCmdGen.h" +#include "k9process.h" + +class k9ffmpegCmdGen : public QWidget { + Q_OBJECT + +public: + enum FFMpegCmdType {AUDIO,VIDEO}; + k9ffmpegCmdGen(QWidget* parent = 0 ); + ~k9ffmpegCmdGen(); + /*$PUBLIC_FUNCTIONS$*/ + static bool getFFMpegCmd(FFMpegCmdType _type,QString &_cmd); + void show (FFMpegCmdType _type); + + void setCmd(const QString& theValue); + QString getCmd() ; + +public slots: + /*$PUBLIC_SLOTS$*/ + +private: + Ui::ffmpegCmdGen Ui_ffmpegCmdGen; + FFMpegCmdType m_type; + QString m_cmd; + QString m_codecs; + void readCodecs(); +protected slots: + void getStdout(KProcess*, char*,int); +}; + + +#endif + diff -Nru k9copy-2.1.0/src/main/k9langselect.cpp k9copy-2.2.0/src/main/k9langselect.cpp --- k9copy-2.1.0/src/main/k9langselect.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9langselect.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -64,7 +64,7 @@ k9DVDSubtitle *l_sub; k9DVDAudioStream *l_auds; QList *items=m_main->getItems(); - for (uint i=0;icount();i++) { + for (int i=0;icount();i++) { k9DVDListItem *litem=(k9DVDListItem*)items->at(i); switch (litem->streamType) { case SUB: { @@ -112,9 +112,9 @@ void k9LangSelect::update() { - for (uint i=0;ilanguage); - for (uint i=0;ilanguage); } @@ -123,7 +123,7 @@ uint Total=0,Selected=0; QString lg; QList *items = m_main->getItems(); - for (uint i=0;icount();i++) { + for (int i=0;icount();i++) { k9DVDListItem *litem=(k9DVDListItem*)items->at(i); if (litem->streamType==streamType ) { switch (streamType) { diff -Nru k9copy-2.1.0/src/main/k9main.cpp k9copy-2.2.0/src/main/k9main.cpp --- k9copy-2.1.0/src/main/k9main.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9main.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -61,7 +61,7 @@ #include #include #include "k9process.h" - +#include "k9execcopy.h" #include "k9dialogs.h" @@ -182,7 +182,7 @@ int col=treeWidget()->sortColumn(); if (other.type() !=1001) - return false; + return true; ckLvItem *litem = (ckLvItem*)&other; k9DVDTitleset *titleset1,*titleset2; ckLvItem *l; @@ -353,6 +353,38 @@ void k9Main::Copy() { + + k9ExecCopy execCopy; + execCopy.setDvd(dvd); + QString path; + execCopy.setCopyMenus(withMenus()); + execCopy.setSpeed( Ui_MainDlg.cbBurnSpeed->currentText()); + if (m_useDvdAuthor || !withMenus()) + m_playbackOptions->setSequence(); + + if (Ui_MainDlg.cbOutputDev->currentIndex() ==1) { + execCopy.setOutput(k9ExecCopy::oFolder); + path= k9Dialogs::getExistingDirectory(QDir::homePath()); + if (path=="") + return; + } else if (Ui_MainDlg.cbOutputDev->currentIndex() ==0) { + path=k9Dialogs::getSaveFileName (QDir::homePath(),"*.iso", 0,i18n("Save image to disk")); + if (path =="") + return; + execCopy.setOutput(k9ExecCopy::oISO); + } + else { + k9CdDrive * drive=(k9CdDrive*)recorderList.at(Ui_MainDlg.cbOutputDev->currentIndex()-2); + path=drive->device; + execCopy.setOutput(k9ExecCopy::oDVD); + + } + execCopy.setPath(path); + + execCopy.copyDVD(); + changeStatusbar( i18n("Ready") ,sbMessage); + +/* QString c,filename; if (!dvd->getopened()) { k9Dialogs::error( i18n("DVD is not opened"), i18n("DVD Copy")); @@ -435,6 +467,8 @@ } if (dvd->getopened()) changeStatusbar(i18n("Ready"),sbMessage); +*/ + } @@ -1082,7 +1116,7 @@ } void k9Main::CreateMP4() { - if (!dvd->getopened()) { + /* if (!dvd->getopened()) { k9Dialogs::error( i18n("DVD is not opened"), i18n("MPEG-4 Encoding")); return; } @@ -1143,6 +1177,11 @@ if (!bStop) k9Dialogs::information( i18n("Selected titles have been successfully encoded"), i18n("Encoding") ); +*/ + k9ExecCopy execCopy; + execCopy.setDvd(dvd); + execCopy.CreateMP4(); + changeStatusbar( i18n("Ready") ,sbMessage); changeStatusbar( i18n("Ready") ,sbMessage); @@ -1151,10 +1190,12 @@ void k9Main::extractMPEG2() { +/* if (!dvd->getopened()) { k9Dialogs::error( i18n("DVD is not opened"), i18n("MPEG-4 Encoding")); return; } + QString filename=""; int cpt=0; bool bStop=false; @@ -1200,7 +1241,11 @@ } if (!bStop) k9Dialogs::information( i18n("Selected titles have been successfully extracted"), i18n("Encoding") ); +*/ + k9ExecCopy execCopy; + execCopy.setDvd(dvd); + execCopy.extractMPEG2(); changeStatusbar( i18n("Ready") ,sbMessage); @@ -1301,6 +1346,7 @@ } if (title !=NULL) { emit changedTitle(title); + PreviewTitle(); } } diff -Nru k9copy-2.1.0/src/main/k9mencodercmdgen.cpp k9copy-2.2.0/src/main/k9mencodercmdgen.cpp --- k9copy-2.1.0/src/main/k9mencodercmdgen.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9mencodercmdgen.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -51,8 +51,8 @@ } -k9MencoderCmdGen::k9MencoderCmdGen(QWidget* parent,const QString &_cmd) -: QDialog(parent) +k9MencoderCmdGen::k9MencoderCmdGen(QWidget* parent,const QString &_cmd,const QString &_encoder) +: QDialog(parent),m_encoder(_encoder) { Ui_mencoderCmdGen.setupUi(this); Ui_mencoderCmdGen.buttonOk->setGuiItem(KStandardGuiItem::Ok); @@ -154,7 +154,7 @@ } void k9MencoderCmdGen::loadXml() { - QFile file(KGlobal::dirs()->findResource( "data", "k9copy/mencoder.xml")); + QFile file(KGlobal::dirs()->findResource( "data", QString("k9copy/%1.xml").arg(m_encoder))); if ( !file.open( QIODevice::ReadOnly ) ) return; if ( !m_doc.setContent( &file ) ) { @@ -578,8 +578,8 @@ return m_cmd; } -bool k9MencoderCmdGen::getMencoderOptions(QString &_cmd) { - k9MencoderCmdGen * m_cmdGen=new k9MencoderCmdGen(NULL,_cmd); +bool k9MencoderCmdGen::getMencoderOptions(QString &_cmd,const QString &_encoder) { + k9MencoderCmdGen * m_cmdGen=new k9MencoderCmdGen(NULL,_cmd,_encoder); m_cmdGen->m_cmd=_cmd; bool res=m_cmdGen->exec(); if (res) { @@ -591,6 +591,7 @@ if (!m_audio.isEmpty()) m_audio="-oac " +m_audio; _cmd=" "+m_video+" "+m_audio+" "+m_filters; + _cmd=_cmd.trimmed(); } delete m_cmdGen; return res; diff -Nru k9copy-2.1.0/src/main/k9mencodercmdgen.h k9copy-2.2.0/src/main/k9mencodercmdgen.h --- k9copy-2.1.0/src/main/k9mencodercmdgen.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9mencodercmdgen.h 2009-02-19 22:30:17.000000000 +0100 @@ -60,10 +60,10 @@ Q_OBJECT public: - k9MencoderCmdGen(QWidget* parent,const QString &_cmd); + k9MencoderCmdGen(QWidget* parent,const QString &_cmd,const QString &_encoder); ~k9MencoderCmdGen(); /*$PUBLIC_FUNCTIONS$*/ - static bool getMencoderOptions(QString &_cmd); + static bool getMencoderOptions(QString &_cmd,const QString &_encoder); public slots: /*$PUBLIC_SLOTS$*/ private: @@ -77,7 +77,7 @@ int m_row,m_page,m_cpt; QDomDocument m_doc; QString m_cmd; - + QString m_encoder; void addWidgets(_k9CheckListItem *_item,QString _root,QString _cat); void loadXml(); void fillListView(); diff -Nru k9copy-2.1.0/src/main/k9mp4title.cpp k9copy-2.2.0/src/main/k9mp4title.cpp --- k9copy-2.1.0/src/main/k9mp4title.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9mp4title.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -25,9 +25,12 @@ #include #include #include +#include "k9audiocodecs.h" +#include "k9videocodecs.h" +#include "k9tools.h" -k9MP4Title::k9MP4Title(QWidget* parent) -: QWidget(parent) +k9MP4Title::k9MP4Title(QWidget* parent,eOptTitle options) +: QWidget(parent),m_options(options) { Ui_prefMPEG4.setupUi(this); m_titleEncOpt=NULL; @@ -35,7 +38,17 @@ Ui_prefMPEG4.ckUseCache->hide(); Ui_prefMPEG4.tabWidget->setEnabled(false); Ui_prefMPEG4.lTitle->setText(i18n("Select a Title in the treeview...")); - + if (options == optAudio) + Ui_prefMPEG4.tabWidget->setTabEnabled(0,false); +} + + +void k9MP4Title::setOptions (eOptTitle _options) { + if (_options==optAudio) + Ui_prefMPEG4.tabWidget->setTabEnabled(0,false); + + m_options=_options; + } k9MP4Title::~k9MP4Title() @@ -64,19 +77,11 @@ Ui_prefMPEG4.leMp4AudioBitrate->setText(config.getPrefMp4AudioBitrate()); Ui_prefMPEG4.leMp4VideoBitrate->setText(config.getPrefMp4VideoBitrate()); - QStringList m_codecLabels=config.getCodecLabels(); - QStringList m_codecLabelsAudio=config.getCodecLabelsAudio(); - - Ui_prefMPEG4.cbMp4Codec->clear(); - - Ui_prefMPEG4.cbMp4Codec->addItems(m_codecLabels); - Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(config.getPrefMp4Codec()); - - Ui_prefMPEG4.cbMp4AudioCodec->clear(); - Ui_prefMPEG4.cbMp4AudioCodec->addItems(m_codecLabelsAudio); - Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(config.getPrefMp4AudioCodec()); + loadCodecs(QStringList(),QStringList()); + + Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(Ui_prefMPEG4.cbMp4AudioCodec->findData(config.getPrefMp4AudioCodec())); + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(Ui_prefMPEG4.cbMp4Codec->findData(config.getPrefMp4Codec())); - Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(config.getPrefMp4AudioCodec()); if(config.getPrefMp4VideoBitrate() =="") Ui_prefMPEG4.rbSize->setChecked(true); else @@ -84,6 +89,29 @@ } +void k9MP4Title::loadCodecs(QStringList _audioEncoders,QStringList _videoEncoders) { + k9AudioCodecs audioCodecs; + k9VideoCodecs videoCodecs; + + Ui_prefMPEG4.cbMp4AudioCodec->clear(); + Ui_prefMPEG4.cbMp4Codec->clear(); + Ui_prefMPEG4.cbEncoder->clear(); + + for (int i=0;i findText(videoCodecs.getEncoder(i))==-1) + Ui_prefMPEG4.cbEncoder->addItem(videoCodecs.getEncoder(i)); + } + + for (int i=0; i findText(audioCodecs.getEncoder(i))==-1) + Ui_prefMPEG4.cbEncoder->addItem(audioCodecs.getEncoder(i)); + + } + cbEncoderActivated(Ui_prefMPEG4.cbEncoder->currentIndex()); +} + /*$SPECIALIZATION$*/ void k9MP4Title::ckMp4AspectRatioClick() { @@ -129,8 +157,15 @@ Ui_prefMPEG4.leMp4AudioBitrate->setText(opt->getAudioBr()); Ui_prefMPEG4.leMp4VideoBitrate->setText(opt->getVideoBr()); - Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(opt->getCodec() ); - Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(opt->getAudioCodec()); + + for (int i=0; icount();i++) { + if (Ui_prefMPEG4.cbEncoder->itemText(i)==opt->getEncoder()) + Ui_prefMPEG4.cbEncoder->setCurrentIndex(i); + } + + cbEncoderActivated(Ui_prefMPEG4.cbEncoder->currentIndex()); + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex( Ui_prefMPEG4.cbMp4Codec->findData(opt->getCodec() )); + Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(Ui_prefMPEG4.cbMp4AudioCodec->findData(opt->getAudioCodec())); if(opt->getVideoBr() =="") Ui_prefMPEG4.rbSize->setChecked(true); @@ -145,12 +180,12 @@ void k9MP4Title::cbMp4CodecActivated( int _value) { if (m_titleEncOpt) - m_titleEncOpt->setCodec(_value); + m_titleEncOpt->setCodec(Ui_prefMPEG4.cbMp4Codec->itemData(_value).toInt()); } void k9MP4Title::cbMp4AudioCodecActivated( int _value) { if (m_titleEncOpt) - m_titleEncOpt->setAudioCodec(_value); + m_titleEncOpt->setAudioCodec(Ui_prefMPEG4.cbMp4AudioCodec->itemData(_value).toInt()); } void k9MP4Title::ck2passesClicked() { @@ -207,3 +242,39 @@ Ui_prefMPEG4.sbMp4Size->setEnabled(Ui_prefMPEG4.rbSize->isChecked()); } +void k9MP4Title::cbEncoderActivated(int _index) { + k9AudioCodecs audioCodecs; + k9VideoCodecs videoCodecs; + + if (m_titleEncOpt) + m_titleEncOpt->setEncoder(Ui_prefMPEG4.cbEncoder->currentText()); + + Ui_prefMPEG4.cbMp4AudioCodec->clear(); + Ui_prefMPEG4.cbMp4Codec->clear(); + + int cpt=0; + for (int i=0;i itemText(_index)) { + Ui_prefMPEG4.cbMp4Codec->addItem(videoCodecs.getCodecName(i),cpt++); + } + cpt=0; + for (int i=0; i itemText(_index)) { + Ui_prefMPEG4.cbMp4AudioCodec->addItem(audioCodecs.getCodecName(i),cpt++); + } + + if (m_titleEncOpt) { + int index=qMax(0,Ui_prefMPEG4.cbMp4Codec->findData(m_titleEncOpt->getCodec() )); + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(index ); + index=qMax(0,Ui_prefMPEG4.cbMp4AudioCodec->findData(m_titleEncOpt->getAudioCodec())); + Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(index); + + } else { + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(0); + Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(0); + } + cbMp4CodecActivated(Ui_prefMPEG4.cbMp4Codec->currentIndex()); + + cbMp4AudioCodecActivated(Ui_prefMPEG4.cbMp4AudioCodec->currentIndex()); + +} \ No newline at end of file diff -Nru k9copy-2.1.0/src/main/k9mp4title.h k9copy-2.2.0/src/main/k9mp4title.h --- k9copy-2.1.0/src/main/k9mp4title.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9mp4title.h 2009-02-19 22:30:17.000000000 +0100 @@ -24,15 +24,19 @@ Q_OBJECT public: - k9MP4Title(QWidget* parent = 0); + enum eOptTitle {optAudio,optVideo,optAll} ; + k9MP4Title(QWidget* parent = 0,eOptTitle options=optAll); + void setOptions (eOptTitle _options); + void loadCodecs(QStringList _audioEncoders,QStringList _videoEncoders); ~k9MP4Title(); /*$PUBLIC_FUNCTIONS$*/ private: k9TitleEncOpt *m_titleEncOpt; Ui::prefMPEG4 Ui_prefMPEG4; + eOptTitle m_options; public slots: /*$PUBLIC_SLOTS$*/ - virtual void ckMp4AspectRatioClick(); + virtual void ckMp4AspectRatioClick(); virtual void load(); virtual void titleChanged(k9DVDTitle *_title); virtual void selectionChanged(k9DVD *_dvd,bool); @@ -54,6 +58,7 @@ virtual void rgVideoSizeChanged(); virtual void ckUseCacheClick(); + virtual void cbEncoderActivated(int); }; #endif diff -Nru k9copy-2.1.0/src/main/k9prefdvd.cpp k9copy-2.2.0/src/main/k9prefdvd.cpp --- k9copy-2.1.0/src/main/k9prefdvd.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9prefdvd.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -33,6 +33,7 @@ Ui_prefDVD.ckDvdAuthor->setChecked(config.getUseDvdAuthor()); Ui_prefDVD.ckDelTmpFiles->setChecked(config.getPrefDelTmpFiles()); Ui_prefDVD.ckMpegChapter->setChecked(config.getMpegChapters()); + Ui_prefDVD.ckUserOps->setChecked(config.getPrefUserOps()); Ui_prefDVD.sbSize->setValue(config.getPrefSize()); Ui_prefDVD.sbSize->setSuffix(" "+ i18n("MB")); switch(config.getPrefReadAhead()) { @@ -65,6 +66,7 @@ config.setUseDvdAuthor( Ui_prefDVD.ckDvdAuthor->isChecked()); config.setPrefDelTmpFiles(Ui_prefDVD.ckDelTmpFiles->isChecked()); config.setMpegChapters(Ui_prefDVD.ckMpegChapter->isChecked()); + config.setPrefUserOps(Ui_prefDVD.ckUserOps->isChecked()); switch(Ui_prefDVD.cbReadAhead->currentIndex()) { case 0 : config.setPrefReadAhead(-1); diff -Nru k9copy-2.1.0/src/main/k9prefmencoder.cpp k9copy-2.2.0/src/main/k9prefmencoder.cpp --- k9copy-2.1.0/src/main/k9prefmencoder.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9prefmencoder.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -14,10 +14,11 @@ #include "k9prefmencoder.h" #include #include "k9mencodercmdgen.h" +#include "k9ffmpegcmdgen.h" #include #include #include - +#include "k9tools.h" k9prefMencoder::k9prefMencoder(QWidget* parent) : QWidget(parent) { @@ -60,6 +61,7 @@ Ui_prefMencoder.teOpt2->setText(m_codecs.getOptions1(i)); Ui_prefMencoder.teOpt3->setText(m_codecs.getOptions2(i)); Ui_prefMencoder.leVLabel->setText(_item->text()); + k9Tools::setComboText(Ui_prefMencoder.cbEncoderV,m_codecs.getEncoder(i)); m_update=false; } } @@ -70,6 +72,8 @@ m_update=true; Ui_prefMencoder.teOptA->setText(m_audioCodecs.getOptions(i)); Ui_prefMencoder.leALabel->setText(_item->text()); + k9Tools::setComboText(Ui_prefMencoder.cbEncoderA,m_audioCodecs.getEncoder(i)); + Ui_prefMencoder.leExtension->setText(m_audioCodecs.getExtension(i)); m_update=false; } } @@ -81,29 +85,60 @@ } +SelectedEncoder k9prefMencoder::getSelectedEncoderV() { + + if (Ui_prefMencoder.cbEncoderV->currentText() =="ffmpeg") + return FFMPEG; + else + return MENCODER; + +} + +SelectedEncoder k9prefMencoder::getSelectedEncoderA() { + + if (Ui_prefMencoder.cbEncoderA->currentText() =="ffmpeg") + return FFMPEG; + else + return MENCODER; + +} + + void k9prefMencoder::btnOpt1Clicked() { QString s=Ui_prefMencoder.teOpt1->text(); - if( k9MencoderCmdGen::getMencoderOptions(s)) - Ui_prefMencoder.teOpt1->setText(s); + if (getSelectedEncoderV()==FFMPEG) + k9ffmpegCmdGen::getFFMpegCmd(k9ffmpegCmdGen::VIDEO,s); + else + k9MencoderCmdGen::getMencoderOptions(s,Ui_prefMencoder.cbEncoderV->currentText()); + Ui_prefMencoder.teOpt1->setText(s); } void k9prefMencoder::btnOpt2Clicked() { QString s=Ui_prefMencoder.teOpt2->text(); - if( k9MencoderCmdGen::getMencoderOptions(s)) - Ui_prefMencoder.teOpt2->setText(s); +if (getSelectedEncoderV()==FFMPEG) + k9ffmpegCmdGen::getFFMpegCmd(k9ffmpegCmdGen::VIDEO,s); + else + k9MencoderCmdGen::getMencoderOptions(s,Ui_prefMencoder.cbEncoderV->currentText()); + Ui_prefMencoder.teOpt2->setText(s); } void k9prefMencoder::btnOpt3Clicked() { QString s=Ui_prefMencoder.teOpt3->text(); - if( k9MencoderCmdGen::getMencoderOptions(s)) - Ui_prefMencoder.teOpt3->setText(s); +if (getSelectedEncoderV()==FFMPEG) + k9ffmpegCmdGen::getFFMpegCmd(k9ffmpegCmdGen::VIDEO,s); + else + k9MencoderCmdGen::getMencoderOptions(s,Ui_prefMencoder.cbEncoderV->currentText()); + Ui_prefMencoder.teOpt3->setText(s); } void k9prefMencoder::btnOptAClicked() { QString s=Ui_prefMencoder.teOptA->text(); - if( k9MencoderCmdGen::getMencoderOptions(s)) - Ui_prefMencoder.teOptA->setText(s); +if (getSelectedEncoderA()==FFMPEG) + k9ffmpegCmdGen::getFFMpegCmd(k9ffmpegCmdGen::AUDIO,s); + else + k9MencoderCmdGen::getMencoderOptions(s,Ui_prefMencoder.cbEncoderA->currentText()); + Ui_prefMencoder.teOptA->setText(s); } void k9prefMencoder::btnAddVClicked() { @@ -189,6 +224,20 @@ } } +void k9prefMencoder::leExtensionTextChanged(const QString &_value) { + if (!m_update) { + m_audioCodecs.setExtension(Ui_prefMencoder.lbaCodecs->currentItem(),_value); + } +} +void k9prefMencoder::cbEncoderATextChanged(const QString &_value) { + if (!m_update) + m_audioCodecs.setEncoder(Ui_prefMencoder.lbaCodecs->currentItem(),_value); +} + +void k9prefMencoder::cbEncoderVTextChanged(const QString &_value) { + if (!m_update) + m_codecs.setEncoder(Ui_prefMencoder.lbvCodecs->currentItem(),_value); +} k9prefMencoder::~k9prefMencoder() { diff -Nru k9copy-2.1.0/src/main/k9prefmencoder.h k9copy-2.2.0/src/main/k9prefmencoder.h --- k9copy-2.1.0/src/main/k9prefmencoder.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9prefmencoder.h 2009-02-19 22:30:17.000000000 +0100 @@ -21,11 +21,13 @@ #include #include +enum SelectedEncoder {FFMPEG,MENCODER}; class k9prefMencoder : public QWidget { Q_OBJECT public: + k9prefMencoder(QWidget* parent = 0 ); ~k9prefMencoder(); /*$PUBLIC_FUNCTIONS$*/ @@ -41,11 +43,17 @@ void leVLabelTextChanged(const QString &); void leALabelTextChanged(const QString &); void leFourccTextChanged(const QString &); + void cbEncoderATextChanged(const QString &); + void cbEncoderVTextChanged(const QString &); + void leExtensionTextChanged(const QString&); + private: k9VideoCodecs m_codecs; k9AudioCodecs m_audioCodecs; bool m_update; Ui::prefMencoder Ui_prefMencoder; + SelectedEncoder getSelectedEncoderA(); + SelectedEncoder getSelectedEncoderV(); protected slots: /*$PROTECTED_SLOTS$*/ void lbvCodecsCurrentChanged(Q3ListBoxItem *_item); diff -Nru k9copy-2.1.0/src/main/k9prefmpeg4.cpp k9copy-2.2.0/src/main/k9prefmpeg4.cpp --- k9copy-2.1.0/src/main/k9prefmpeg4.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9prefmpeg4.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -20,6 +20,8 @@ #include #include #include +#include "k9audiocodecs.h" +#include "k9videocodecs.h" k9prefMPEG4::k9prefMPEG4(QWidget* parent) : QWidget(parent) @@ -47,15 +49,30 @@ Ui_prefMPEG4.leMp4AudioBitrate->setText(config.getPrefMp4AudioBitrate()); Ui_prefMPEG4.leMp4VideoBitrate->setText(config.getPrefMp4VideoBitrate()); - QStringList m_codecLabels=config.getCodecLabels(); - QStringList m_codecLabelsAudio=config.getCodecLabelsAudio(); - Ui_prefMPEG4.cbMp4Codec->clear(); - Ui_prefMPEG4.cbMp4Codec->addItems(m_codecLabels); + k9AudioCodecs audioCodecs; + k9VideoCodecs videoCodecs; + + QStringList encoders; + + for (int i=0;i clear(); + Ui_prefMPEG4.cbEncoder->addItems(encoders); + Ui_prefMPEG4.cbEncoder->setCurrentIndex(Ui_prefMPEG4.cbEncoder->findText(config.getPrefMp4Encoder())); + cbEncoderActivated(Ui_prefMPEG4.cbEncoder->currentIndex()); + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(config.getPrefMp4Codec()); - Ui_prefMPEG4.cbMp4AudioCodec->clear(); - Ui_prefMPEG4.cbMp4AudioCodec->addItems(m_codecLabelsAudio); Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(config.getPrefMp4AudioCodec()); Ui_prefMPEG4.ckUseCache->setChecked(config.getPrefUseCellCache()); @@ -79,6 +96,7 @@ config.setPrefMp4Codec(Ui_prefMPEG4.cbMp4Codec->currentIndex()); config.setPrefMp4AudioCodec(Ui_prefMPEG4.cbMp4AudioCodec->currentIndex()); config.setPrefMp4Size( (int)Ui_prefMPEG4.sbMp4Size->value()); + config.setPrefMp4Encoder(Ui_prefMPEG4.cbEncoder->currentText()); config.setPrefMp4NumberCD( (int)Ui_prefMPEG4.sbMp4NumberCD->value()); config.setPrefMp4AudioGain( (int)Ui_prefMPEG4.sbAudioGain->value()); config.setPrefMp4Width( Ui_prefMPEG4.leMp4Width->text()); @@ -104,5 +122,30 @@ } +void k9prefMPEG4::cbEncoderActivated(int _index) { + k9AudioCodecs audioCodecs; + k9VideoCodecs videoCodecs; + + Ui_prefMPEG4.cbMp4AudioCodec->clear(); + Ui_prefMPEG4.cbMp4Codec->clear(); + + for (int i=0;i itemText(_index)) { + Ui_prefMPEG4.cbMp4Codec->addItem(videoCodecs.getCodecName(i),i); + } + + for (int i=0; i itemText(_index)) { + Ui_prefMPEG4.cbMp4AudioCodec->addItem(audioCodecs.getCodecName(i),i); + } + + Ui_prefMPEG4.cbMp4Codec->setCurrentIndex(0); + cbMp4CodecActivated(0); + + Ui_prefMPEG4.cbMp4AudioCodec->setCurrentIndex(0); + cbMp4AudioCodecActivated(0); + +} + /*$SPECIALIZATION$*/ diff -Nru k9copy-2.1.0/src/main/k9prefmpeg4.h k9copy-2.2.0/src/main/k9prefmpeg4.h --- k9copy-2.1.0/src/main/k9prefmpeg4.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9prefmpeg4.h 2009-02-19 22:30:17.000000000 +0100 @@ -50,7 +50,7 @@ virtual void leMp4VideoBitrateTextChanged( const QString & ) {}; virtual void ckUseCacheClick() {}; - + virtual void cbEncoderActivated( int); private: Ui::prefMPEG4 Ui_prefMPEG4; }; diff -Nru k9copy-2.1.0/src/main/k9settings.cpp k9copy-2.2.0/src/main/k9settings.cpp --- k9copy-2.1.0/src/main/k9settings.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9settings.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -18,7 +18,7 @@ #include #include -k9settings::k9settings(QWidget *parent,const QString &caption): KPageDialog (parent) { +k9settings::k9settings(QWidget *parent,const QString &): KPageDialog (parent) { setFaceType(KPageDialog::List); setWindowTitle(KDialog::makeStandardCaption(i18n("Settings"),this)); diff -Nru k9copy-2.1.0/src/main/k9updatefactor.cpp k9copy-2.2.0/src/main/k9updatefactor.cpp --- k9copy-2.1.0/src/main/k9updatefactor.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/k9updatefactor.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -11,8 +11,8 @@ // #include "k9updatefactor.h" -k9UpdateFactor::k9UpdateFactor(QObject *parent, const char *name) - : QThread() +k9UpdateFactor::k9UpdateFactor(QObject *parent, const char *) + : QThread(parent) { } diff -Nru k9copy-2.1.0/src/main/kviewmpeg2.cpp k9copy-2.2.0/src/main/kviewmpeg2.cpp --- k9copy-2.1.0/src/main/kviewmpeg2.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/kviewmpeg2.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -41,36 +41,38 @@ k9Widget::k9Widget(QWidget *parent):QWidget(parent) { - m_image=NULL; } void k9Widget::setImage(QImage *_image) { - m_image=_image; + m_mutex.lock(); + m_image=*_image; + m_mutex.unlock(); //paintEvent( NULL); - repaint(); + update(); } -void k9Widget::paintEvent( QPaintEvent *_event) { +void k9Widget::paintEvent( QPaintEvent *) { // setPaletteBackgroundColor(Qt::black); QPalette palette; palette.setColor(backgroundRole(), Qt::black); setPalette(palette); int top,left; - if (m_image !=NULL) { + if (m_mutex.tryLock()) { QPainter p(this); - double wratio=(double)width()/(double)m_image->width(); - double hratio=(double)height()/(double)m_image->height(); + double wratio=(double)width()/(double)m_image.width(); + double hratio=(double)height()/(double)m_image.height(); double ratio= wratio < hratio ? wratio:hratio; - top =(int) (height() -m_image->height()*ratio)/2+1; - left =(int) (width() -m_image->width()*ratio)/2 +1; + top =(int) (height() -m_image.height()*ratio)/2+1; + left =(int) (width() -m_image.width()*ratio)/2 +1; p.scale(ratio,ratio); - p.drawImage((int)(left/ratio),(int)(top/ratio),*m_image); + p.drawImage((int)(left/ratio),(int)(top/ratio),m_image); p.end(); + m_mutex.unlock(); } } @@ -83,14 +85,13 @@ connect(&m_player , SIGNAL(setPosition(uint)), this, SLOT(setPosition(uint))); connect(&m_player , SIGNAL(setMax(uint)), this, SLOT(setMax(uint))); connect(&m_player , SIGNAL(setMin(uint)), this, SLOT(setMin(uint))); - connect(&m_timer , SIGNAL(timeout()),this, SLOT(drawPixmap())); + connect(&m_timer , SIGNAL(timeout()),this, SLOT(drawImage())); lockSlider=false; stopped=true; m_layout=new QGridLayout(Ui_viewMPEG2.label); - m_player.getDecoder()->setUseGL(false); - m_player.getDecoder()->setPlayer(this); + m_player.getDecoder()->setViewMpeg2(this); // connect(m_player.getDecoder() , SIGNAL(pixmapReady(QImage *)), this, SLOT(drawPixmap(QImage *))); m_widget=new k9Widget(Ui_viewMPEG2.label); m_layout->addWidget(m_widget,0,0); @@ -134,21 +135,26 @@ } -void kViewMPEG2::drawPixmap(QImage *image) { - m_mutex.lock(); +void kViewMPEG2::drawImage(QImage *image) { + QMutex mutex; img=*image; - m_mutex.unlock(); + mutex.lock(); + m_wplay.wait(&mutex,40); + m_widget->setImage( &img); + } /** No descriptions */ -void kViewMPEG2::drawPixmap() { - if (qApp==NULL) +void kViewMPEG2::drawImage() { + /*if (qApp==NULL) return; if (m_mutex.tryLock()) { m_widget->setImage( &img); if (qApp!=NULL) m_mutex.unlock(); } + */ + m_wplay.wakeAll(); } @@ -160,7 +166,11 @@ int kViewMPEG2::open (k9DVD *_dvd,k9DVDTitle * title,int chapter) { m_timer.start(40); + bool play=m_player.isRunning(); + m_player.open(_dvd->getdvd()->getDvd(), _dvd->getDevice(),title,chapter); + if (play) bPlayClick(); + return 1; } @@ -171,7 +181,7 @@ } -void kViewMPEG2::resizeEvent(QResizeEvent *_event) {} +void kViewMPEG2::resizeEvent(QResizeEvent *) {} void kViewMPEG2::bStopClick() { m_player.stop(); diff -Nru k9copy-2.1.0/src/main/kviewmpeg2.h k9copy-2.2.0/src/main/kviewmpeg2.h --- k9copy-2.1.0/src/main/kviewmpeg2.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/kviewmpeg2.h 2009-02-19 22:30:17.000000000 +0100 @@ -24,7 +24,7 @@ #include "k9dvdtitle.h" #include -#include +#include "ui_viewmpeg2.h" #include #include #include @@ -35,7 +35,7 @@ #include "k9xine.h" #include "k9phonon.h" #include "k9internalplayer.h" - +#include /** *@author */ @@ -43,7 +43,8 @@ class k9Widget : public QWidget { Q_OBJECT protected: - QImage *m_image; + QImage m_image; + QMutex m_mutex; void paintEvent ( QPaintEvent * _event); public: k9Widget (QWidget *_parent); @@ -56,7 +57,7 @@ public: kViewMPEG2(QWidget *parent); ~kViewMPEG2(); - virtual void drawPixmap( QImage *image); + virtual void drawImage( QImage *image); private: QMutex mutex; @@ -83,6 +84,7 @@ Ui::ViewMPEG2 Ui_viewMPEG2; QMutex m_mutex; QTimer m_timer; + QWaitCondition m_wplay; protected: void closeEvent( QCloseEvent* ); void resizeEvent ( QResizeEvent * ); @@ -98,7 +100,7 @@ void readSettings(); void sliderReleased(); void sliderPressed(); - void drawPixmap(); + void drawImage(); }; diff -Nru k9copy-2.1.0/src/main/prefDVD.ui k9copy-2.2.0/src/main/prefDVD.ui --- k9copy-2.1.0/src/main/prefDVD.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/prefDVD.ui 2009-02-19 22:30:17.000000000 +0100 @@ -6,7 +6,7 @@ 0 0 659 - 424 + 442
@@ -110,6 +110,13 @@
+ + + + Enable prohibited user operations + + +
diff -Nru k9copy-2.1.0/src/main/prefMencoder.ui k9copy-2.2.0/src/main/prefMencoder.ui --- k9copy-2.1.0/src/main/prefMencoder.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/prefMencoder.ui 2009-02-19 22:30:17.000000000 +0100 @@ -1,4 +1,4 @@ - + prefMencoder @@ -63,69 +63,205 @@ + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 121 + 21 + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Available variables + + + false + + + + + + + + 0 + 0 + + + + 21 + + + + + 0 + Video codecs - - - + + + + + + + + + + + 0 + 0 + + + + 27 + + + + + + + + 0 + 0 + + + + + + + 28 + + + + - - - - - 0 - 0 - + + + + label - - + + false - - 28 + + leVLabel - - - - - 0 - 0 - - - - 27 + + + + true - - + + - label + fourcc false - - leVLabel - - + + + + - fourcc + one pass false - + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 90 + + + + + + + + true + + + + + + Q3TextEdit::WidgetWidth + + + + + + + + 0 + 0 + + + + + 22 + 22 + + + + + 22 + 22 + + + + + + + + + + first pass @@ -135,7 +271,7 @@ - + @@ -152,7 +288,7 @@ QSizePolicy::Expanding - + 20 81 @@ -161,7 +297,7 @@ - + 22 @@ -174,14 +310,24 @@ 22 - + - + + + + second pass + + + false + + + + @@ -191,7 +337,7 @@ - + 22 @@ -204,7 +350,7 @@ 22 - + @@ -217,7 +363,7 @@ QSizePolicy::Expanding - + 20 60 @@ -227,151 +373,104 @@ - - + + - one pass + encoder - + + + + + false + + + mencoder + + + + + ffmpeg + + - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 90 - - - + + + + + Audio codecs + + + + + + - - - - true - - - + + + + + 0 + 0 + - - Q3TextEdit::WidgetWidth + + 27 - - + + 0 0 - - - 22 - 22 - - - - - 22 - 22 - - - - + + 28 - - + + - second pass + label false - - - - - - - - - true + + leALabel - - - - - Audio codecs - - - - - - - 0 - 0 - - - - 28 - - + + - - + + - + 0 0 - - 27 - - - - - - - - - - - - label + options false - - leALabel - - + - - - @@ -380,7 +479,7 @@ QSizePolicy::Expanding - + 20 78 @@ -389,7 +488,7 @@ - + 0 @@ -408,84 +507,54 @@ 22 - + + + + - - - - - 0 - 0 - - + + - options + encoder - + + + + + false + + + mencoder + + + + + ffmpeg + + + + + + + + extension + + + + - - - - - 0 - 0 - - - - - 75 - true - - - - Available variables - - - false - - - - - - - - 0 - 0 - - - - 21 - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 121 - 21 - - - - @@ -503,7 +572,7 @@ KPushButton - QWidget + QPushButton
kpushbutton.h
@@ -547,8 +616,8 @@ lbvCodecsCurrentChanged(Q3ListBoxItem*) - 20 - 20 + 32 + 54 20 @@ -563,8 +632,8 @@ teOpt1TextChanged() - 20 - 20 + 198 + 93 20 @@ -579,8 +648,8 @@ teOpt2TextChanged() - 20 - 20 + 198 + 217 20 @@ -595,8 +664,8 @@ leVLabelTextChanged(QString) - 20 - 20 + 197 + 53 20 @@ -611,8 +680,8 @@ teOpt3TextChanged() - 20 - 20 + 198 + 340 20 @@ -627,8 +696,8 @@ lbaCodecsCurrentChanged(Q3ListBoxItem*) - 20 - 20 + 32 + 54 20 @@ -643,8 +712,8 @@ teOptATextChanged() - 20 - 20 + 175 + 68 20 @@ -659,8 +728,8 @@ leALabelTextChanged(QString) - 20 - 20 + 174 + 53 20 @@ -675,8 +744,8 @@ btnOpt1Clicked() - 20 - 20 + 629 + 93 20 @@ -691,8 +760,8 @@ btnOpt2Clicked() - 20 - 20 + 629 + 217 20 @@ -707,8 +776,8 @@ btnOpt3Clicked() - 20 - 20 + 629 + 340 20 @@ -723,8 +792,8 @@ btnOptAClicked() - 20 - 20 + 629 + 68 20 @@ -739,8 +808,8 @@ btnAddAClicked() - 20 - 20 + 32 + 444 20 @@ -755,8 +824,8 @@ btnAddVClicked() - 20 - 20 + 32 + 444 20 @@ -771,8 +840,8 @@ btnDeleteAClicked() - 20 - 20 + 85 + 444 20 @@ -787,8 +856,8 @@ btnDeleteVClicked() - 20 - 20 + 85 + 444 20 @@ -803,8 +872,8 @@ leFourccTextChanged(QString) - 20 - 20 + 197 + 67 20 @@ -819,8 +888,8 @@ bResetClicked() - 20 - 20 + 647 + 534 20 @@ -828,5 +897,58 @@ + + cbEncoderA + currentIndexChanged(QString) + prefMencoder + cbEncoderATextChanged(QString) + + + 412 + 447 + + + 335 + 293 + + + + + leExtension + textChanged(QString) + prefMencoder + leExtensionTextChanged(QString) + + + 416 + 447 + + + 335 + 293 + + + + + cbEncoderV + currentIndexChanged(QString) + prefMencoder + cbEncoderVTextChanged(QString) + + + 424 + 447 + + + 335 + 293 + + + + + cbEncoderATextChanged(QString) + leExtensionTextChanged(QString) + cbEncoderVTextChanged(QString) +
diff -Nru k9copy-2.1.0/src/main/prefMPEG4.ui k9copy-2.2.0/src/main/prefMPEG4.ui --- k9copy-2.1.0/src/main/prefMPEG4.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/main/prefMPEG4.ui 2009-02-19 22:30:17.000000000 +0100 @@ -1,4 +1,4 @@ - + prefMPEG4 @@ -13,27 +13,11 @@ Form1 - + + + - - - 5 - - - 5 - - - 5 - - - 5 - - - 2 - - - 2 - + @@ -50,7 +34,30 @@ - + + + + Qt::Horizontal + + + + 423 + 20 + + + + + + + + Encoder + + + + + + + @@ -149,7 +156,7 @@
- 640 + 720 4 @@ -183,7 +190,7 @@ QSizePolicy::Expanding - + 380 21 @@ -230,7 +237,7 @@ QSizePolicy::Expanding - + 21 110 @@ -279,16 +286,7 @@ Q3GroupBox::NoFrame - - 2 - - - 2 - - - 2 - - + 2 @@ -353,7 +351,7 @@ QSizePolicy::Expanding - + 51 20 @@ -382,7 +380,7 @@ QSizePolicy::Expanding - + 130 21 @@ -488,7 +486,7 @@ QSizePolicy::Expanding - + 376 20 @@ -524,7 +522,7 @@ QSizePolicy::Expanding - + 20 61 @@ -536,7 +534,7 @@ - + use cell cache @@ -796,5 +794,24 @@ + + cbEncoder + activated(int) + prefMPEG4 + cbEncoderActivated(int) + + + 536 + 20 + + + 290 + 229 + + + + + cbEncoderActivated(int) + diff -Nru k9copy-2.1.0/src/mpeg2/alloc.cpp k9copy-2.2.0/src/mpeg2/alloc.cpp --- k9copy-2.1.0/src/mpeg2/alloc.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/alloc.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,70 +0,0 @@ -/* - * alloc.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include "mpeg2.h" - -static void * (* malloc_hook) (unsigned size, mpeg2_alloc_t reason) = NULL; -static int (* free_hook) (void * buf) = NULL; - -void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason) -{ - char * buf; - - if (malloc_hook) { - buf = (char *) malloc_hook (size, reason); - if (buf) - return buf; - } - - if (size) { - buf = (char *) malloc (size + 63 + sizeof (void **)); - if (buf) { - char * align_buf; - - align_buf = buf + 63 + sizeof (void **); - align_buf -= (long)align_buf & 63; - *(((void **)align_buf) - 1) = buf; - return align_buf; - } - } - return NULL; -} - -void mpeg2_free (void * buf) -{ - if (free_hook && free_hook (buf)) - return; - - if (buf) - free (*(((void **)buf) - 1)); -} - -void mpeg2_malloc_hooks (void * malloc (unsigned, mpeg2_alloc_t), - int free (void *)) -{ - malloc_hook = malloc; - free_hook = free; -} diff -Nru k9copy-2.1.0/src/mpeg2/attributes.h k9copy-2.2.0/src/mpeg2/attributes.h --- k9copy-2.1.0/src/mpeg2/attributes.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/attributes.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -/* - * attributes.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* use gcc attribs to align critical data structures */ -#ifdef ATTRIBUTE_ALIGNED_MAX -#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align))) -#else -#define ATTR_ALIGN(align) -#endif - -#ifdef HAVE_BUILTIN_EXPECT -#define likely(x) __builtin_expect ((x) != 0, 1) -#define unlikely(x) __builtin_expect ((x) != 0, 0) -#else -#define likely(x) (x) -#define unlikely(x) (x) -#endif diff -Nru k9copy-2.1.0/src/mpeg2/bswap.h k9copy-2.2.0/src/mpeg2/bswap.h --- k9copy-2.1.0/src/mpeg2/bswap.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/bswap.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,98 +0,0 @@ -#ifndef BSWAP_H_INCLUDED -#define BSWAP_H_INCLUDED - -/* - * Copyright (C) 2000, 2001 Billy Biggs , - * Hkan Hjort - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#if defined(WORDS_BIGENDIAN) -/* All bigendian systems are fine, just ignore the swaps. */ -#define B2N_16(x) (void)(x) -#define B2N_32(x) (void)(x) -#define B2N_64(x) (void)(x) - -#else - -/* For __FreeBSD_version */ -#if defined(HAVE_SYS_PARAM_H) -#include -#endif - -#if defined(__linux__) -#include -#define B2N_16(x) x = bswap_16(x) -#define B2N_32(x) x = bswap_32(x) -#define B2N_64(x) x = bswap_64(x) - -#elif defined(__NetBSD__) -#include -#define B2N_16(x) BE16TOH(x) -#define B2N_32(x) BE32TOH(x) -#define B2N_64(x) BE64TOH(x) - -#elif defined(__OpenBSD__) -#include -#define B2N_16(x) x = swap16(x) -#define B2N_32(x) x = swap32(x) -#define B2N_64(x) x = swap64(x) - -#elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 -#include -#define B2N_16(x) x = be16toh(x) -#define B2N_32(x) x = be32toh(x) -#define B2N_64(x) x = be64toh(x) - -/* This is a slow but portable implementation, it has multiple evaluation - * problems so beware. - * Old FreeBSD's and Solaris don't have or any other such - * functionality! - */ - -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) -#define B2N_16(x) \ - x = ((((x) & 0xff00) >> 8) | \ - (((x) & 0x00ff) << 8)) -#define B2N_32(x) \ - x = ((((x) & 0xff000000) >> 24) | \ - (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | \ - (((x) & 0x000000ff) << 24)) -#define B2N_64(x) \ - x = ((((x) & 0xff00000000000000) >> 56) | \ - (((x) & 0x00ff000000000000) >> 40) | \ - (((x) & 0x0000ff0000000000) >> 24) | \ - (((x) & 0x000000ff00000000) >> 8) | \ - (((x) & 0x00000000ff000000) << 8) | \ - (((x) & 0x0000000000ff0000) << 24) | \ - (((x) & 0x000000000000ff00) << 40) | \ - (((x) & 0x00000000000000ff) << 56)) - -#else - -/* If there isn't a header provided with your system with this functionality - * add the relevant || define( ) to the portable implementation above. - */ -#error "You need to add endian swap macros for you're system" - -#endif - -#endif /* WORDS_BIGENDIAN */ - -#endif /* BSWAP_H_INCLUDED */ diff -Nru k9copy-2.1.0/src/mpeg2/cmake_install.cmake k9copy-2.2.0/src/mpeg2/cmake_install.cmake --- k9copy-2.1.0/src/mpeg2/cmake_install.cmake 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/mpeg2/convert_internal.h k9copy-2.2.0/src/mpeg2/convert_internal.h --- k9copy-2.1.0/src/mpeg2/convert_internal.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/convert_internal.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,41 +0,0 @@ -/* - * convert_internal.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -typedef struct { - uint8_t * rgb_ptr; - int width; - int y_stride, rgb_stride, y_increm, uv_increm, rgb_increm; - int chroma420, convert420; - int dither_offset, dither_stride; - int y_stride_frame, uv_stride_frame, rgb_stride_frame, rgb_stride_min; -} convert_rgb_t; - -typedef void mpeg2convert_copy_t (void * id, uint8_t * const * src, - unsigned int v_offset); - -mpeg2convert_copy_t * mpeg2convert_rgb_mmxext (int bpp, int mode, - const mpeg2_sequence_t * seq); -mpeg2convert_copy_t * mpeg2convert_rgb_mmx (int bpp, int mode, - const mpeg2_sequence_t * seq); -mpeg2convert_copy_t * mpeg2convert_rgb_vis (int bpp, int mode, - const mpeg2_sequence_t * seq); diff -Nru k9copy-2.1.0/src/mpeg2/cpu_accel.cpp k9copy-2.2.0/src/mpeg2/cpu_accel.cpp --- k9copy-2.1.0/src/mpeg2/cpu_accel.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/cpu_accel.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,220 +0,0 @@ -/* - * cpu_accel.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -#ifdef MPEG2_ACCEL_DETECT -#ifdef ARCH_X86 -static inline uint32_t arch_accel (void) -{ - uint32_t eax, ebx, ecx, edx; - int AMD; - uint32_t caps; - -#if !defined(PIC) && !defined(__PIC__) -#define cpuid(op,eax,ebx,ecx,edx) \ - __asm__ ("cpuid" \ - : "=a" (eax), \ - "=b" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "a" (op) \ - : "cc") -#else /* PIC version : save ebx */ -#define cpuid(op,eax,ebx,ecx,edx) \ - __asm__ ("push %%ebx\n\t" \ - "cpuid\n\t" \ - "movl %%ebx,%1\n\t" \ - "pop %%ebx" \ - : "=a" (eax), \ - "=r" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "a" (op) \ - : "cc") -#endif - - __asm__ ("pushf\n\t" - "pushf\n\t" - "pop %0\n\t" - "movl %0,%1\n\t" - "xorl $0x200000,%0\n\t" - "push %0\n\t" - "popf\n\t" - "pushf\n\t" - "pop %0\n\t" - "popf" - : "=r" (eax), - "=r" (ebx) - : - : "cc"); - - if (eax == ebx) /* no cpuid */ - return 0; - - cpuid (0x00000000, eax, ebx, ecx, edx); - if (!eax) /* vendor string only */ - return 0; - - AMD = (ebx == 0x68747541) && (ecx == 0x444d4163) && (edx == 0x69746e65); - - cpuid (0x00000001, eax, ebx, ecx, edx); - if (! (edx & 0x00800000)) /* no MMX */ - return 0; - - caps = MPEG2_ACCEL_X86_MMX; - if (edx & 0x02000000) /* SSE - identical to AMD MMX extensions */ - caps = MPEG2_ACCEL_X86_MMX | MPEG2_ACCEL_X86_MMXEXT; - - cpuid (0x80000000, eax, ebx, ecx, edx); - if (eax < 0x80000001) /* no extended capabilities */ - return caps; - - cpuid (0x80000001, eax, ebx, ecx, edx); - - if (edx & 0x80000000) - caps |= MPEG2_ACCEL_X86_3DNOW; - - if (AMD && (edx & 0x00400000)) /* AMD MMX extensions */ - caps |= MPEG2_ACCEL_X86_MMXEXT; - - return caps; -} -#endif /* ARCH_X86 */ - -#if defined(ARCH_PPC) || defined(ARCH_SPARC) -#include -#include - -static sigjmp_buf jmpbuf; -static volatile sig_atomic_t canjump = 0; - -static RETSIGTYPE sigill_handler (int sig) -{ - if (!canjump) { - signal (sig, SIG_DFL); - raise (sig); - } - - canjump = 0; - siglongjmp (jmpbuf, 1); -} - -#ifdef ARCH_PPC -static inline uint32_t arch_accel (void) -{ - static RETSIGTYPE (* oldsig) (int); - - oldsig = signal (SIGILL, sigill_handler); - if (sigsetjmp (jmpbuf, 1)) { - signal (SIGILL, oldsig); - return 0; - } - - canjump = 1; - -#ifdef HAVE_ALTIVEC_H /* gnu */ -#define VAND(a,b,c) "vand " #a "," #b "," #c "\n\t" -#else /* apple */ -#define VAND(a,b,c) "vand v" #a ",v" #b ",v" #c "\n\t" -#endif - asm volatile ("mtspr 256, %0\n\t" - VAND (0, 0, 0) - : - : "r" (-1)); - - canjump = 0; - - signal (SIGILL, oldsig); - return MPEG2_ACCEL_PPC_ALTIVEC; -} -#endif /* ARCH_PPC */ - -#ifdef ARCH_SPARC -static inline uint32_t arch_accel (void) -{ - static RETSIGTYPE (* oldsig) (int); - - oldsig = signal (SIGILL, sigill_handler); - if (sigsetjmp (jmpbuf, 1)) { - signal (SIGILL, oldsig); - return 0; - } - - canjump = 1; - - /* pdist %f0, %f0, %f0 */ - __asm__ __volatile__(".word\t0x81b007c0"); - - canjump = 0; - - if (sigsetjmp (jmpbuf, 1)) { - signal (SIGILL, oldsig); - return MPEG2_ACCEL_SPARC_VIS; - } - - canjump = 1; - - /* edge8n %g0, %g0, %g0 */ - __asm__ __volatile__(".word\t0x81b00020"); - - canjump = 0; - - signal (SIGILL, oldsig); - return MPEG2_ACCEL_SPARC_VIS | MPEG2_ACCEL_SPARC_VIS2; -} -#endif /* ARCH_SPARC */ -#endif /* ARCH_PPC || ARCH_SPARC */ - -#ifdef ARCH_ALPHA -static inline uint32_t arch_accel (void) -{ - uint64_t no_mvi; - - asm volatile ("amask %1, %0" - : "=r" (no_mvi) - : "rI" (256)); /* AMASK_MVI */ - return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA | - MPEG2_ACCEL_ALPHA_MVI); -} -#endif /* ARCH_ALPHA */ -#endif /* ACCEL_DETECT */ - -uint32_t mpeg2_detect_accel (void) -{ - uint32_t accel; - - accel = 0; -#ifdef MPEG2_ACCEL_DETECT -#if defined (ARCH_X86) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) - accel = arch_accel (); -#endif -#endif - return accel; -} diff -Nru k9copy-2.1.0/src/mpeg2/cpu_state.cpp k9copy-2.2.0/src/mpeg2/cpu_state.cpp --- k9copy-2.1.0/src/mpeg2/cpu_state.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/cpu_state.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,128 +0,0 @@ -/* - * cpu_state.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#include - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#ifdef ARCH_X86 -#include "mmx.h" -#endif - -void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; -void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; - -#ifdef ARCH_X86 -static void state_restore_mmx (cpu_state_t * state) -{ - emms (); -} -#endif - -#ifdef ARCH_PPC -#ifdef HAVE_ALTIVEC_H /* gnu */ -#define LI(a,b) "li " #a "," #b "\n\t" -#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t" -#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t" -#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t" -#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t" -#else /* apple */ -#define LI(a,b) "li r" #a "," #b "\n\t" -#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t" -#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t" -#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t" -#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t" -#endif - -static void state_save_altivec (cpu_state_t * state) -{ - asm (LI (9, 16) - STVX0 (20, 0, 3) - LI (11, 32) - STVX (21, 9, 3) - LI (9, 48) - STVX (22, 11, 3) - LI (11, 64) - STVX (23, 9, 3) - LI (9, 80) - STVX (24, 11, 3) - LI (11, 96) - STVX (25, 9, 3) - LI (9, 112) - STVX (26, 11, 3) - LI (11, 128) - STVX (27, 9, 3) - LI (9, 144) - STVX (28, 11, 3) - LI (11, 160) - STVX (29, 9, 3) - LI (9, 176) - STVX (30, 11, 3) - STVX (31, 9, 3)); -} - -static void state_restore_altivec (cpu_state_t * state) -{ - asm (LI (9, 16) - LVX0 (20, 0, 3) - LI (11, 32) - LVX (21, 9, 3) - LI (9, 48) - LVX (22, 11, 3) - LI (11, 64) - LVX (23, 9, 3) - LI (9, 80) - LVX (24, 11, 3) - LI (11, 96) - LVX (25, 9, 3) - LI (9, 112) - LVX (26, 11, 3) - LI (11, 128) - LVX (27, 9, 3) - LI (9, 144) - LVX (28, 11, 3) - LI (11, 160) - LVX (29, 9, 3) - LI (9, 176) - LVX (30, 11, 3) - LVX (31, 9, 3)); -} -#endif - -void mpeg2_cpu_state_init (uint32_t accel) -{ -#ifdef ARCH_X86 - if (accel & MPEG2_ACCEL_X86_MMX) { - mpeg2_cpu_state_restore = state_restore_mmx; - } -#endif -#ifdef ARCH_PPC - if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { - mpeg2_cpu_state_save = state_save_altivec; - mpeg2_cpu_state_restore = state_restore_altivec; - } -#endif -} diff -Nru k9copy-2.1.0/src/mpeg2/decode.cpp k9copy-2.2.0/src/mpeg2/decode.cpp --- k9copy-2.1.0/src/mpeg2/decode.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/decode.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,446 +0,0 @@ -/* - * decode.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#include /* memcmp/memset, try to remove */ -#include - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -static int mpeg2_accels = 0; - -#define BUFFER_SIZE (1194 * 1024) - -const mpeg2_info_t * mpeg2_info (mpeg2dec_t * mpeg2dec) -{ - return &(mpeg2dec->info); -} - -static inline int skip_chunk (mpeg2dec_t * mpeg2dec, int bytes) -{ - uint8_t * current; - uint32_t shift; - uint8_t * limit; - uint8_t byte; - - if (!bytes) - return 0; - - current = mpeg2dec->buf_start; - shift = mpeg2dec->shift; - limit = current + bytes; - - do { - byte = *current++; - if (shift == 0x00000100) { - int skipped; - - mpeg2dec->shift = 0xffffff00; - skipped = current - mpeg2dec->buf_start; - mpeg2dec->buf_start = current; - return skipped; - } - shift = (shift | byte) << 8; - } while (current < limit); - - mpeg2dec->shift = shift; - mpeg2dec->buf_start = current; - return 0; -} - -static inline int copy_chunk (mpeg2dec_t * mpeg2dec, int bytes) -{ - uint8_t * current; - uint32_t shift; - uint8_t * chunk_ptr; - uint8_t * limit; - uint8_t byte; - - if (!bytes) - return 0; - - current = mpeg2dec->buf_start; - shift = mpeg2dec->shift; - chunk_ptr = mpeg2dec->chunk_ptr; - limit = current + bytes; - - do { - byte = *current++; - if (shift == 0x00000100) { - int copied; - - mpeg2dec->shift = 0xffffff00; - mpeg2dec->chunk_ptr = chunk_ptr + 1; - copied = current - mpeg2dec->buf_start; - mpeg2dec->buf_start = current; - return copied; - } - shift = (shift | byte) << 8; - *chunk_ptr++ = byte; - } while (current < limit); - - mpeg2dec->shift = shift; - mpeg2dec->buf_start = current; - return 0; -} - -void mpeg2_buffer (mpeg2dec_t * mpeg2dec, uint8_t * start, uint8_t * end) -{ - mpeg2dec->buf_start = start; - mpeg2dec->buf_end = end; -} - -int mpeg2_getpos (mpeg2dec_t * mpeg2dec) -{ - return mpeg2dec->buf_end - mpeg2dec->buf_start; -} - -static inline mpeg2_state_t seek_chunk (mpeg2dec_t * mpeg2dec) -{ - int size, skipped; - - size = mpeg2dec->buf_end - mpeg2dec->buf_start; - skipped = skip_chunk (mpeg2dec, size); - if (!skipped) { - mpeg2dec->bytes_since_tag += size; - return STATE_BUFFER; - } - mpeg2dec->bytes_since_tag += skipped; - mpeg2dec->code = mpeg2dec->buf_start[-1]; - return (mpeg2_state_t)-1; -} - -mpeg2_state_t mpeg2_seek_header (mpeg2dec_t * mpeg2dec) -{ - while (mpeg2dec->code != 0xb3 && - ((mpeg2dec->code != 0xb7 && mpeg2dec->code != 0xb8 && - mpeg2dec->code) || mpeg2dec->sequence.width == (unsigned)-1)) - if (seek_chunk (mpeg2dec) == STATE_BUFFER) - return STATE_BUFFER; - mpeg2dec->chunk_start = mpeg2dec->chunk_ptr = mpeg2dec->chunk_buffer; - mpeg2dec->user_data_len = 0; - return (mpeg2dec->code ? mpeg2_parse_header (mpeg2dec) : - mpeg2_header_picture_start (mpeg2dec)); -} - -#define RECEIVED(code,state) (((state) << 8) + (code)) - -mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec) -{ - int size_buffer, size_chunk, copied; - - if (mpeg2dec->action) { - mpeg2_state_t state; - - state = mpeg2dec->action (mpeg2dec); - if ((int)state >= 0) - return state; - } - - while (1) { - while ((unsigned) (mpeg2dec->code - mpeg2dec->first_decode_slice) < - mpeg2dec->nb_decode_slices) { - size_buffer = mpeg2dec->buf_end - mpeg2dec->buf_start; - size_chunk = (mpeg2dec->chunk_buffer + BUFFER_SIZE - - mpeg2dec->chunk_ptr); - if (size_buffer <= size_chunk) { - copied = copy_chunk (mpeg2dec, size_buffer); - if (!copied) { - mpeg2dec->bytes_since_tag += size_buffer; - mpeg2dec->chunk_ptr += size_buffer; - return STATE_BUFFER; - } - } else { - copied = copy_chunk (mpeg2dec, size_chunk); - if (!copied) { - /* filled the chunk buffer without finding a start code */ - mpeg2dec->bytes_since_tag += size_chunk; - mpeg2dec->action = seek_chunk; - return STATE_INVALID; - } - } - mpeg2dec->bytes_since_tag += copied; - - mpeg2_slice (&(mpeg2dec->decoder), mpeg2dec->code, - mpeg2dec->chunk_start); - mpeg2dec->code = mpeg2dec->buf_start[-1]; - mpeg2dec->chunk_ptr = mpeg2dec->chunk_start; - } - if ((unsigned) (mpeg2dec->code - 1) >= 0xb0 - 1) - break; - if (seek_chunk (mpeg2dec) == STATE_BUFFER) - return STATE_BUFFER; - } - - switch (mpeg2dec->code) { - case 0x00: - mpeg2dec->action = mpeg2_header_picture_start; - return mpeg2dec->state; - case 0xb7: - mpeg2dec->action = mpeg2_header_end; - break; - case 0xb3: - case 0xb8: - mpeg2dec->action = mpeg2_parse_header; - break; - default: - mpeg2dec->action = seek_chunk; - return STATE_INVALID; - } - return (mpeg2dec->state == STATE_SLICE) ? STATE_SLICE : STATE_INVALID; -} - -mpeg2_state_t mpeg2_parse_header (mpeg2dec_t * mpeg2dec) -{ - static int (* process_header[]) (mpeg2dec_t * mpeg2dec) = { - mpeg2_header_picture, mpeg2_header_extension, mpeg2_header_user_data, - mpeg2_header_sequence, NULL, NULL, NULL, NULL, mpeg2_header_gop - }; - int size_buffer, size_chunk, copied; - - mpeg2dec->action = mpeg2_parse_header; - mpeg2dec->info.user_data = NULL; mpeg2dec->info.user_data_len = 0; - while (1) { - size_buffer = mpeg2dec->buf_end - mpeg2dec->buf_start; - size_chunk = (mpeg2dec->chunk_buffer + BUFFER_SIZE - - mpeg2dec->chunk_ptr); - if (size_buffer <= size_chunk) { - copied = copy_chunk (mpeg2dec, size_buffer); - if (!copied) { - mpeg2dec->bytes_since_tag += size_buffer; - mpeg2dec->chunk_ptr += size_buffer; - return STATE_BUFFER; - } - } else { - copied = copy_chunk (mpeg2dec, size_chunk); - if (!copied) { - /* filled the chunk buffer without finding a start code */ - mpeg2dec->bytes_since_tag += size_chunk; - mpeg2dec->code = 0xb4; - mpeg2dec->action = mpeg2_seek_header; - return STATE_INVALID; - } - } - mpeg2dec->bytes_since_tag += copied; - - if (process_header[mpeg2dec->code & 0x0b] (mpeg2dec)) { - mpeg2dec->code = mpeg2dec->buf_start[-1]; - mpeg2dec->action = mpeg2_seek_header; - return STATE_INVALID; - } - - mpeg2dec->code = mpeg2dec->buf_start[-1]; - switch (RECEIVED (mpeg2dec->code, mpeg2dec->state)) { - - /* state transition after a sequence header */ - case RECEIVED (0x00, STATE_SEQUENCE): - mpeg2dec->action = mpeg2_header_picture_start; - case RECEIVED (0xb8, STATE_SEQUENCE): - mpeg2_header_sequence_finalize (mpeg2dec); - break; - - /* other legal state transitions */ - case RECEIVED (0x00, STATE_GOP): - mpeg2_header_gop_finalize (mpeg2dec); - mpeg2dec->action = mpeg2_header_picture_start; - break; - case RECEIVED (0x01, STATE_PICTURE): - case RECEIVED (0x01, STATE_PICTURE_2ND): - mpeg2_header_picture_finalize (mpeg2dec, mpeg2_accels); - mpeg2dec->action = mpeg2_header_slice_start; - break; - - /* legal headers within a given state */ - case RECEIVED (0xb2, STATE_SEQUENCE): - case RECEIVED (0xb2, STATE_GOP): - case RECEIVED (0xb2, STATE_PICTURE): - case RECEIVED (0xb2, STATE_PICTURE_2ND): - case RECEIVED (0xb5, STATE_SEQUENCE): - case RECEIVED (0xb5, STATE_PICTURE): - case RECEIVED (0xb5, STATE_PICTURE_2ND): - mpeg2dec->chunk_ptr = mpeg2dec->chunk_start; - continue; - - default: - mpeg2dec->action = mpeg2_seek_header; - return STATE_INVALID; - } - - mpeg2dec->chunk_start = mpeg2dec->chunk_ptr = mpeg2dec->chunk_buffer; - mpeg2dec->user_data_len = 0; - return mpeg2dec->state; - } -} - -int mpeg2_convert (mpeg2dec_t * mpeg2dec, mpeg2_convert_t convert, void * arg) -{ - mpeg2_convert_init_t convert_init; - int error; - - error = convert (MPEG2_CONVERT_SET, NULL, &(mpeg2dec->sequence), 0, - mpeg2_accels, arg, &convert_init); - if (!error) { - mpeg2dec->convert = convert; - mpeg2dec->convert_arg = arg; - mpeg2dec->convert_id_size = convert_init.id_size; - mpeg2dec->convert_stride = 0; - } - return error; -} - -int mpeg2_stride (mpeg2dec_t * mpeg2dec, int stride) -{ - if (!mpeg2dec->convert) { - if (stride < (int) mpeg2dec->sequence.width) - stride = mpeg2dec->sequence.width; - mpeg2dec->decoder.stride_frame = stride; - } else { - mpeg2_convert_init_t convert_init; - - stride = mpeg2dec->convert (MPEG2_CONVERT_STRIDE, NULL, - &(mpeg2dec->sequence), stride, - mpeg2_accels, mpeg2dec->convert_arg, - &convert_init); - mpeg2dec->convert_id_size = convert_init.id_size; - mpeg2dec->convert_stride = stride; - } - return stride; -} - -void mpeg2_set_buf (mpeg2dec_t * mpeg2dec, uint8_t * buf[3], void * id) -{ - mpeg2_fbuf_t * fbuf; - - if (mpeg2dec->custom_fbuf) { - if (mpeg2dec->state == STATE_SEQUENCE) { - mpeg2dec->fbuf[2] = mpeg2dec->fbuf[1]; - mpeg2dec->fbuf[1] = mpeg2dec->fbuf[0]; - } - mpeg2_set_fbuf (mpeg2dec, (mpeg2dec->decoder.coding_type == - PIC_FLAG_CODING_TYPE_B)); - fbuf = mpeg2dec->fbuf[0]; - } else { - fbuf = &(mpeg2dec->fbuf_alloc[mpeg2dec->alloc_index].fbuf); - mpeg2dec->alloc_index_user = ++mpeg2dec->alloc_index; - } - fbuf->buf[0] = buf[0]; - fbuf->buf[1] = buf[1]; - fbuf->buf[2] = buf[2]; - fbuf->id = id; -} - -void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf) -{ - mpeg2dec->custom_fbuf = custom_fbuf; -} - -void mpeg2_skip (mpeg2dec_t * mpeg2dec, int skip) -{ - mpeg2dec->first_decode_slice = 1; - mpeg2dec->nb_decode_slices = skip ? 0 : (0xb0 - 1); -} - -void mpeg2_slice_region (mpeg2dec_t * mpeg2dec, int start, int end) -{ - start = (start < 1) ? 1 : (start > 0xb0) ? 0xb0 : start; - end = (end < start) ? start : (end > 0xb0) ? 0xb0 : end; - mpeg2dec->first_decode_slice = start; - mpeg2dec->nb_decode_slices = end - start; -} - -void mpeg2_tag_picture (mpeg2dec_t * mpeg2dec, uint32_t tag, uint32_t tag2) -{ - mpeg2dec->tag_previous = mpeg2dec->tag_current; - mpeg2dec->tag2_previous = mpeg2dec->tag2_current; - mpeg2dec->tag_current = tag; - mpeg2dec->tag2_current = tag2; - mpeg2dec->num_tags++; - mpeg2dec->bytes_since_tag = 0; -} - -uint32_t mpeg2_accel (uint32_t accel) -{ - if (!mpeg2_accels) { - if (accel & MPEG2_ACCEL_DETECT) - accel |= mpeg2_detect_accel (); - mpeg2_accels = accel |= MPEG2_ACCEL_DETECT; - mpeg2_cpu_state_init (accel); - mpeg2_idct_init (accel); - mpeg2_mc_init (accel); - } - return mpeg2_accels & ~MPEG2_ACCEL_DETECT; -} - -void mpeg2_reset (mpeg2dec_t * mpeg2dec, int full_reset) -{ - mpeg2dec->buf_start = mpeg2dec->buf_end = NULL; - mpeg2dec->num_tags = 0; - mpeg2dec->shift = 0xffffff00; - mpeg2dec->code = 0xb4; - mpeg2dec->action = mpeg2_seek_header; - mpeg2dec->state = STATE_INVALID; - mpeg2dec->first = 1; - - mpeg2_reset_info(&(mpeg2dec->info)); - mpeg2dec->info.gop = NULL; - mpeg2dec->info.user_data = NULL; - mpeg2dec->info.user_data_len = 0; - if (full_reset) { - mpeg2dec->info.sequence = NULL; - mpeg2_header_state_init (mpeg2dec); - } - -} - -mpeg2dec_t * mpeg2_init (void) -{ - mpeg2dec_t * mpeg2dec; - - mpeg2_accel (MPEG2_ACCEL_DETECT); - - mpeg2dec = (mpeg2dec_t *) mpeg2_malloc (sizeof (mpeg2dec_t), - MPEG2_ALLOC_MPEG2DEC); - if (mpeg2dec == NULL) - return NULL; - - memset (mpeg2dec->decoder.DCTblock, 0, 64 * sizeof (int16_t)); - memset (mpeg2dec->quantizer_matrix, 0, 4 * 64 * sizeof (uint8_t)); - - mpeg2dec->chunk_buffer = (uint8_t *) mpeg2_malloc (BUFFER_SIZE + 4, - MPEG2_ALLOC_CHUNK); - - mpeg2dec->sequence.width = (unsigned)-1; - mpeg2_reset (mpeg2dec, 1); - - return mpeg2dec; -} - -void mpeg2_close (mpeg2dec_t * mpeg2dec) -{ - mpeg2_header_state_init (mpeg2dec); - mpeg2_free (mpeg2dec->chunk_buffer); - mpeg2_free (mpeg2dec); -} diff -Nru k9copy-2.1.0/src/mpeg2/header.cpp k9copy-2.2.0/src/mpeg2/header.cpp --- k9copy-2.1.0/src/mpeg2/header.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/header.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,892 +0,0 @@ -/* - * header.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 2003 Regis Duchesne - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#include "ac.h" - -#include /* defines NULL */ -#include /* memcmp */ - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -#define SEQ_EXT 2 -#define SEQ_DISPLAY_EXT 4 -#define QUANT_MATRIX_EXT 8 -#define COPYRIGHT_EXT 0x10 -#define PIC_DISPLAY_EXT 0x80 -#define PIC_CODING_EXT 0x100 - -/* default intra quant matrix, in zig-zag order */ -static const uint8_t default_intra_quantizer_matrix[64] ATTR_ALIGN(16) = { - 8, - 16, 16, - 19, 16, 19, - 22, 22, 22, 22, - 22, 22, 26, 24, 26, - 27, 27, 27, 26, 26, 26, - 26, 27, 27, 27, 29, 29, 29, - 34, 34, 34, 29, 29, 29, 27, 27, - 29, 29, 32, 32, 34, 34, 37, - 38, 37, 35, 35, 34, 35, - 38, 38, 40, 40, 40, - 48, 48, 46, 46, - 56, 56, 58, - 69, 69, - 83 -}; - -uint8_t mpeg2_scan_norm[64] ATTR_ALIGN(16) = { - /* Zig-Zag scan pattern */ - 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63 -}; - -uint8_t mpeg2_scan_alt[64] ATTR_ALIGN(16) = { - /* Alternate scan pattern */ - 0, 8, 16, 24, 1, 9, 2, 10, 17, 25, 32, 40, 48, 56, 57, 49, - 41, 33, 26, 18, 3, 11, 4, 12, 19, 27, 34, 42, 50, 58, 35, 43, - 51, 59, 20, 28, 5, 13, 6, 14, 21, 29, 36, 44, 52, 60, 37, 45, - 53, 61, 22, 30, 7, 15, 23, 31, 38, 46, 54, 62, 39, 47, 55, 63 -}; - -void mpeg2_header_state_init (mpeg2dec_t * mpeg2dec) -{ - if (mpeg2dec->sequence.width != (unsigned)-1) { - int i; - - mpeg2dec->sequence.width = (unsigned)-1; - if (!mpeg2dec->custom_fbuf) - for (i = mpeg2dec->alloc_index_user; - i < mpeg2dec->alloc_index; i++) { - mpeg2_free (mpeg2dec->fbuf_alloc[i].fbuf.buf[0]); - mpeg2_free (mpeg2dec->fbuf_alloc[i].fbuf.buf[1]); - mpeg2_free (mpeg2dec->fbuf_alloc[i].fbuf.buf[2]); - } - if (mpeg2dec->convert_start) - for (i = 0; i < 3; i++) { - mpeg2_free (mpeg2dec->yuv_buf[i][0]); - mpeg2_free (mpeg2dec->yuv_buf[i][1]); - mpeg2_free (mpeg2dec->yuv_buf[i][2]); - } - if (mpeg2dec->decoder.convert_id) - mpeg2_free (mpeg2dec->decoder.convert_id); - } - mpeg2dec->decoder.coding_type = I_TYPE; - mpeg2dec->decoder.convert = NULL; - mpeg2dec->decoder.convert_id = NULL; - mpeg2dec->picture = mpeg2dec->pictures; - mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf; - mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf; - mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf; - mpeg2dec->first = 1; - mpeg2dec->alloc_index = 0; - mpeg2dec->alloc_index_user = 0; - mpeg2dec->first_decode_slice = 1; - mpeg2dec->nb_decode_slices = 0xb0 - 1; - mpeg2dec->convert = NULL; - mpeg2dec->convert_start = NULL; - mpeg2dec->custom_fbuf = 0; - mpeg2dec->yuv_index = 0; -} - -void mpeg2_reset_info (mpeg2_info_t * info) -{ - info->current_picture = info->current_picture_2nd = NULL; - info->display_picture = info->display_picture_2nd = NULL; - info->current_fbuf = info->display_fbuf = info->discard_fbuf = NULL; -} - -static void info_user_data (mpeg2dec_t * mpeg2dec) -{ - if (mpeg2dec->user_data_len) { - mpeg2dec->info.user_data = mpeg2dec->chunk_buffer; - mpeg2dec->info.user_data_len = mpeg2dec->user_data_len - 3; - } -} - -int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence); - static unsigned int frame_period[16] = { - 0, 1126125, 1125000, 1080000, 900900, 900000, 540000, 450450, 450000, - /* unofficial: xing 15 fps */ - 1800000, - /* unofficial: libmpeg3 "Unofficial economy rates" 5/10/12/15 fps */ - 5400000, 2700000, 2250000, 1800000, 0, 0 - }; - int i; - - if ((buffer[6] & 0x20) != 0x20) /* missing marker_bit */ - return 1; - - i = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2]; - if (! (sequence->display_width = sequence->picture_width = i >> 12)) - return 1; - if (! (sequence->display_height = sequence->picture_height = i & 0xfff)) - return 1; - sequence->width = (sequence->picture_width + 15) & ~15; - sequence->height = (sequence->picture_height + 15) & ~15; - sequence->chroma_width = sequence->width >> 1; - sequence->chroma_height = sequence->height >> 1; - - sequence->flags = (SEQ_FLAG_PROGRESSIVE_SEQUENCE | - SEQ_VIDEO_FORMAT_UNSPECIFIED); - - sequence->pixel_width = buffer[3] >> 4; /* aspect ratio */ - sequence->frame_period = frame_period[buffer[3] & 15]; - - sequence->byte_rate = (buffer[4]<<10) | (buffer[5]<<2) | (buffer[6]>>6); - - sequence->vbv_buffer_size = ((buffer[6]<<16)|(buffer[7]<<8))&0x1ff800; - - if (buffer[7] & 4) - sequence->flags |= SEQ_FLAG_CONSTRAINED_PARAMETERS; - - mpeg2dec->copy_matrix = 3; - if (buffer[7] & 2) { - for (i = 0; i < 64; i++) - mpeg2dec->new_quantizer_matrix[0][mpeg2_scan_norm[i]] = - (buffer[i+7] << 7) | (buffer[i+8] >> 1); - buffer += 64; - } else - for (i = 0; i < 64; i++) - mpeg2dec->new_quantizer_matrix[0][mpeg2_scan_norm[i]] = - default_intra_quantizer_matrix[i]; - - if (buffer[7] & 1) - for (i = 0; i < 64; i++) - mpeg2dec->new_quantizer_matrix[1][mpeg2_scan_norm[i]] = - buffer[i+8]; - else - memset (mpeg2dec->new_quantizer_matrix[1], 16, 64); - - sequence->profile_level_id = 0x80; - sequence->colour_primaries = 0; - sequence->transfer_characteristics = 0; - sequence->matrix_coefficients = 0; - - mpeg2dec->ext_state = SEQ_EXT; - mpeg2dec->state = STATE_SEQUENCE; - mpeg2dec->display_offset_x = mpeg2dec->display_offset_y = 0; - - return 0; -} - -static int sequence_ext (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence); - uint32_t flags; - - if (!(buffer[3] & 1)) - return 1; - - sequence->profile_level_id = (buffer[0] << 4) | (buffer[1] >> 4); - - sequence->display_width = sequence->picture_width += - ((buffer[1] << 13) | (buffer[2] << 5)) & 0x3000; - sequence->display_height = sequence->picture_height += - (buffer[2] << 7) & 0x3000; - sequence->width = (sequence->picture_width + 15) & ~15; - sequence->height = (sequence->picture_height + 15) & ~15; - flags = sequence->flags | SEQ_FLAG_MPEG2; - if (!(buffer[1] & 8)) { - flags &= ~SEQ_FLAG_PROGRESSIVE_SEQUENCE; - sequence->height = (sequence->height + 31) & ~31; - } - if (buffer[5] & 0x80) - flags |= SEQ_FLAG_LOW_DELAY; - sequence->flags = flags; - sequence->chroma_width = sequence->width; - sequence->chroma_height = sequence->height; - switch (buffer[1] & 6) { - case 0: /* invalid */ - return 1; - case 2: /* 4:2:0 */ - sequence->chroma_height >>= 1; - case 4: /* 4:2:2 */ - sequence->chroma_width >>= 1; - } - - sequence->byte_rate += ((buffer[2]<<25) | (buffer[3]<<17)) & 0x3ffc0000; - - sequence->vbv_buffer_size |= buffer[4] << 21; - - sequence->frame_period = - sequence->frame_period * ((buffer[5]&31)+1) / (((buffer[5]>>2)&3)+1); - - mpeg2dec->ext_state = SEQ_DISPLAY_EXT; - - return 0; -} - -static int sequence_display_ext (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence); - uint32_t flags; - - flags = ((sequence->flags & ~SEQ_MASK_VIDEO_FORMAT) | - ((buffer[0]<<4) & SEQ_MASK_VIDEO_FORMAT)); - if (buffer[0] & 1) { - flags |= SEQ_FLAG_COLOUR_DESCRIPTION; - sequence->colour_primaries = buffer[1]; - sequence->transfer_characteristics = buffer[2]; - sequence->matrix_coefficients = buffer[3]; - buffer += 3; - } - - if (!(buffer[2] & 2)) /* missing marker_bit */ - return 1; - - sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2); - sequence->display_height = - ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3); - - return 0; -} - -static inline void finalize_sequence (mpeg2_sequence_t * sequence) -{ - int width; - int height; - - sequence->byte_rate *= 50; - - if (sequence->flags & SEQ_FLAG_MPEG2) { - switch (sequence->pixel_width) { - case 1: /* square pixels */ - sequence->pixel_width = sequence->pixel_height = 1; return; - case 2: /* 4:3 aspect ratio */ - width = 4; height = 3; break; - case 3: /* 16:9 aspect ratio */ - width = 16; height = 9; break; - case 4: /* 2.21:1 aspect ratio */ - width = 221; height = 100; break; - default: /* illegal */ - sequence->pixel_width = sequence->pixel_height = 0; return; - } - width *= sequence->display_height; - height *= sequence->display_width; - - } else { - if (sequence->byte_rate == 50 * 0x3ffff) - sequence->byte_rate = 0; /* mpeg-1 VBR */ - - switch (sequence->pixel_width) { - case 0: case 15: /* illegal */ - sequence->pixel_width = sequence->pixel_height = 0; return; - case 1: /* square pixels */ - sequence->pixel_width = sequence->pixel_height = 1; return; - case 3: /* 720x576 16:9 */ - sequence->pixel_width = 64; sequence->pixel_height = 45; return; - case 6: /* 720x480 16:9 */ - sequence->pixel_width = 32; sequence->pixel_height = 27; return; - case 12: /* 720*480 4:3 */ - sequence->pixel_width = 8; sequence->pixel_height = 9; return; - default: - height = 88 * sequence->pixel_width + 1171; - width = 2000; - } - } - - sequence->pixel_width = width; - sequence->pixel_height = height; - while (width) { /* find greatest common divisor */ - int tmp = width; - width = height % tmp; - height = tmp; - } - sequence->pixel_width /= height; - sequence->pixel_height /= height; -} - -static void copy_matrix (mpeg2dec_t * mpeg2dec, int index) -{ - if (memcmp (mpeg2dec->quantizer_matrix[index], - mpeg2dec->new_quantizer_matrix[index], 64)) { - tc_memcpy (mpeg2dec->quantizer_matrix[index], - mpeg2dec->new_quantizer_matrix[index], 64); - mpeg2dec->scaled[index] = -1; - } -} - -static void finalize_matrix (mpeg2dec_t * mpeg2dec) -{ - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - int i; - - for (i = 0; i < 2; i++) { - if (mpeg2dec->copy_matrix & (1 << i)) - copy_matrix (mpeg2dec, i); - if ((mpeg2dec->copy_matrix & (4 << i)) && - memcmp (mpeg2dec->quantizer_matrix[i], - mpeg2dec->new_quantizer_matrix[i+2], 64)) { - copy_matrix (mpeg2dec, i + 2); - decoder->chroma_quantizer[i] = decoder->quantizer_prescale[i+2]; - } else if (mpeg2dec->copy_matrix & (5 << i)) - decoder->chroma_quantizer[i] = decoder->quantizer_prescale[i]; - } -} - -static mpeg2_state_t invalid_end_action (mpeg2dec_t * mpeg2dec) -{ - mpeg2_reset_info (&(mpeg2dec->info)); - mpeg2dec->info.gop = NULL; - info_user_data (mpeg2dec); - mpeg2_header_state_init (mpeg2dec); - mpeg2dec->sequence = mpeg2dec->new_sequence; - mpeg2dec->action = mpeg2_seek_header; - mpeg2dec->state = STATE_SEQUENCE; - return STATE_SEQUENCE; -} - -void mpeg2_header_sequence_finalize (mpeg2dec_t * mpeg2dec) -{ - mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence); - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - - finalize_sequence (sequence); - finalize_matrix (mpeg2dec); - - decoder->mpeg1 = !(sequence->flags & SEQ_FLAG_MPEG2); - decoder->width = sequence->width; - decoder->height = sequence->height; - decoder->vertical_position_extension = (sequence->picture_height > 2800); - decoder->chroma_format = ((sequence->chroma_width == sequence->width) + - (sequence->chroma_height == sequence->height)); - - if (mpeg2dec->sequence.width != (unsigned)-1) { - unsigned int new_byte_rate; - - /* - * According to 6.1.1.6, repeat sequence headers should be - * identical to the original. However some DVDs dont respect - * that and have different bitrates in the repeat sequence - * headers. So we'll ignore that in the comparison and still - * consider these as repeat sequence headers. - * - * However, be careful not to alter the current sequence when - * returning STATE_INVALID_END. - */ - new_byte_rate = sequence->byte_rate; - sequence->byte_rate = mpeg2dec->sequence.byte_rate; - if (memcmp (&(mpeg2dec->sequence), sequence, - sizeof (mpeg2_sequence_t))) { - decoder->stride_frame = sequence->width; - sequence->byte_rate = new_byte_rate; - mpeg2_header_end (mpeg2dec); - mpeg2dec->action = invalid_end_action; - mpeg2dec->state = STATE_INVALID_END; - return; - } - sequence->byte_rate = new_byte_rate; - mpeg2dec->state = STATE_SEQUENCE_REPEATED; - } else - decoder->stride_frame = sequence->width; - mpeg2dec->sequence = *sequence; - mpeg2_reset_info (&(mpeg2dec->info)); - mpeg2dec->info.sequence = &(mpeg2dec->sequence); - mpeg2dec->info.gop = NULL; - info_user_data (mpeg2dec); -} - -int mpeg2_header_gop (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_gop_t * gop = &(mpeg2dec->new_gop); - - if (! (buffer[1] & 8)) - return 1; - gop->hours = (buffer[0] >> 2) & 31; - gop->minutes = ((buffer[0] << 4) | (buffer[1] >> 4)) & 63; - gop->seconds = ((buffer[1] << 3) | (buffer[2] >> 5)) & 63; - gop->pictures = ((buffer[2] << 1) | (buffer[3] >> 7)) & 63; - gop->flags = (buffer[0] >> 7) | ((buffer[3] >> 4) & 6); - mpeg2dec->state = STATE_GOP; - return 0; -} - -void mpeg2_header_gop_finalize (mpeg2dec_t * mpeg2dec) -{ - mpeg2dec->gop = mpeg2dec->new_gop; - mpeg2_reset_info (&(mpeg2dec->info)); - mpeg2dec->info.gop = &(mpeg2dec->gop); - info_user_data (mpeg2dec); -} - -void mpeg2_set_fbuf (mpeg2dec_t * mpeg2dec, int b_type) -{ - int i; - - for (i = 0; i < 3; i++) - if (mpeg2dec->fbuf[1] != &mpeg2dec->fbuf_alloc[i].fbuf && - mpeg2dec->fbuf[2] != &mpeg2dec->fbuf_alloc[i].fbuf) { - mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[i].fbuf; - mpeg2dec->info.current_fbuf = mpeg2dec->fbuf[0]; - if (b_type || (mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) { - if (b_type || mpeg2dec->convert) - mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[0]; - mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[0]; - } - break; - } -} - -mpeg2_state_t mpeg2_header_picture_start (mpeg2dec_t * mpeg2dec) -{ - mpeg2_picture_t * picture = &(mpeg2dec->new_picture); - - mpeg2dec->state = ((mpeg2dec->state != STATE_SLICE_1ST) ? - STATE_PICTURE : STATE_PICTURE_2ND); - picture->flags = 0; - picture->tag = picture->tag2 = 0; - if (mpeg2dec->num_tags) { - if (mpeg2dec->bytes_since_tag >= 4) { - mpeg2dec->num_tags = 0; - picture->tag = mpeg2dec->tag_current; - picture->tag2 = mpeg2dec->tag2_current; - picture->flags = PIC_FLAG_TAGS; - } else if (mpeg2dec->num_tags > 1) { - mpeg2dec->num_tags = 1; - picture->tag = mpeg2dec->tag_previous; - picture->tag2 = mpeg2dec->tag2_previous; - picture->flags = PIC_FLAG_TAGS; - } - } - picture->display_offset[0].x = picture->display_offset[1].x = - picture->display_offset[2].x = mpeg2dec->display_offset_x; - picture->display_offset[0].y = picture->display_offset[1].y = - picture->display_offset[2].y = mpeg2dec->display_offset_y; - return mpeg2_parse_header (mpeg2dec); -} - -int mpeg2_header_picture (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_picture_t * picture = &(mpeg2dec->new_picture); - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - int type; - - type = (buffer [1] >> 3) & 7; - mpeg2dec->ext_state = PIC_CODING_EXT; - - picture->temporal_reference = (buffer[0] << 2) | (buffer[1] >> 6); - - picture->flags |= type; - - if (type == PIC_FLAG_CODING_TYPE_P || type == PIC_FLAG_CODING_TYPE_B) { - /* forward_f_code and backward_f_code - used in mpeg1 only */ - decoder->f_motion.f_code[1] = (buffer[3] >> 2) & 1; - decoder->f_motion.f_code[0] = - (((buffer[3] << 1) | (buffer[4] >> 7)) & 7) - 1; - decoder->b_motion.f_code[1] = (buffer[4] >> 6) & 1; - decoder->b_motion.f_code[0] = ((buffer[4] >> 3) & 7) - 1; - } - - /* XXXXXX decode extra_information_picture as well */ - - picture->nb_fields = 2; - - mpeg2dec->q_scale_type = 0; - decoder->intra_dc_precision = 7; - decoder->frame_pred_frame_dct = 1; - decoder->concealment_motion_vectors = 0; - decoder->scan = mpeg2_scan_norm; - decoder->picture_structure = FRAME_PICTURE; - mpeg2dec->copy_matrix = 0; - - return 0; -} - -static int picture_coding_ext (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_picture_t * picture = &(mpeg2dec->new_picture); - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - uint32_t flags; - - /* pre subtract 1 for use later in compute_motion_vector */ - decoder->f_motion.f_code[0] = (buffer[0] & 15) - 1; - decoder->f_motion.f_code[1] = (buffer[1] >> 4) - 1; - decoder->b_motion.f_code[0] = (buffer[1] & 15) - 1; - decoder->b_motion.f_code[1] = (buffer[2] >> 4) - 1; - - flags = picture->flags; - decoder->intra_dc_precision = 7 - ((buffer[2] >> 2) & 3); - decoder->picture_structure = buffer[2] & 3; - switch (decoder->picture_structure) { - case TOP_FIELD: - flags |= PIC_FLAG_TOP_FIELD_FIRST; - case BOTTOM_FIELD: - picture->nb_fields = 1; - break; - case FRAME_PICTURE: - if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) { - picture->nb_fields = (buffer[3] & 2) ? 3 : 2; - flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0; - } else - picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2; - break; - default: - return 1; - } - decoder->top_field_first = buffer[3] >> 7; - decoder->frame_pred_frame_dct = (buffer[3] >> 6) & 1; - decoder->concealment_motion_vectors = (buffer[3] >> 5) & 1; - mpeg2dec->q_scale_type = buffer[3] & 16; - decoder->intra_vlc_format = (buffer[3] >> 3) & 1; - decoder->scan = (buffer[3] & 4) ? mpeg2_scan_alt : mpeg2_scan_norm; - flags |= (buffer[4] & 0x80) ? PIC_FLAG_PROGRESSIVE_FRAME : 0; - if (buffer[4] & 0x40) - flags |= (((buffer[4]<<26) | (buffer[5]<<18) | (buffer[6]<<10)) & - PIC_MASK_COMPOSITE_DISPLAY) | PIC_FLAG_COMPOSITE_DISPLAY; - picture->flags = flags; - - mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | QUANT_MATRIX_EXT; - - return 0; -} - -static int picture_display_ext (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - mpeg2_picture_t * picture = &(mpeg2dec->new_picture); - int i, nb_pos; - - nb_pos = picture->nb_fields; - if (mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE) - nb_pos >>= 1; - - for (i = 0; i < nb_pos; i++) { - int x, y; - - x = ((buffer[4*i] << 24) | (buffer[4*i+1] << 16) | - (buffer[4*i+2] << 8) | buffer[4*i+3]) >> (11-2*i); - y = ((buffer[4*i+2] << 24) | (buffer[4*i+3] << 16) | - (buffer[4*i+4] << 8) | buffer[4*i+5]) >> (10-2*i); - if (! (x & y & 1)) - return 1; - picture->display_offset[i].x = mpeg2dec->display_offset_x = x >> 1; - picture->display_offset[i].y = mpeg2dec->display_offset_y = y >> 1; - } - for (; i < 3; i++) { - picture->display_offset[i].x = mpeg2dec->display_offset_x; - picture->display_offset[i].y = mpeg2dec->display_offset_y; - } - return 0; -} - -void mpeg2_header_picture_finalize (mpeg2dec_t * mpeg2dec, uint32_t accels) -{ - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - int old_type_b = (decoder->coding_type == B_TYPE); - int low_delay = mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY; - - finalize_matrix (mpeg2dec); - decoder->coding_type = mpeg2dec->new_picture.flags & PIC_MASK_CODING_TYPE; - - if (mpeg2dec->state == STATE_PICTURE) { - mpeg2_picture_t * picture; - mpeg2_picture_t * other; - - decoder->second_field = 0; - - picture = other = mpeg2dec->pictures; - if (old_type_b ^ (mpeg2dec->picture < mpeg2dec->pictures + 2)) - picture += 2; - else - other += 2; - mpeg2dec->picture = picture; - *picture = mpeg2dec->new_picture; - - if (!old_type_b) { - mpeg2dec->fbuf[2] = mpeg2dec->fbuf[1]; - mpeg2dec->fbuf[1] = mpeg2dec->fbuf[0]; - } - mpeg2dec->fbuf[0] = NULL; - mpeg2_reset_info (&(mpeg2dec->info)); - mpeg2dec->info.current_picture = picture; - mpeg2dec->info.display_picture = picture; - if (decoder->coding_type != B_TYPE) { - if (!low_delay) { - if (mpeg2dec->first) { - mpeg2dec->info.display_picture = NULL; - mpeg2dec->first = 0; - } else { - mpeg2dec->info.display_picture = other; - if (other->nb_fields == 1) - mpeg2dec->info.display_picture_2nd = other + 1; - mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[1]; - } - } - if (!low_delay + !mpeg2dec->convert) - mpeg2dec->info.discard_fbuf = - mpeg2dec->fbuf[!low_delay + !mpeg2dec->convert]; - } - if (mpeg2dec->convert) { - mpeg2_convert_init_t convert_init; - if (!mpeg2dec->convert_start) { - int y_size, uv_size; - - mpeg2dec->decoder.convert_id = - mpeg2_malloc (mpeg2dec->convert_id_size, - MPEG2_ALLOC_CONVERT_ID); - mpeg2dec->convert (MPEG2_CONVERT_START, - mpeg2dec->decoder.convert_id, - &(mpeg2dec->sequence), - mpeg2dec->convert_stride, accels, - mpeg2dec->convert_arg, &convert_init); - mpeg2dec->convert_start = convert_init.start; - mpeg2dec->decoder.convert = convert_init.copy; - - y_size = decoder->stride_frame * mpeg2dec->sequence.height; - uv_size = y_size >> (2 - mpeg2dec->decoder.chroma_format); - mpeg2dec->yuv_buf[0][0] = - (uint8_t *) mpeg2_malloc (y_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[0][1] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[0][2] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[1][0] = - (uint8_t *) mpeg2_malloc (y_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[1][1] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[1][2] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - y_size = decoder->stride_frame * 32; - uv_size = y_size >> (2 - mpeg2dec->decoder.chroma_format); - mpeg2dec->yuv_buf[2][0] = - (uint8_t *) mpeg2_malloc (y_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[2][1] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - mpeg2dec->yuv_buf[2][2] = - (uint8_t *) mpeg2_malloc (uv_size, MPEG2_ALLOC_YUV); - } - if (!mpeg2dec->custom_fbuf) { - while (mpeg2dec->alloc_index < 3) { - mpeg2_fbuf_t * fbuf; - - fbuf = &mpeg2dec->fbuf_alloc[mpeg2dec->alloc_index++].fbuf; - fbuf->id = NULL; - fbuf->buf[0] = - (uint8_t *) mpeg2_malloc (convert_init.buf_size[0], - MPEG2_ALLOC_CONVERTED); - fbuf->buf[1] = - (uint8_t *) mpeg2_malloc (convert_init.buf_size[1], - MPEG2_ALLOC_CONVERTED); - fbuf->buf[2] = - (uint8_t *) mpeg2_malloc (convert_init.buf_size[2], - MPEG2_ALLOC_CONVERTED); - } - mpeg2_set_fbuf (mpeg2dec, (decoder->coding_type == B_TYPE)); - } - } else if (!mpeg2dec->custom_fbuf) { - while (mpeg2dec->alloc_index < 3) { - mpeg2_fbuf_t * fbuf; - int y_size, uv_size; - - fbuf = &(mpeg2dec->fbuf_alloc[mpeg2dec->alloc_index++].fbuf); - fbuf->id = NULL; - y_size = decoder->stride_frame * mpeg2dec->sequence.height; - uv_size = y_size >> (2 - decoder->chroma_format); - fbuf->buf[0] = (uint8_t *) mpeg2_malloc (y_size, - MPEG2_ALLOC_YUV); - fbuf->buf[1] = (uint8_t *) mpeg2_malloc (uv_size, - MPEG2_ALLOC_YUV); - fbuf->buf[2] = (uint8_t *) mpeg2_malloc (uv_size, - MPEG2_ALLOC_YUV); - } - mpeg2_set_fbuf (mpeg2dec, (decoder->coding_type == B_TYPE)); - } - } else { - decoder->second_field = 1; - mpeg2dec->picture++; /* second field picture */ - *(mpeg2dec->picture) = mpeg2dec->new_picture; - mpeg2dec->info.current_picture_2nd = mpeg2dec->picture; - if (low_delay || decoder->coding_type == B_TYPE) - mpeg2dec->info.display_picture_2nd = mpeg2dec->picture; - } - - info_user_data (mpeg2dec); -} - -static int copyright_ext (mpeg2dec_t * mpeg2dec) -{ - return 0; -} - -static int quant_matrix_ext (mpeg2dec_t * mpeg2dec) -{ - uint8_t * buffer = mpeg2dec->chunk_start; - int i, j; - - for (i = 0; i < 4; i++) - if (buffer[0] & (8 >> i)) { - for (j = 0; j < 64; j++) - mpeg2dec->new_quantizer_matrix[i][mpeg2_scan_norm[j]] = - (buffer[j] << (i+5)) | (buffer[j+1] >> (3-i)); - mpeg2dec->copy_matrix |= 1 << i; - buffer += 64; - } - - return 0; -} - -int mpeg2_header_extension (mpeg2dec_t * mpeg2dec) -{ - static int (* parser[]) (mpeg2dec_t *) = { - 0, sequence_ext, sequence_display_ext, quant_matrix_ext, - copyright_ext, 0, 0, picture_display_ext, picture_coding_ext - }; - int ext, ext_bit; - - ext = mpeg2dec->chunk_start[0] >> 4; - ext_bit = 1 << ext; - - if (!(mpeg2dec->ext_state & ext_bit)) - return 0; /* ignore illegal extensions */ - mpeg2dec->ext_state &= ~ext_bit; - return parser[ext] (mpeg2dec); -} - -int mpeg2_header_user_data (mpeg2dec_t * mpeg2dec) -{ - mpeg2dec->user_data_len += mpeg2dec->chunk_ptr - 1 - mpeg2dec->chunk_start; - mpeg2dec->chunk_start = mpeg2dec->chunk_ptr - 1; - - return 0; -} - -static void prescale (mpeg2dec_t * mpeg2dec, int index) -{ - static int non_linear_scale [] = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 10, 12, 14, 16, 18, 20, 22, - 24, 28, 32, 36, 40, 44, 48, 52, - 56, 64, 72, 80, 88, 96, 104, 112 - }; - int i, j, k; - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - - if (mpeg2dec->scaled[index] != mpeg2dec->q_scale_type) { - mpeg2dec->scaled[index] = mpeg2dec->q_scale_type; - for (i = 0; i < 32; i++) { - k = mpeg2dec->q_scale_type ? non_linear_scale[i] : (i << 1); - for (j = 0; j < 64; j++) - decoder->quantizer_prescale[index][i][j] = - k * mpeg2dec->quantizer_matrix[index][j]; - } - } -} - -mpeg2_state_t mpeg2_header_slice_start (mpeg2dec_t * mpeg2dec) -{ - mpeg2_decoder_t * decoder = &(mpeg2dec->decoder); - - mpeg2dec->info.user_data = NULL; mpeg2dec->info.user_data_len = 0; - mpeg2dec->state = ((mpeg2dec->picture->nb_fields > 1 || - mpeg2dec->state == STATE_PICTURE_2ND) ? - STATE_SLICE : STATE_SLICE_1ST); - - if (mpeg2dec->decoder.coding_type != D_TYPE) { - prescale (mpeg2dec, 0); - if (decoder->chroma_quantizer[0] == decoder->quantizer_prescale[2]) - prescale (mpeg2dec, 2); - if (mpeg2dec->decoder.coding_type != I_TYPE) { - prescale (mpeg2dec, 1); - if (decoder->chroma_quantizer[1] == decoder->quantizer_prescale[3]) - prescale (mpeg2dec, 3); - } - } - - if (!(mpeg2dec->nb_decode_slices)) - mpeg2dec->picture->flags |= PIC_FLAG_SKIP; - else if (mpeg2dec->convert_start) { - mpeg2dec->convert_start (decoder->convert_id, mpeg2dec->fbuf[0], - mpeg2dec->picture, mpeg2dec->info.gop); - - if (mpeg2dec->decoder.coding_type == B_TYPE) - mpeg2_init_fbuf (&(mpeg2dec->decoder), mpeg2dec->yuv_buf[2], - mpeg2dec->yuv_buf[mpeg2dec->yuv_index ^ 1], - mpeg2dec->yuv_buf[mpeg2dec->yuv_index]); - else { - mpeg2_init_fbuf (&(mpeg2dec->decoder), - mpeg2dec->yuv_buf[mpeg2dec->yuv_index ^ 1], - mpeg2dec->yuv_buf[mpeg2dec->yuv_index], - mpeg2dec->yuv_buf[mpeg2dec->yuv_index]); - if (mpeg2dec->state == STATE_SLICE) - mpeg2dec->yuv_index ^= 1; - } - } else { - int b_type; - - b_type = (mpeg2dec->decoder.coding_type == B_TYPE); - mpeg2_init_fbuf (&(mpeg2dec->decoder), mpeg2dec->fbuf[0]->buf, - mpeg2dec->fbuf[b_type + 1]->buf, - mpeg2dec->fbuf[b_type]->buf); - } - mpeg2dec->action = NULL; - return (mpeg2_state_t)-1; -} - -static mpeg2_state_t seek_sequence (mpeg2dec_t * mpeg2dec) -{ - mpeg2_reset_info (&(mpeg2dec->info)); - mpeg2dec->info.sequence = NULL; - mpeg2dec->info.gop = NULL; - mpeg2_header_state_init (mpeg2dec); - mpeg2dec->action = mpeg2_seek_header; - return mpeg2_seek_header (mpeg2dec); -} - -mpeg2_state_t mpeg2_header_end (mpeg2dec_t * mpeg2dec) -{ - mpeg2_picture_t * picture; - int b_type; - - b_type = (mpeg2dec->decoder.coding_type == B_TYPE); - picture = mpeg2dec->pictures; - if ((mpeg2dec->picture >= picture + 2) ^ b_type) - picture = mpeg2dec->pictures + 2; - - mpeg2_reset_info (&(mpeg2dec->info)); - if (!(mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) { - mpeg2dec->info.display_picture = picture; - if (picture->nb_fields == 1) - mpeg2dec->info.display_picture_2nd = picture + 1; - mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[b_type]; - if (!mpeg2dec->convert) - mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[b_type + 1]; - } else if (!mpeg2dec->convert) - mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[b_type]; - mpeg2dec->action = seek_sequence; - return STATE_END; -} diff -Nru k9copy-2.1.0/src/mpeg2/idct_alpha.cpp k9copy-2.2.0/src/mpeg2/idct_alpha.cpp --- k9copy-2.1.0/src/mpeg2/idct_alpha.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/idct_alpha.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,378 +0,0 @@ -/* - * idct_alpha.c - * Copyright (C) 2002-2003 Falk Hueffner - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#ifdef ARCH_ALPHA - -#include - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#include "alpha_asm.h" - -#define W1 2841 /* 2048 * sqrt (2) * cos (1 * pi / 16) */ -#define W2 2676 /* 2048 * sqrt (2) * cos (2 * pi / 16) */ -#define W3 2408 /* 2048 * sqrt (2) * cos (3 * pi / 16) */ -#define W5 1609 /* 2048 * sqrt (2) * cos (5 * pi / 16) */ -#define W6 1108 /* 2048 * sqrt (2) * cos (6 * pi / 16) */ -#define W7 565 /* 2048 * sqrt (2) * cos (7 * pi / 16) */ - -extern uint8_t mpeg2_clip[3840 * 2 + 256]; -#define CLIP(i) ((mpeg2_clip + 3840)[i]) - -#if 0 -#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ -do { \ - t0 = W0 * d0 + W1 * d1; \ - t1 = W0 * d1 - W1 * d0; \ -} while (0) -#else -#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ -do { \ - int_fast32_t tmp = W0 * (d0 + d1); \ - t0 = tmp + (W1 - W0) * d1; \ - t1 = tmp - (W1 + W0) * d0; \ -} while (0) -#endif - -static void inline idct_row (int16_t * const block) -{ - uint64_t l, r; - int_fast32_t d0, d1, d2, d3; - int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; - int_fast32_t t0, t1, t2, t3; - - l = ldq (block); - r = ldq (block + 4); - - /* shortcut */ - if (likely (!((l & ~0xffffUL) | r))) { - uint64_t tmp = (uint16_t) (l >> 1); - tmp |= tmp << 16; - tmp |= tmp << 32; - ((int32_t *)block)[0] = tmp; - ((int32_t *)block)[1] = tmp; - ((int32_t *)block)[2] = tmp; - ((int32_t *)block)[3] = tmp; - return; - } - - d0 = (sextw (l) << 11) + 2048; - d1 = sextw (extwl (l, 2)); - d2 = sextw (extwl (l, 4)) << 11; - d3 = sextw (extwl (l, 6)); - t0 = d0 + d2; - t1 = d0 - d2; - BUTTERFLY (t2, t3, W6, W2, d3, d1); - a0 = t0 + t2; - a1 = t1 + t3; - a2 = t1 - t3; - a3 = t0 - t2; - - d0 = sextw (r); - d1 = sextw (extwl (r, 2)); - d2 = sextw (extwl (r, 4)); - d3 = sextw (extwl (r, 6)); - BUTTERFLY (t0, t1, W7, W1, d3, d0); - BUTTERFLY (t2, t3, W3, W5, d1, d2); - b0 = t0 + t2; - b3 = t1 + t3; - t0 -= t2; - t1 -= t3; - b1 = ((t0 + t1) >> 8) * 181; - b2 = ((t0 - t1) >> 8) * 181; - - block[0] = (a0 + b0) >> 12; - block[1] = (a1 + b1) >> 12; - block[2] = (a2 + b2) >> 12; - block[3] = (a3 + b3) >> 12; - block[4] = (a3 - b3) >> 12; - block[5] = (a2 - b2) >> 12; - block[6] = (a1 - b1) >> 12; - block[7] = (a0 - b0) >> 12; -} - -static void inline idct_col (int16_t * const block) -{ - int_fast32_t d0, d1, d2, d3; - int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; - int_fast32_t t0, t1, t2, t3; - - d0 = (block[8*0] << 11) + 65536; - d1 = block[8*1]; - d2 = block[8*2] << 11; - d3 = block[8*3]; - t0 = d0 + d2; - t1 = d0 - d2; - BUTTERFLY (t2, t3, W6, W2, d3, d1); - a0 = t0 + t2; - a1 = t1 + t3; - a2 = t1 - t3; - a3 = t0 - t2; - - d0 = block[8*4]; - d1 = block[8*5]; - d2 = block[8*6]; - d3 = block[8*7]; - BUTTERFLY (t0, t1, W7, W1, d3, d0); - BUTTERFLY (t2, t3, W3, W5, d1, d2); - b0 = t0 + t2; - b3 = t1 + t3; - t0 -= t2; - t1 -= t3; - b1 = ((t0 + t1) >> 8) * 181; - b2 = ((t0 - t1) >> 8) * 181; - - block[8*0] = (a0 + b0) >> 17; - block[8*1] = (a1 + b1) >> 17; - block[8*2] = (a2 + b2) >> 17; - block[8*3] = (a3 + b3) >> 17; - block[8*4] = (a3 - b3) >> 17; - block[8*5] = (a2 - b2) >> 17; - block[8*6] = (a1 - b1) >> 17; - block[8*7] = (a0 - b0) >> 17; -} - -void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride) -{ - uint64_t clampmask; - int i; - - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - - for (i = 0; i < 8; i++) - idct_col (block + i); - - clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */ - do { - uint64_t shorts0, shorts1; - - shorts0 = ldq (block); - shorts0 = maxsw4 (shorts0, 0); - shorts0 = minsw4 (shorts0, clampmask); - stl (pkwb (shorts0), dest); - - shorts1 = ldq (block + 4); - shorts1 = maxsw4 (shorts1, 0); - shorts1 = minsw4 (shorts1, clampmask); - stl (pkwb (shorts1), dest + 4); - - stq (0, block); - stq (0, block + 4); - - dest += stride; - block += 8; - } while (--i); -} - -void mpeg2_idct_add_mvi (const int last, int16_t * block, - uint8_t * dest, const int stride) -{ - uint64_t clampmask; - uint64_t signmask; - int i; - - if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) { - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - for (i = 0; i < 8; i++) - idct_col (block + i); - clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */ - signmask = zap (-1, 0x33); - signmask ^= signmask >> 1; /* 0x8000800080008000 */ - - do { - uint64_t shorts0, pix0, signs0; - uint64_t shorts1, pix1, signs1; - - shorts0 = ldq (block); - shorts1 = ldq (block + 4); - - pix0 = unpkbw (ldl (dest)); - /* signed subword add (MMX paddw). */ - signs0 = shorts0 & signmask; - shorts0 &= ~signmask; - shorts0 += pix0; - shorts0 ^= signs0; - /* clamp. */ - shorts0 = maxsw4 (shorts0, 0); - shorts0 = minsw4 (shorts0, clampmask); - - /* next 4. */ - pix1 = unpkbw (ldl (dest + 4)); - signs1 = shorts1 & signmask; - shorts1 &= ~signmask; - shorts1 += pix1; - shorts1 ^= signs1; - shorts1 = maxsw4 (shorts1, 0); - shorts1 = minsw4 (shorts1, clampmask); - - stl (pkwb (shorts0), dest); - stl (pkwb (shorts1), dest + 4); - stq (0, block); - stq (0, block + 4); - - dest += stride; - block += 8; - } while (--i); - } else { - int DC; - uint64_t p0, p1, p2, p3, p4, p5, p6, p7; - uint64_t DCs; - - DC = (block[0] + 64) >> 7; - block[0] = block[63] = 0; - - p0 = ldq (dest + 0 * stride); - p1 = ldq (dest + 1 * stride); - p2 = ldq (dest + 2 * stride); - p3 = ldq (dest + 3 * stride); - p4 = ldq (dest + 4 * stride); - p5 = ldq (dest + 5 * stride); - p6 = ldq (dest + 6 * stride); - p7 = ldq (dest + 7 * stride); - - if (DC > 0) { - DCs = BYTE_VEC (likely (DC <= 255) ? DC : 255); - p0 += minub8 (DCs, ~p0); - p1 += minub8 (DCs, ~p1); - p2 += minub8 (DCs, ~p2); - p3 += minub8 (DCs, ~p3); - p4 += minub8 (DCs, ~p4); - p5 += minub8 (DCs, ~p5); - p6 += minub8 (DCs, ~p6); - p7 += minub8 (DCs, ~p7); - } else { - DCs = BYTE_VEC (likely (-DC <= 255) ? -DC : 255); - p0 -= minub8 (DCs, p0); - p1 -= minub8 (DCs, p1); - p2 -= minub8 (DCs, p2); - p3 -= minub8 (DCs, p3); - p4 -= minub8 (DCs, p4); - p5 -= minub8 (DCs, p5); - p6 -= minub8 (DCs, p6); - p7 -= minub8 (DCs, p7); - } - - stq (p0, dest + 0 * stride); - stq (p1, dest + 1 * stride); - stq (p2, dest + 2 * stride); - stq (p3, dest + 3 * stride); - stq (p4, dest + 4 * stride); - stq (p5, dest + 5 * stride); - stq (p6, dest + 6 * stride); - stq (p7, dest + 7 * stride); - } -} - -void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, const int stride) -{ - int i; - - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - for (i = 0; i < 8; i++) - idct_col (block + i); - do { - dest[0] = CLIP (block[0]); - dest[1] = CLIP (block[1]); - dest[2] = CLIP (block[2]); - dest[3] = CLIP (block[3]); - dest[4] = CLIP (block[4]); - dest[5] = CLIP (block[5]); - dest[6] = CLIP (block[6]); - dest[7] = CLIP (block[7]); - - stq(0, block); - stq(0, block + 4); - - dest += stride; - block += 8; - } while (--i); -} - -void mpeg2_idct_add_alpha (const int last, int16_t * block, - uint8_t * dest, const int stride) -{ - int i; - - if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) { - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - for (i = 0; i < 8; i++) - idct_col (block + i); - do { - dest[0] = CLIP (block[0] + dest[0]); - dest[1] = CLIP (block[1] + dest[1]); - dest[2] = CLIP (block[2] + dest[2]); - dest[3] = CLIP (block[3] + dest[3]); - dest[4] = CLIP (block[4] + dest[4]); - dest[5] = CLIP (block[5] + dest[5]); - dest[6] = CLIP (block[6] + dest[6]); - dest[7] = CLIP (block[7] + dest[7]); - - stq(0, block); - stq(0, block + 4); - - dest += stride; - block += 8; - } while (--i); - } else { - int DC; - - DC = (block[0] + 64) >> 7; - block[0] = block[63] = 0; - i = 8; - do { - dest[0] = CLIP (DC + dest[0]); - dest[1] = CLIP (DC + dest[1]); - dest[2] = CLIP (DC + dest[2]); - dest[3] = CLIP (DC + dest[3]); - dest[4] = CLIP (DC + dest[4]); - dest[5] = CLIP (DC + dest[5]); - dest[6] = CLIP (DC + dest[6]); - dest[7] = CLIP (DC + dest[7]); - dest += stride; - } while (--i); - } -} - -void mpeg2_idct_alpha_init (void) -{ - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; - int i, j; - - for (i = 0; i < 64; i++) { - j = mpeg2_scan_norm[i]; - mpeg2_scan_norm[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2); - j = mpeg2_scan_alt[i]; - mpeg2_scan_alt[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2); - } -} - -#endif /* ARCH_ALPHA */ diff -Nru k9copy-2.1.0/src/mpeg2/idct_altivec.cpp k9copy-2.2.0/src/mpeg2/idct_altivec.cpp --- k9copy-2.1.0/src/mpeg2/idct_altivec.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/idct_altivec.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,287 +0,0 @@ -/* - * idct_altivec.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#ifdef ARCH_PPC - -#ifdef HAVE_ALTIVEC_H -#include -#endif - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -typedef vector signed char vector_s8_t; -typedef vector unsigned char vector_u8_t; -typedef vector signed short vector_s16_t; -typedef vector unsigned short vector_u16_t; -typedef vector signed int vector_s32_t; -typedef vector unsigned int vector_u32_t; - -#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303) -/* work around gcc <3.3 vec_mergel bug */ -static inline vector_s16_t my_vec_mergel (vector_s16_t const A, - vector_s16_t const B) -{ - static const vector_u8_t mergel = { - 0x08, 0x09, 0x18, 0x19, 0x0a, 0x0b, 0x1a, 0x1b, - 0x0c, 0x0d, 0x1c, 0x1d, 0x0e, 0x0f, 0x1e, 0x1f - }; - return vec_perm (A, B, mergel); -} -#undef vec_mergel -#define vec_mergel my_vec_mergel -#endif - -#ifdef HAVE_ALTIVEC_H /* gnu */ -#define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h} -#else /* apple */ -#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h) -#endif - -static const vector_s16_t constants ATTR_ALIGN(16) = - VEC_S16 (23170, 13573, 6518, 21895, -23170, -21895, 32, 31); -static const vector_s16_t constants_1 ATTR_ALIGN(16) = - VEC_S16 (16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725); -static const vector_s16_t constants_2 ATTR_ALIGN(16) = - VEC_S16 (16069, 22289, 20995, 18895, 16069, 18895, 20995, 22289); -static const vector_s16_t constants_3 ATTR_ALIGN(16) = - VEC_S16 (21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692); -static const vector_s16_t constants_4 ATTR_ALIGN(16) = - VEC_S16 (13623, 18895, 17799, 16019, 13623, 16019, 17799, 18895); - -#define IDCT \ - vector_s16_t vx0, vx1, vx2, vx3, vx4, vx5, vx6, vx7; \ - vector_s16_t vy0, vy1, vy2, vy3, vy4, vy5, vy6, vy7; \ - vector_s16_t a0, a1, a2, ma2, c4, mc4, zero, bias; \ - vector_s16_t t0, t1, t2, t3, t4, t5, t6, t7, t8; \ - vector_u16_t shift; \ - \ - c4 = vec_splat (constants, 0); \ - a0 = vec_splat (constants, 1); \ - a1 = vec_splat (constants, 2); \ - a2 = vec_splat (constants, 3); \ - mc4 = vec_splat (constants, 4); \ - ma2 = vec_splat (constants, 5); \ - bias = (vector_s16_t)vec_splat ((vector_s32_t)constants, 3); \ - \ - zero = vec_splat_s16 (0); \ - \ - vx0 = vec_adds (block[0], block[4]); \ - vx4 = vec_subs (block[0], block[4]); \ - t5 = vec_mradds (vx0, constants_1, zero); \ - t0 = vec_mradds (vx4, constants_1, zero); \ - \ - vx1 = vec_mradds (a1, block[7], block[1]); \ - vx7 = vec_mradds (a1, block[1], vec_subs (zero, block[7])); \ - t1 = vec_mradds (vx1, constants_2, zero); \ - t8 = vec_mradds (vx7, constants_2, zero); \ - \ - vx2 = vec_mradds (a0, block[6], block[2]); \ - vx6 = vec_mradds (a0, block[2], vec_subs (zero, block[6])); \ - t2 = vec_mradds (vx2, constants_3, zero); \ - t4 = vec_mradds (vx6, constants_3, zero); \ - \ - vx3 = vec_mradds (block[3], constants_4, zero); \ - vx5 = vec_mradds (block[5], constants_4, zero); \ - t7 = vec_mradds (a2, vx5, vx3); \ - t3 = vec_mradds (ma2, vx3, vx5); \ - \ - t6 = vec_adds (t8, t3); \ - t3 = vec_subs (t8, t3); \ - t8 = vec_subs (t1, t7); \ - t1 = vec_adds (t1, t7); \ - t6 = vec_mradds (a0, t6, t6); /* a0+1 == 2*c4 */ \ - t1 = vec_mradds (a0, t1, t1); /* a0+1 == 2*c4 */ \ - \ - t7 = vec_adds (t5, t2); \ - t2 = vec_subs (t5, t2); \ - t5 = vec_adds (t0, t4); \ - t0 = vec_subs (t0, t4); \ - t4 = vec_subs (t8, t3); \ - t3 = vec_adds (t8, t3); \ - \ - vy0 = vec_adds (t7, t1); \ - vy7 = vec_subs (t7, t1); \ - vy1 = vec_adds (t5, t3); \ - vy6 = vec_subs (t5, t3); \ - vy2 = vec_adds (t0, t4); \ - vy5 = vec_subs (t0, t4); \ - vy3 = vec_adds (t2, t6); \ - vy4 = vec_subs (t2, t6); \ - \ - vx0 = vec_mergeh (vy0, vy4); \ - vx1 = vec_mergel (vy0, vy4); \ - vx2 = vec_mergeh (vy1, vy5); \ - vx3 = vec_mergel (vy1, vy5); \ - vx4 = vec_mergeh (vy2, vy6); \ - vx5 = vec_mergel (vy2, vy6); \ - vx6 = vec_mergeh (vy3, vy7); \ - vx7 = vec_mergel (vy3, vy7); \ - \ - vy0 = vec_mergeh (vx0, vx4); \ - vy1 = vec_mergel (vx0, vx4); \ - vy2 = vec_mergeh (vx1, vx5); \ - vy3 = vec_mergel (vx1, vx5); \ - vy4 = vec_mergeh (vx2, vx6); \ - vy5 = vec_mergel (vx2, vx6); \ - vy6 = vec_mergeh (vx3, vx7); \ - vy7 = vec_mergel (vx3, vx7); \ - \ - vx0 = vec_mergeh (vy0, vy4); \ - vx1 = vec_mergel (vy0, vy4); \ - vx2 = vec_mergeh (vy1, vy5); \ - vx3 = vec_mergel (vy1, vy5); \ - vx4 = vec_mergeh (vy2, vy6); \ - vx5 = vec_mergel (vy2, vy6); \ - vx6 = vec_mergeh (vy3, vy7); \ - vx7 = vec_mergel (vy3, vy7); \ - \ - vx0 = vec_adds (vx0, bias); \ - t5 = vec_adds (vx0, vx4); \ - t0 = vec_subs (vx0, vx4); \ - \ - t1 = vec_mradds (a1, vx7, vx1); \ - t8 = vec_mradds (a1, vx1, vec_subs (zero, vx7)); \ - \ - t2 = vec_mradds (a0, vx6, vx2); \ - t4 = vec_mradds (a0, vx2, vec_subs (zero, vx6)); \ - \ - t7 = vec_mradds (a2, vx5, vx3); \ - t3 = vec_mradds (ma2, vx3, vx5); \ - \ - t6 = vec_adds (t8, t3); \ - t3 = vec_subs (t8, t3); \ - t8 = vec_subs (t1, t7); \ - t1 = vec_adds (t1, t7); \ - \ - t7 = vec_adds (t5, t2); \ - t2 = vec_subs (t5, t2); \ - t5 = vec_adds (t0, t4); \ - t0 = vec_subs (t0, t4); \ - t4 = vec_subs (t8, t3); \ - t3 = vec_adds (t8, t3); \ - \ - vy0 = vec_adds (t7, t1); \ - vy7 = vec_subs (t7, t1); \ - vy1 = vec_mradds (c4, t3, t5); \ - vy6 = vec_mradds (mc4, t3, t5); \ - vy2 = vec_mradds (c4, t4, t0); \ - vy5 = vec_mradds (mc4, t4, t0); \ - vy3 = vec_adds (t2, t6); \ - vy4 = vec_subs (t2, t6); \ - \ - shift = vec_splat_u16 (6); \ - vx0 = vec_sra (vy0, shift); \ - vx1 = vec_sra (vy1, shift); \ - vx2 = vec_sra (vy2, shift); \ - vx3 = vec_sra (vy3, shift); \ - vx4 = vec_sra (vy4, shift); \ - vx5 = vec_sra (vy5, shift); \ - vx6 = vec_sra (vy6, shift); \ - vx7 = vec_sra (vy7, shift); - -void mpeg2_idct_copy_altivec (int16_t * const _block, uint8_t * dest, - const int stride) -{ - vector_s16_t * const block = (vector_s16_t *)_block; - vector_u8_t tmp; - - IDCT - -#define COPY(dest,src) \ - tmp = vec_packsu (src, src); \ - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \ - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - - COPY (dest, vx0) dest += stride; - COPY (dest, vx1) dest += stride; - COPY (dest, vx2) dest += stride; - COPY (dest, vx3) dest += stride; - COPY (dest, vx4) dest += stride; - COPY (dest, vx5) dest += stride; - COPY (dest, vx6) dest += stride; - COPY (dest, vx7) - - block[0] = block[1] = block[2] = block[3] = zero; - block[4] = block[5] = block[6] = block[7] = zero; -} - -void mpeg2_idct_add_altivec (const int last, int16_t * const _block, - uint8_t * dest, const int stride) -{ - vector_s16_t * const block = (vector_s16_t *)_block; - vector_u8_t tmp; - vector_s16_t tmp2, tmp3; - vector_u8_t perm0; - vector_u8_t perm1; - vector_u8_t p0, p1, p; - - IDCT - - p0 = vec_lvsl (0, dest); - p1 = vec_lvsl (stride, dest); - p = vec_splat_u8 (-1); - perm0 = vec_mergeh (p, p0); - perm1 = vec_mergeh (p, p1); - -#define ADD(dest,src,perm) \ - /* *(uint64_t *)&tmp = *(uint64_t *)dest; */ \ - tmp = vec_ld (0, dest); \ - tmp2 = (vector_s16_t)vec_perm (tmp, (vector_u8_t)zero, perm); \ - tmp3 = vec_adds (tmp2, src); \ - tmp = vec_packsu (tmp3, tmp3); \ - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); \ - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - - ADD (dest, vx0, perm0) dest += stride; - ADD (dest, vx1, perm1) dest += stride; - ADD (dest, vx2, perm0) dest += stride; - ADD (dest, vx3, perm1) dest += stride; - ADD (dest, vx4, perm0) dest += stride; - ADD (dest, vx5, perm1) dest += stride; - ADD (dest, vx6, perm0) dest += stride; - ADD (dest, vx7, perm1) - - block[0] = block[1] = block[2] = block[3] = zero; - block[4] = block[5] = block[6] = block[7] = zero; -} - -void mpeg2_idct_altivec_init (void) -{ - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; - int i, j; - - /* the altivec idct uses a transposed input, so we patch scan tables */ - for (i = 0; i < 64; i++) { - j = mpeg2_scan_norm[i]; - mpeg2_scan_norm[i] = (j >> 3) | ((j & 7) << 3); - j = mpeg2_scan_alt[i]; - mpeg2_scan_alt[i] = (j >> 3) | ((j & 7) << 3); - } -} - -#endif diff -Nru k9copy-2.1.0/src/mpeg2/idct.cpp k9copy-2.2.0/src/mpeg2/idct.cpp --- k9copy-2.1.0/src/mpeg2/idct.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/idct.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,286 +0,0 @@ -/* - * idct.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#include - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -#define W1 2841 /* 2048 * sqrt (2) * cos (1 * pi / 16) */ -#define W2 2676 /* 2048 * sqrt (2) * cos (2 * pi / 16) */ -#define W3 2408 /* 2048 * sqrt (2) * cos (3 * pi / 16) */ -#define W5 1609 /* 2048 * sqrt (2) * cos (5 * pi / 16) */ -#define W6 1108 /* 2048 * sqrt (2) * cos (6 * pi / 16) */ -#define W7 565 /* 2048 * sqrt (2) * cos (7 * pi / 16) */ - -/* idct main entry point */ -void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride); -void (* mpeg2_idct_add) (int last, int16_t * block, - uint8_t * dest, int stride); - -/* - * In legal streams, the IDCT output should be between -384 and +384. - * In corrupted streams, it is possible to force the IDCT output to go - * to +-3826 - this is the worst case for a column IDCT where the - * column inputs are 16-bit values. - */ -uint8_t mpeg2_clip[3840 * 2 + 256]; -#define CLIP(i) ((mpeg2_clip + 3840)[i]) - -#if 0 -#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ -do { \ - t0 = W0 * d0 + W1 * d1; \ - t1 = W0 * d1 - W1 * d0; \ -} while (0) -#else -#define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ -do { \ - int tmp = W0 * (d0 + d1); \ - t0 = tmp + (W1 - W0) * d1; \ - t1 = tmp - (W1 + W0) * d0; \ -} while (0) -#endif - -static void inline idct_row (int16_t * const block) -{ - int d0, d1, d2, d3; - int a0, a1, a2, a3, b0, b1, b2, b3; - int t0, t1, t2, t3; - - /* shortcut */ - if (likely (!(block[1] | ((int32_t *)block)[1] | ((int32_t *)block)[2] | - ((int32_t *)block)[3]))) { - uint32_t tmp = (uint16_t) (block[0] >> 1); - tmp |= tmp << 16; - ((int32_t *)block)[0] = tmp; - ((int32_t *)block)[1] = tmp; - ((int32_t *)block)[2] = tmp; - ((int32_t *)block)[3] = tmp; - return; - } - - d0 = (block[0] << 11) + 2048; - d1 = block[1]; - d2 = block[2] << 11; - d3 = block[3]; - t0 = d0 + d2; - t1 = d0 - d2; - BUTTERFLY (t2, t3, W6, W2, d3, d1); - a0 = t0 + t2; - a1 = t1 + t3; - a2 = t1 - t3; - a3 = t0 - t2; - - d0 = block[4]; - d1 = block[5]; - d2 = block[6]; - d3 = block[7]; - BUTTERFLY (t0, t1, W7, W1, d3, d0); - BUTTERFLY (t2, t3, W3, W5, d1, d2); - b0 = t0 + t2; - b3 = t1 + t3; - t0 -= t2; - t1 -= t3; - b1 = ((t0 + t1) >> 8) * 181; - b2 = ((t0 - t1) >> 8) * 181; - - block[0] = (a0 + b0) >> 12; - block[1] = (a1 + b1) >> 12; - block[2] = (a2 + b2) >> 12; - block[3] = (a3 + b3) >> 12; - block[4] = (a3 - b3) >> 12; - block[5] = (a2 - b2) >> 12; - block[6] = (a1 - b1) >> 12; - block[7] = (a0 - b0) >> 12; -} - -static void inline idct_col (int16_t * const block) -{ - int d0, d1, d2, d3; - int a0, a1, a2, a3, b0, b1, b2, b3; - int t0, t1, t2, t3; - - d0 = (block[8*0] << 11) + 65536; - d1 = block[8*1]; - d2 = block[8*2] << 11; - d3 = block[8*3]; - t0 = d0 + d2; - t1 = d0 - d2; - BUTTERFLY (t2, t3, W6, W2, d3, d1); - a0 = t0 + t2; - a1 = t1 + t3; - a2 = t1 - t3; - a3 = t0 - t2; - - d0 = block[8*4]; - d1 = block[8*5]; - d2 = block[8*6]; - d3 = block[8*7]; - BUTTERFLY (t0, t1, W7, W1, d3, d0); - BUTTERFLY (t2, t3, W3, W5, d1, d2); - b0 = t0 + t2; - b3 = t1 + t3; - t0 -= t2; - t1 -= t3; - b1 = ((t0 + t1) >> 8) * 181; - b2 = ((t0 - t1) >> 8) * 181; - - block[8*0] = (a0 + b0) >> 17; - block[8*1] = (a1 + b1) >> 17; - block[8*2] = (a2 + b2) >> 17; - block[8*3] = (a3 + b3) >> 17; - block[8*4] = (a3 - b3) >> 17; - block[8*5] = (a2 - b2) >> 17; - block[8*6] = (a1 - b1) >> 17; - block[8*7] = (a0 - b0) >> 17; -} - -static void mpeg2_idct_copy_c (int16_t * block, uint8_t * dest, - const int stride) -{ - int i; - - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - for (i = 0; i < 8; i++) - idct_col (block + i); - do { - dest[0] = CLIP (block[0]); - dest[1] = CLIP (block[1]); - dest[2] = CLIP (block[2]); - dest[3] = CLIP (block[3]); - dest[4] = CLIP (block[4]); - dest[5] = CLIP (block[5]); - dest[6] = CLIP (block[6]); - dest[7] = CLIP (block[7]); - - ((int32_t *)block)[0] = 0; ((int32_t *)block)[1] = 0; - ((int32_t *)block)[2] = 0; ((int32_t *)block)[3] = 0; - - dest += stride; - block += 8; - } while (--i); -} - -static void mpeg2_idct_add_c (const int last, int16_t * block, - uint8_t * dest, const int stride) -{ - int i; - - if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) { - for (i = 0; i < 8; i++) - idct_row (block + 8 * i); - for (i = 0; i < 8; i++) - idct_col (block + i); - do { - dest[0] = CLIP (block[0] + dest[0]); - dest[1] = CLIP (block[1] + dest[1]); - dest[2] = CLIP (block[2] + dest[2]); - dest[3] = CLIP (block[3] + dest[3]); - dest[4] = CLIP (block[4] + dest[4]); - dest[5] = CLIP (block[5] + dest[5]); - dest[6] = CLIP (block[6] + dest[6]); - dest[7] = CLIP (block[7] + dest[7]); - - ((int32_t *)block)[0] = 0; ((int32_t *)block)[1] = 0; - ((int32_t *)block)[2] = 0; ((int32_t *)block)[3] = 0; - - dest += stride; - block += 8; - } while (--i); - } else { - int DC; - - DC = (block[0] + 64) >> 7; - block[0] = block[63] = 0; - i = 8; - do { - dest[0] = CLIP (DC + dest[0]); - dest[1] = CLIP (DC + dest[1]); - dest[2] = CLIP (DC + dest[2]); - dest[3] = CLIP (DC + dest[3]); - dest[4] = CLIP (DC + dest[4]); - dest[5] = CLIP (DC + dest[5]); - dest[6] = CLIP (DC + dest[6]); - dest[7] = CLIP (DC + dest[7]); - dest += stride; - } while (--i); - } -} - -void mpeg2_idct_init (uint32_t accel) -{ -#ifdef ARCH_X86 - if (accel & MPEG2_ACCEL_X86_MMXEXT) { - mpeg2_idct_copy = mpeg2_idct_copy_mmxext; - mpeg2_idct_add = mpeg2_idct_add_mmxext; - mpeg2_idct_mmx_init (); - } else if (accel & MPEG2_ACCEL_X86_MMX) { - mpeg2_idct_copy = mpeg2_idct_copy_mmx; - mpeg2_idct_add = mpeg2_idct_add_mmx; - mpeg2_idct_mmx_init (); - } else -#endif -#ifdef ARCH_PPC - if (accel & MPEG2_ACCEL_PPC_ALTIVEC) { - mpeg2_idct_copy = mpeg2_idct_copy_altivec; - mpeg2_idct_add = mpeg2_idct_add_altivec; - mpeg2_idct_altivec_init (); - } else -#endif -#ifdef ARCH_ALPHA - if (accel & MPEG2_ACCEL_ALPHA_MVI) { - mpeg2_idct_copy = mpeg2_idct_copy_mvi; - mpeg2_idct_add = mpeg2_idct_add_mvi; - mpeg2_idct_alpha_init (); - } else if (accel & MPEG2_ACCEL_ALPHA) { - int i; - - mpeg2_idct_copy = mpeg2_idct_copy_alpha; - mpeg2_idct_add = mpeg2_idct_add_alpha; - mpeg2_idct_alpha_init (); - for (i = -3840; i < 3840 + 256; i++) - CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i); - } else -#endif - { - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; - int i, j; - - mpeg2_idct_copy = mpeg2_idct_copy_c; - mpeg2_idct_add = mpeg2_idct_add_c; - for (i = -3840; i < 3840 + 256; i++) - CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i); - for (i = 0; i < 64; i++) { - j = mpeg2_scan_norm[i]; - mpeg2_scan_norm[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2); - j = mpeg2_scan_alt[i]; - mpeg2_scan_alt[i] = ((j & 0x36) >> 1) | ((j & 0x09) << 2); - } - } -} diff -Nru k9copy-2.1.0/src/mpeg2/idct_mmx.cpp k9copy-2.2.0/src/mpeg2/idct_mmx.cpp --- k9copy-2.1.0/src/mpeg2/idct_mmx.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/idct_mmx.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,812 +0,0 @@ -/* - * idct_mmx.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" -#ifdef ARCH_X86 - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#include "mmx.h" - -#define ROW_SHIFT 15 -#define COL_SHIFT 6 - -#define round(bias) ((int)(((bias)+0.5) * (1<> ROW_SHIFT; - row[1] = (a1 + b1) >> ROW_SHIFT; - row[2] = (a2 + b2) >> ROW_SHIFT; - row[3] = (a3 + b3) >> ROW_SHIFT; - row[4] = (a3 - b3) >> ROW_SHIFT; - row[5] = (a2 - b2) >> ROW_SHIFT; - row[6] = (a1 - b1) >> ROW_SHIFT; - row[7] = (a0 - b0) >> ROW_SHIFT; -} -#endif - - -/* MMXEXT row IDCT */ - -#define mmxext_table(c1,c2,c3,c4,c5,c6,c7) { c4, c2, -c4, -c2, \ - c4, c6, c4, c6, \ - c1, c3, -c1, -c5, \ - c5, c7, c3, -c7, \ - c4, -c6, c4, -c6, \ - -c4, c2, c4, -c2, \ - c5, -c1, c3, -c1, \ - c7, c3, c7, -c5 } - -static inline void mmxext_row_head (int16_t * const row, const int offset, - const int16_t * const table) -{ - movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ - - movq_m2r (*(row+offset+4), mm5); /* mm5 = x7 x5 x3 x1 */ - movq_r2r (mm2, mm0); /* mm0 = x6 x4 x2 x0 */ - - movq_m2r (*table, mm3); /* mm3 = -C2 -C4 C2 C4 */ - movq_r2r (mm5, mm6); /* mm6 = x7 x5 x3 x1 */ - - movq_m2r (*(table+4), mm4); /* mm4 = C6 C4 C6 C4 */ - pmaddwd_r2r (mm0, mm3); /* mm3 = -C4*x4-C2*x6 C4*x0+C2*x2 */ - - pshufw_r2r (mm2, mm2, 0x4e); /* mm2 = x2 x0 x6 x4 */ -} - -static inline void mmxext_row (const int16_t * const table, - const int32_t * const rounder) -{ - movq_m2r (*(table+8), mm1); /* mm1 = -C5 -C1 C3 C1 */ - pmaddwd_r2r (mm2, mm4); /* mm4 = C4*x0+C6*x2 C4*x4+C6*x6 */ - - pmaddwd_m2r (*(table+16), mm0); /* mm0 = C4*x4-C6*x6 C4*x0-C6*x2 */ - pshufw_r2r (mm6, mm6, 0x4e); /* mm6 = x3 x1 x7 x5 */ - - movq_m2r (*(table+12), mm7); /* mm7 = -C7 C3 C7 C5 */ - pmaddwd_r2r (mm5, mm1); /* mm1 = -C1*x5-C5*x7 C1*x1+C3*x3 */ - - paddd_m2r (*rounder, mm3); /* mm3 += rounder */ - pmaddwd_r2r (mm6, mm7); /* mm7 = C3*x1-C7*x3 C5*x5+C7*x7 */ - - pmaddwd_m2r (*(table+20), mm2); /* mm2 = C4*x0-C2*x2 -C4*x4+C2*x6 */ - paddd_r2r (mm4, mm3); /* mm3 = a1 a0 + rounder */ - - pmaddwd_m2r (*(table+24), mm5); /* mm5 = C3*x5-C1*x7 C5*x1-C1*x3 */ - movq_r2r (mm3, mm4); /* mm4 = a1 a0 + rounder */ - - pmaddwd_m2r (*(table+28), mm6); /* mm6 = C7*x1-C5*x3 C7*x5+C3*x7 */ - paddd_r2r (mm7, mm1); /* mm1 = b1 b0 */ - - paddd_m2r (*rounder, mm0); /* mm0 += rounder */ - psubd_r2r (mm1, mm3); /* mm3 = a1-b1 a0-b0 + rounder */ - - psrad_i2r (ROW_SHIFT, mm3); /* mm3 = y6 y7 */ - paddd_r2r (mm4, mm1); /* mm1 = a1+b1 a0+b0 + rounder */ - - paddd_r2r (mm2, mm0); /* mm0 = a3 a2 + rounder */ - psrad_i2r (ROW_SHIFT, mm1); /* mm1 = y1 y0 */ - - paddd_r2r (mm6, mm5); /* mm5 = b3 b2 */ - movq_r2r (mm0, mm4); /* mm4 = a3 a2 + rounder */ - - paddd_r2r (mm5, mm0); /* mm0 = a3+b3 a2+b2 + rounder */ - psubd_r2r (mm5, mm4); /* mm4 = a3-b3 a2-b2 + rounder */ -} - -static inline void mmxext_row_tail (int16_t * const row, const int store) -{ - psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ - - psrad_i2r (ROW_SHIFT, mm4); /* mm4 = y4 y5 */ - - packssdw_r2r (mm0, mm1); /* mm1 = y3 y2 y1 y0 */ - - packssdw_r2r (mm3, mm4); /* mm4 = y6 y7 y4 y5 */ - - movq_r2m (mm1, *(row+store)); /* save y3 y2 y1 y0 */ - pshufw_r2r (mm4, mm4, 0xb1); /* mm4 = y7 y6 y5 y4 */ - - /* slot */ - - movq_r2m (mm4, *(row+store+4)); /* save y7 y6 y5 y4 */ -} - -static inline void mmxext_row_mid (int16_t * const row, const int store, - const int offset, - const int16_t * const table) -{ - movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ - psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ - - movq_m2r (*(row+offset+4), mm5); /* mm5 = x7 x5 x3 x1 */ - psrad_i2r (ROW_SHIFT, mm4); /* mm4 = y4 y5 */ - - packssdw_r2r (mm0, mm1); /* mm1 = y3 y2 y1 y0 */ - movq_r2r (mm5, mm6); /* mm6 = x7 x5 x3 x1 */ - - packssdw_r2r (mm3, mm4); /* mm4 = y6 y7 y4 y5 */ - movq_r2r (mm2, mm0); /* mm0 = x6 x4 x2 x0 */ - - movq_r2m (mm1, *(row+store)); /* save y3 y2 y1 y0 */ - pshufw_r2r (mm4, mm4, 0xb1); /* mm4 = y7 y6 y5 y4 */ - - movq_m2r (*table, mm3); /* mm3 = -C2 -C4 C2 C4 */ - movq_r2m (mm4, *(row+store+4)); /* save y7 y6 y5 y4 */ - - pmaddwd_r2r (mm0, mm3); /* mm3 = -C4*x4-C2*x6 C4*x0+C2*x2 */ - - movq_m2r (*(table+4), mm4); /* mm4 = C6 C4 C6 C4 */ - pshufw_r2r (mm2, mm2, 0x4e); /* mm2 = x2 x0 x6 x4 */ -} - - -/* MMX row IDCT */ - -#define mmx_table(c1,c2,c3,c4,c5,c6,c7) { c4, c2, c4, c6, \ - c4, c6, -c4, -c2, \ - c1, c3, c3, -c7, \ - c5, c7, -c1, -c5, \ - c4, -c6, c4, -c2, \ - -c4, c2, c4, -c6, \ - c5, -c1, c7, -c5, \ - c7, c3, c3, -c1 } - -static inline void mmx_row_head (int16_t * const row, const int offset, - const int16_t * const table) -{ - movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ - - movq_m2r (*(row+offset+4), mm5); /* mm5 = x7 x5 x3 x1 */ - movq_r2r (mm2, mm0); /* mm0 = x6 x4 x2 x0 */ - - movq_m2r (*table, mm3); /* mm3 = C6 C4 C2 C4 */ - movq_r2r (mm5, mm6); /* mm6 = x7 x5 x3 x1 */ - - punpckldq_r2r (mm0, mm0); /* mm0 = x2 x0 x2 x0 */ - - movq_m2r (*(table+4), mm4); /* mm4 = -C2 -C4 C6 C4 */ - pmaddwd_r2r (mm0, mm3); /* mm3 = C4*x0+C6*x2 C4*x0+C2*x2 */ - - movq_m2r (*(table+8), mm1); /* mm1 = -C7 C3 C3 C1 */ - punpckhdq_r2r (mm2, mm2); /* mm2 = x6 x4 x6 x4 */ -} - -static inline void mmx_row (const int16_t * const table, - const int32_t * const rounder) -{ - pmaddwd_r2r (mm2, mm4); /* mm4 = -C4*x4-C2*x6 C4*x4+C6*x6 */ - punpckldq_r2r (mm5, mm5); /* mm5 = x3 x1 x3 x1 */ - - pmaddwd_m2r (*(table+16), mm0); /* mm0 = C4*x0-C2*x2 C4*x0-C6*x2 */ - punpckhdq_r2r (mm6, mm6); /* mm6 = x7 x5 x7 x5 */ - - movq_m2r (*(table+12), mm7); /* mm7 = -C5 -C1 C7 C5 */ - pmaddwd_r2r (mm5, mm1); /* mm1 = C3*x1-C7*x3 C1*x1+C3*x3 */ - - paddd_m2r (*rounder, mm3); /* mm3 += rounder */ - pmaddwd_r2r (mm6, mm7); /* mm7 = -C1*x5-C5*x7 C5*x5+C7*x7 */ - - pmaddwd_m2r (*(table+20), mm2); /* mm2 = C4*x4-C6*x6 -C4*x4+C2*x6 */ - paddd_r2r (mm4, mm3); /* mm3 = a1 a0 + rounder */ - - pmaddwd_m2r (*(table+24), mm5); /* mm5 = C7*x1-C5*x3 C5*x1-C1*x3 */ - movq_r2r (mm3, mm4); /* mm4 = a1 a0 + rounder */ - - pmaddwd_m2r (*(table+28), mm6); /* mm6 = C3*x5-C1*x7 C7*x5+C3*x7 */ - paddd_r2r (mm7, mm1); /* mm1 = b1 b0 */ - - paddd_m2r (*rounder, mm0); /* mm0 += rounder */ - psubd_r2r (mm1, mm3); /* mm3 = a1-b1 a0-b0 + rounder */ - - psrad_i2r (ROW_SHIFT, mm3); /* mm3 = y6 y7 */ - paddd_r2r (mm4, mm1); /* mm1 = a1+b1 a0+b0 + rounder */ - - paddd_r2r (mm2, mm0); /* mm0 = a3 a2 + rounder */ - psrad_i2r (ROW_SHIFT, mm1); /* mm1 = y1 y0 */ - - paddd_r2r (mm6, mm5); /* mm5 = b3 b2 */ - movq_r2r (mm0, mm7); /* mm7 = a3 a2 + rounder */ - - paddd_r2r (mm5, mm0); /* mm0 = a3+b3 a2+b2 + rounder */ - psubd_r2r (mm5, mm7); /* mm7 = a3-b3 a2-b2 + rounder */ -} - -static inline void mmx_row_tail (int16_t * const row, const int store) -{ - psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ - - psrad_i2r (ROW_SHIFT, mm7); /* mm7 = y4 y5 */ - - packssdw_r2r (mm0, mm1); /* mm1 = y3 y2 y1 y0 */ - - packssdw_r2r (mm3, mm7); /* mm7 = y6 y7 y4 y5 */ - - movq_r2m (mm1, *(row+store)); /* save y3 y2 y1 y0 */ - movq_r2r (mm7, mm4); /* mm4 = y6 y7 y4 y5 */ - - pslld_i2r (16, mm7); /* mm7 = y7 0 y5 0 */ - - psrld_i2r (16, mm4); /* mm4 = 0 y6 0 y4 */ - - por_r2r (mm4, mm7); /* mm7 = y7 y6 y5 y4 */ - - /* slot */ - - movq_r2m (mm7, *(row+store+4)); /* save y7 y6 y5 y4 */ -} - -static inline void mmx_row_mid (int16_t * const row, const int store, - const int offset, const int16_t * const table) -{ - movq_m2r (*(row+offset), mm2); /* mm2 = x6 x4 x2 x0 */ - psrad_i2r (ROW_SHIFT, mm0); /* mm0 = y3 y2 */ - - movq_m2r (*(row+offset+4), mm5); /* mm5 = x7 x5 x3 x1 */ - psrad_i2r (ROW_SHIFT, mm7); /* mm7 = y4 y5 */ - - packssdw_r2r (mm0, mm1); /* mm1 = y3 y2 y1 y0 */ - movq_r2r (mm5, mm6); /* mm6 = x7 x5 x3 x1 */ - - packssdw_r2r (mm3, mm7); /* mm7 = y6 y7 y4 y5 */ - movq_r2r (mm2, mm0); /* mm0 = x6 x4 x2 x0 */ - - movq_r2m (mm1, *(row+store)); /* save y3 y2 y1 y0 */ - movq_r2r (mm7, mm1); /* mm1 = y6 y7 y4 y5 */ - - punpckldq_r2r (mm0, mm0); /* mm0 = x2 x0 x2 x0 */ - psrld_i2r (16, mm7); /* mm7 = 0 y6 0 y4 */ - - movq_m2r (*table, mm3); /* mm3 = C6 C4 C2 C4 */ - pslld_i2r (16, mm1); /* mm1 = y7 0 y5 0 */ - - movq_m2r (*(table+4), mm4); /* mm4 = -C2 -C4 C6 C4 */ - por_r2r (mm1, mm7); /* mm7 = y7 y6 y5 y4 */ - - movq_m2r (*(table+8), mm1); /* mm1 = -C7 C3 C3 C1 */ - punpckhdq_r2r (mm2, mm2); /* mm2 = x6 x4 x6 x4 */ - - movq_r2m (mm7, *(row+store+4)); /* save y7 y6 y5 y4 */ - pmaddwd_r2r (mm0, mm3); /* mm3 = C4*x0+C6*x2 C4*x0+C2*x2 */ -} - - -#if 0 -/* C column IDCT - its just here to document the MMXEXT and MMX versions */ -static inline void idct_col (int16_t * col, int offset) -{ -/* multiplication - as implemented on mmx */ -#define F(c,x) (((c) * (x)) >> 16) - -/* saturation - it helps us handle torture test cases */ -#define S(x) (((x)>32767) ? 32767 : ((x)<-32768) ? -32768 : (x)) - - int16_t x0, x1, x2, x3, x4, x5, x6, x7; - int16_t y0, y1, y2, y3, y4, y5, y6, y7; - int16_t a0, a1, a2, a3, b0, b1, b2, b3; - int16_t u04, v04, u26, v26, u17, v17, u35, v35, u12, v12; - - col += offset; - - x0 = col[0*8]; - x1 = col[1*8]; - x2 = col[2*8]; - x3 = col[3*8]; - x4 = col[4*8]; - x5 = col[5*8]; - x6 = col[6*8]; - x7 = col[7*8]; - - u04 = S (x0 + x4); - v04 = S (x0 - x4); - u26 = S (F (T2, x6) + x2); - v26 = S (F (T2, x2) - x6); - - a0 = S (u04 + u26); - a1 = S (v04 + v26); - a2 = S (v04 - v26); - a3 = S (u04 - u26); - - u17 = S (F (T1, x7) + x1); - v17 = S (F (T1, x1) - x7); - u35 = S (F (T3, x5) + x3); - v35 = S (F (T3, x3) - x5); - - b0 = S (u17 + u35); - b3 = S (v17 - v35); - u12 = S (u17 - u35); - v12 = S (v17 + v35); - u12 = S (2 * F (C4, u12)); - v12 = S (2 * F (C4, v12)); - b1 = S (u12 + v12); - b2 = S (u12 - v12); - - y0 = S (a0 + b0) >> COL_SHIFT; - y1 = S (a1 + b1) >> COL_SHIFT; - y2 = S (a2 + b2) >> COL_SHIFT; - y3 = S (a3 + b3) >> COL_SHIFT; - - y4 = S (a3 - b3) >> COL_SHIFT; - y5 = S (a2 - b2) >> COL_SHIFT; - y6 = S (a1 - b1) >> COL_SHIFT; - y7 = S (a0 - b0) >> COL_SHIFT; - - col[0*8] = y0; - col[1*8] = y1; - col[2*8] = y2; - col[3*8] = y3; - col[4*8] = y4; - col[5*8] = y5; - col[6*8] = y6; - col[7*8] = y7; -} -#endif - - -/* MMX column IDCT */ -static inline void idct_col (int16_t * const col, const int offset) -{ -#define T1 13036 -#define T2 27146 -#define T3 43790 -#define C4 23170 - - static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1}; - static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2}; - static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3}; - static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4}; - - /* column code adapted from peter gubanov */ - /* http://www.elecard.com/peter/idct.shtml */ - - movq_m2r (*_T1, mm0); /* mm0 = T1 */ - - movq_m2r (*(col+offset+1*8), mm1); /* mm1 = x1 */ - movq_r2r (mm0, mm2); /* mm2 = T1 */ - - movq_m2r (*(col+offset+7*8), mm4); /* mm4 = x7 */ - pmulhw_r2r (mm1, mm0); /* mm0 = T1*x1 */ - - movq_m2r (*_T3, mm5); /* mm5 = T3 */ - pmulhw_r2r (mm4, mm2); /* mm2 = T1*x7 */ - - movq_m2r (*(col+offset+5*8), mm6); /* mm6 = x5 */ - movq_r2r (mm5, mm7); /* mm7 = T3-1 */ - - movq_m2r (*(col+offset+3*8), mm3); /* mm3 = x3 */ - psubsw_r2r (mm4, mm0); /* mm0 = v17 */ - - movq_m2r (*_T2, mm4); /* mm4 = T2 */ - pmulhw_r2r (mm3, mm5); /* mm5 = (T3-1)*x3 */ - - paddsw_r2r (mm2, mm1); /* mm1 = u17 */ - pmulhw_r2r (mm6, mm7); /* mm7 = (T3-1)*x5 */ - - /* slot */ - - movq_r2r (mm4, mm2); /* mm2 = T2 */ - paddsw_r2r (mm3, mm5); /* mm5 = T3*x3 */ - - pmulhw_m2r (*(col+offset+2*8), mm4);/* mm4 = T2*x2 */ - paddsw_r2r (mm6, mm7); /* mm7 = T3*x5 */ - - psubsw_r2r (mm6, mm5); /* mm5 = v35 */ - paddsw_r2r (mm3, mm7); /* mm7 = u35 */ - - movq_m2r (*(col+offset+6*8), mm3); /* mm3 = x6 */ - movq_r2r (mm0, mm6); /* mm6 = v17 */ - - pmulhw_r2r (mm3, mm2); /* mm2 = T2*x6 */ - psubsw_r2r (mm5, mm0); /* mm0 = b3 */ - - psubsw_r2r (mm3, mm4); /* mm4 = v26 */ - paddsw_r2r (mm6, mm5); /* mm5 = v12 */ - - movq_r2m (mm0, *(col+offset+3*8)); /* save b3 in scratch0 */ - movq_r2r (mm1, mm6); /* mm6 = u17 */ - - paddsw_m2r (*(col+offset+2*8), mm2);/* mm2 = u26 */ - paddsw_r2r (mm7, mm6); /* mm6 = b0 */ - - psubsw_r2r (mm7, mm1); /* mm1 = u12 */ - movq_r2r (mm1, mm7); /* mm7 = u12 */ - - movq_m2r (*(col+offset+0*8), mm3); /* mm3 = x0 */ - paddsw_r2r (mm5, mm1); /* mm1 = u12+v12 */ - - movq_m2r (*_C4, mm0); /* mm0 = C4/2 */ - psubsw_r2r (mm5, mm7); /* mm7 = u12-v12 */ - - movq_r2m (mm6, *(col+offset+5*8)); /* save b0 in scratch1 */ - pmulhw_r2r (mm0, mm1); /* mm1 = b1/2 */ - - movq_r2r (mm4, mm6); /* mm6 = v26 */ - pmulhw_r2r (mm0, mm7); /* mm7 = b2/2 */ - - movq_m2r (*(col+offset+4*8), mm5); /* mm5 = x4 */ - movq_r2r (mm3, mm0); /* mm0 = x0 */ - - psubsw_r2r (mm5, mm3); /* mm3 = v04 */ - paddsw_r2r (mm5, mm0); /* mm0 = u04 */ - - paddsw_r2r (mm3, mm4); /* mm4 = a1 */ - movq_r2r (mm0, mm5); /* mm5 = u04 */ - - psubsw_r2r (mm6, mm3); /* mm3 = a2 */ - paddsw_r2r (mm2, mm5); /* mm5 = a0 */ - - paddsw_r2r (mm1, mm1); /* mm1 = b1 */ - psubsw_r2r (mm2, mm0); /* mm0 = a3 */ - - paddsw_r2r (mm7, mm7); /* mm7 = b2 */ - movq_r2r (mm3, mm2); /* mm2 = a2 */ - - movq_r2r (mm4, mm6); /* mm6 = a1 */ - paddsw_r2r (mm7, mm3); /* mm3 = a2+b2 */ - - psraw_i2r (COL_SHIFT, mm3); /* mm3 = y2 */ - paddsw_r2r (mm1, mm4); /* mm4 = a1+b1 */ - - psraw_i2r (COL_SHIFT, mm4); /* mm4 = y1 */ - psubsw_r2r (mm1, mm6); /* mm6 = a1-b1 */ - - movq_m2r (*(col+offset+5*8), mm1); /* mm1 = b0 */ - psubsw_r2r (mm7, mm2); /* mm2 = a2-b2 */ - - psraw_i2r (COL_SHIFT, mm6); /* mm6 = y6 */ - movq_r2r (mm5, mm7); /* mm7 = a0 */ - - movq_r2m (mm4, *(col+offset+1*8)); /* save y1 */ - psraw_i2r (COL_SHIFT, mm2); /* mm2 = y5 */ - - movq_r2m (mm3, *(col+offset+2*8)); /* save y2 */ - paddsw_r2r (mm1, mm5); /* mm5 = a0+b0 */ - - movq_m2r (*(col+offset+3*8), mm4); /* mm4 = b3 */ - psubsw_r2r (mm1, mm7); /* mm7 = a0-b0 */ - - psraw_i2r (COL_SHIFT, mm5); /* mm5 = y0 */ - movq_r2r (mm0, mm3); /* mm3 = a3 */ - - movq_r2m (mm2, *(col+offset+5*8)); /* save y5 */ - psubsw_r2r (mm4, mm3); /* mm3 = a3-b3 */ - - psraw_i2r (COL_SHIFT, mm7); /* mm7 = y7 */ - paddsw_r2r (mm0, mm4); /* mm4 = a3+b3 */ - - movq_r2m (mm5, *(col+offset+0*8)); /* save y0 */ - psraw_i2r (COL_SHIFT, mm3); /* mm3 = y4 */ - - movq_r2m (mm6, *(col+offset+6*8)); /* save y6 */ - psraw_i2r (COL_SHIFT, mm4); /* mm4 = y3 */ - - movq_r2m (mm7, *(col+offset+7*8)); /* save y7 */ - - movq_r2m (mm3, *(col+offset+4*8)); /* save y4 */ - - movq_r2m (mm4, *(col+offset+3*8)); /* save y3 */ -} - - -static const int32_t rounder0[] ATTR_ALIGN(8) = - rounder ((1 << (COL_SHIFT - 1)) - 0.5); -static const int32_t rounder4[] ATTR_ALIGN(8) = rounder (0); -static const int32_t rounder1[] ATTR_ALIGN(8) = - rounder (1.25683487303); /* C1*(C1/C4+C1+C7)/2 */ -static const int32_t rounder7[] ATTR_ALIGN(8) = - rounder (-0.25); /* C1*(C7/C4+C7-C1)/2 */ -static const int32_t rounder2[] ATTR_ALIGN(8) = - rounder (0.60355339059); /* C2 * (C6+C2)/2 */ -static const int32_t rounder6[] ATTR_ALIGN(8) = - rounder (-0.25); /* C2 * (C6-C2)/2 */ -static const int32_t rounder3[] ATTR_ALIGN(8) = - rounder (0.087788325588); /* C3*(-C3/C4+C3+C5)/2 */ -static const int32_t rounder5[] ATTR_ALIGN(8) = - rounder (-0.441341716183); /* C3*(-C5/C4+C5-C3)/2 */ - - -#define declare_idct(idct,table,idct_row_head,idct_row,idct_row_tail,idct_row_mid) \ -static inline void idct (int16_t * const block) \ -{ \ - static const int16_t table04[] ATTR_ALIGN(16) = \ - table (22725, 21407, 19266, 16384, 12873, 8867, 4520); \ - static const int16_t table17[] ATTR_ALIGN(16) = \ - table (31521, 29692, 26722, 22725, 17855, 12299, 6270); \ - static const int16_t table26[] ATTR_ALIGN(16) = \ - table (29692, 27969, 25172, 21407, 16819, 11585, 5906); \ - static const int16_t table35[] ATTR_ALIGN(16) = \ - table (26722, 25172, 22654, 19266, 15137, 10426, 5315); \ - \ - idct_row_head (block, 0*8, table04); \ - idct_row (table04, rounder0); \ - idct_row_mid (block, 0*8, 4*8, table04); \ - idct_row (table04, rounder4); \ - idct_row_mid (block, 4*8, 1*8, table17); \ - idct_row (table17, rounder1); \ - idct_row_mid (block, 1*8, 7*8, table17); \ - idct_row (table17, rounder7); \ - idct_row_mid (block, 7*8, 2*8, table26); \ - idct_row (table26, rounder2); \ - idct_row_mid (block, 2*8, 6*8, table26); \ - idct_row (table26, rounder6); \ - idct_row_mid (block, 6*8, 3*8, table35); \ - idct_row (table35, rounder3); \ - idct_row_mid (block, 3*8, 5*8, table35); \ - idct_row (table35, rounder5); \ - idct_row_tail (block, 5*8); \ - \ - idct_col (block, 0); \ - idct_col (block, 4); \ -} - - -#define COPY_MMX(offset,r0,r1,r2) \ -do { \ - movq_m2r (*(block+offset), r0); \ - dest += stride; \ - movq_m2r (*(block+offset+4), r1); \ - movq_r2m (r2, *dest); \ - packuswb_r2r (r1, r0); \ -} while (0) - -static inline void block_copy (int16_t * const block, uint8_t * dest, - const int stride) -{ - movq_m2r (*(block+0*8), mm0); - movq_m2r (*(block+0*8+4), mm1); - movq_m2r (*(block+1*8), mm2); - packuswb_r2r (mm1, mm0); - movq_m2r (*(block+1*8+4), mm3); - movq_r2m (mm0, *dest); - packuswb_r2r (mm3, mm2); - COPY_MMX (2*8, mm0, mm1, mm2); - COPY_MMX (3*8, mm2, mm3, mm0); - COPY_MMX (4*8, mm0, mm1, mm2); - COPY_MMX (5*8, mm2, mm3, mm0); - COPY_MMX (6*8, mm0, mm1, mm2); - COPY_MMX (7*8, mm2, mm3, mm0); - movq_r2m (mm2, *(dest+stride)); -} - - -#define ADD_MMX(offset,r1,r2,r3,r4) \ -do { \ - movq_m2r (*(dest+2*stride), r1); \ - packuswb_r2r (r4, r3); \ - movq_r2r (r1, r2); \ - dest += stride; \ - movq_r2m (r3, *dest); \ - punpcklbw_r2r (mm0, r1); \ - paddsw_m2r (*(block+offset), r1); \ - punpckhbw_r2r (mm0, r2); \ - paddsw_m2r (*(block+offset+4), r2); \ -} while (0) - -static inline void block_add (int16_t * const block, uint8_t * dest, - const int stride) -{ - movq_m2r (*dest, mm1); - pxor_r2r (mm0, mm0); - movq_m2r (*(dest+stride), mm3); - movq_r2r (mm1, mm2); - punpcklbw_r2r (mm0, mm1); - movq_r2r (mm3, mm4); - paddsw_m2r (*(block+0*8), mm1); - punpckhbw_r2r (mm0, mm2); - paddsw_m2r (*(block+0*8+4), mm2); - punpcklbw_r2r (mm0, mm3); - paddsw_m2r (*(block+1*8), mm3); - packuswb_r2r (mm2, mm1); - punpckhbw_r2r (mm0, mm4); - movq_r2m (mm1, *dest); - paddsw_m2r (*(block+1*8+4), mm4); - ADD_MMX (2*8, mm1, mm2, mm3, mm4); - ADD_MMX (3*8, mm3, mm4, mm1, mm2); - ADD_MMX (4*8, mm1, mm2, mm3, mm4); - ADD_MMX (5*8, mm3, mm4, mm1, mm2); - ADD_MMX (6*8, mm1, mm2, mm3, mm4); - ADD_MMX (7*8, mm3, mm4, mm1, mm2); - packuswb_r2r (mm4, mm3); - movq_r2m (mm3, *(dest+stride)); -} - - -static inline void block_zero (int16_t * const block) -{ - pxor_r2r (mm0, mm0); - movq_r2m (mm0, *(block+0*4)); - movq_r2m (mm0, *(block+1*4)); - movq_r2m (mm0, *(block+2*4)); - movq_r2m (mm0, *(block+3*4)); - movq_r2m (mm0, *(block+4*4)); - movq_r2m (mm0, *(block+5*4)); - movq_r2m (mm0, *(block+6*4)); - movq_r2m (mm0, *(block+7*4)); - movq_r2m (mm0, *(block+8*4)); - movq_r2m (mm0, *(block+9*4)); - movq_r2m (mm0, *(block+10*4)); - movq_r2m (mm0, *(block+11*4)); - movq_r2m (mm0, *(block+12*4)); - movq_r2m (mm0, *(block+13*4)); - movq_r2m (mm0, *(block+14*4)); - movq_r2m (mm0, *(block+15*4)); -} - - -#define CPU_MMXEXT 0 -#define CPU_MMX 1 - -#define dup4(reg) \ -do { \ - if (cpu != CPU_MMXEXT) { \ - punpcklwd_r2r (reg, reg); \ - punpckldq_r2r (reg, reg); \ - } else \ - pshufw_r2r (reg, reg, 0x00); \ -} while (0) - -static inline void block_add_DC (int16_t * const block, uint8_t * dest, - const int stride, const int cpu) -{ - movd_v2r ((block[0] + 64) >> 7, mm0); - pxor_r2r (mm1, mm1); - movq_m2r (*dest, mm2); - dup4 (mm0); - psubsw_r2r (mm0, mm1); - packuswb_r2r (mm0, mm0); - paddusb_r2r (mm0, mm2); - packuswb_r2r (mm1, mm1); - movq_m2r (*(dest + stride), mm3); - psubusb_r2r (mm1, mm2); - block[0] = 0; - paddusb_r2r (mm0, mm3); - movq_r2m (mm2, *dest); - psubusb_r2r (mm1, mm3); - movq_m2r (*(dest + 2*stride), mm2); - dest += stride; - movq_r2m (mm3, *dest); - paddusb_r2r (mm0, mm2); - movq_m2r (*(dest + 2*stride), mm3); - psubusb_r2r (mm1, mm2); - dest += stride; - paddusb_r2r (mm0, mm3); - movq_r2m (mm2, *dest); - psubusb_r2r (mm1, mm3); - movq_m2r (*(dest + 2*stride), mm2); - dest += stride; - movq_r2m (mm3, *dest); - paddusb_r2r (mm0, mm2); - movq_m2r (*(dest + 2*stride), mm3); - psubusb_r2r (mm1, mm2); - dest += stride; - paddusb_r2r (mm0, mm3); - movq_r2m (mm2, *dest); - psubusb_r2r (mm1, mm3); - movq_m2r (*(dest + 2*stride), mm2); - dest += stride; - movq_r2m (mm3, *dest); - paddusb_r2r (mm0, mm2); - movq_m2r (*(dest + 2*stride), mm3); - psubusb_r2r (mm1, mm2); - block[63] = 0; - paddusb_r2r (mm0, mm3); - movq_r2m (mm2, *(dest + stride)); - psubusb_r2r (mm1, mm3); - movq_r2m (mm3, *(dest + 2*stride)); -} - - -declare_idct (mmxext_idct, mmxext_table, - mmxext_row_head, mmxext_row, mmxext_row_tail, mmxext_row_mid) - -void mpeg2_idct_copy_mmxext (int16_t * const block, uint8_t * const dest, - const int stride) -{ - mmxext_idct (block); - block_copy (block, dest, stride); - block_zero (block); -} - -void mpeg2_idct_add_mmxext (const int last, int16_t * const block, - uint8_t * const dest, const int stride) -{ - if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) { - mmxext_idct (block); - block_add (block, dest, stride); - block_zero (block); - } else - block_add_DC (block, dest, stride, CPU_MMXEXT); -} - - -declare_idct (mmx_idct, mmx_table, - mmx_row_head, mmx_row, mmx_row_tail, mmx_row_mid) - -void mpeg2_idct_copy_mmx (int16_t * const block, uint8_t * const dest, - const int stride) -{ - mmx_idct (block); - block_copy (block, dest, stride); - block_zero (block); -} - -void mpeg2_idct_add_mmx (const int last, int16_t * const block, - uint8_t * const dest, const int stride) -{ - if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) { - mmx_idct (block); - block_add (block, dest, stride); - block_zero (block); - } else - block_add_DC (block, dest, stride, CPU_MMX); -} - - -void mpeg2_idct_mmx_init (void) -{ - extern uint8_t mpeg2_scan_norm[64]; - extern uint8_t mpeg2_scan_alt[64]; - int i, j; - - /* the mmx/mmxext idct uses a reordered input, so we patch scan tables */ - - for (i = 0; i < 64; i++) { - j = mpeg2_scan_norm[i]; - mpeg2_scan_norm[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2); - j = mpeg2_scan_alt[i]; - mpeg2_scan_alt[i] = (j & 0x38) | ((j & 6) >> 1) | ((j & 1) << 2); - } -} - -#endif diff -Nru k9copy-2.1.0/src/mpeg2/k9decodethread.cpp k9copy-2.2.0/src/mpeg2/k9decodethread.cpp --- k9copy-2.1.0/src/mpeg2/k9decodethread.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/k9decodethread.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -1,7 +1,7 @@ // // C++ Implementation: k9decodethread // -// Description: +// Description: // // // Author: Jean-Michel PETIT , (C) 2006 @@ -10,17 +10,25 @@ // // #include "k9decodethread.h" +#include "k9internalplayer.h" +#include "k9saveimage.h" -k9DecodeThread::k9DecodeThread() -{ - m_decoder=new kDecMPEG2(this); - noData=FALSE; +#include + + +k9DecodeThread::k9DecodeThread() { + noData=FALSE; + m_viewMpeg2=NULL; + m_backupDlg=NULL; + m_saveImage=NULL; + m_decmpeg2=new kDecMPEG2(this); } -k9DecodeThread::~k9DecodeThread() -{ - delete m_decoder; +k9DecodeThread::~k9DecodeThread() { + setNoData(); + wait(); + delete m_decmpeg2; } void k9DecodeThread::clear() { @@ -31,81 +39,99 @@ } void k9DecodeThread::addData(uchar *data,uint size) { - while (1) { - if (m_fifo.freespace()>=size) { - m_fifo.enqueue(data,size); - wDataReady.wakeAll(); - break; - } else { - QMutex m; - m.lock(); - wDataRead.wait(&m); - } - } + if (! isRunning()) start(); + m_fifo.addData(data,size); +} + + +uint32_t k9DecodeThread::freespace() { + return m_fifo.freespace(); } +uint32_t k9DecodeThread::count() { + return m_fifo.count(); +} + int k9DecodeThread::readData(uchar * data,uint size) { - uint size2=size; - uint32_t readSize=0,s=0; - - while (1) { - // is there data in the buffer? - if (m_fifo.count() >0) { - // s= size of data that we will read (maximum = size) - s=(m_fifo.count()) =size2)) { - break; - } else { - QMutex m; - m.lock(); - wDataReady.wait(&m); - } - } - // if there's datas in input buffer and we did not get all what we wanted, we take them. - s= (m_fifo.count()) 0 ) - m_fifo.dequeue(data,s); - - wDataRead.wakeAll(); - return readSize; + return m_fifo.readData(data,size); } void k9DecodeThread::setNoData() { noData=true; + m_fifo.setNoData(); wDataRead.wakeAll(); wDataReady.wakeAll(); } void k9DecodeThread::sleepms(int _ms) { - msleep(_ms); -} + msleep(_ms); +} + +#define INBUF_SIZE 2048 + +void k9DecodeThread::test() { + + +} + void k9DecodeThread::run() { - noData=FALSE; - m_decoder->start(); - while (1) { - int count=2048; - uchar buffer[count]; - uint32_t size=readData(buffer,count); - if (size==0) - break; - m_decoder->decode(buffer ,buffer+size,0); - } - m_decoder->stop(); + noData=FALSE; + m_decmpeg2->start(); + while (1) { + int count=2048; + uchar buffer[count]; + uint32_t size=readData(buffer,count); + if (size==0 && noData) + break; + m_decmpeg2->decode(buffer ,buffer+size,0); + } + m_decmpeg2->stop(); + + } + + + +void k9DecodeThread::pgm_save(uchar * buf,int wrap,int width,int height) { + int len; + len =(int) (3*width*height); + char c[255]; + sprintf(c,"P6\n%d %d\n255\n", width, height); + char *s; + s= new char[len+strlen(c)]; + memcpy(s,c,strlen(c)); + memcpy(s+strlen(c),buf, len); + QImage pix; + pix.loadFromData((uchar*)s,strlen(c)+len); + delete s; + if (m_viewMpeg2) + m_viewMpeg2->drawImage(&pix); + else if (m_saveImage) + m_saveImage->drawImage(&pix); + else if (m_backupDlg) + m_backupDlg->drawImage(&pix); + + +} + + + +void k9DecodeThread::setSaveImage(k9SaveImage* theValue) { + m_saveImage = theValue; +} + + +void k9DecodeThread::setViewMpeg2(k9InternalPlayer* theValue) { + m_viewMpeg2 = theValue; +} + + +void k9DecodeThread::setBackupDlg(k9InternalPlayer* theValue) { + m_backupDlg = theValue; +} + +void k9DecodeThread::Stop() { + setNoData(); } diff -Nru k9copy-2.1.0/src/mpeg2/k9decodethread.h k9copy-2.2.0/src/mpeg2/k9decodethread.h --- k9copy-2.1.0/src/mpeg2/k9decodethread.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/k9decodethread.h 2009-02-19 22:30:17.000000000 +0100 @@ -1,7 +1,7 @@ // // C++ Interface: k9decodethread // -// Description: +// Description: // // // Author: Jean-Michel PETIT , (C) 2006 @@ -17,21 +17,25 @@ #include #include #include - +#include #include "kdecmpeg2.h" - /** @author Jean-Michel PETIT */ -class k9DecodeThread : public QThread -{ + +class k9SaveImage; +class k9InternalPlayer; +class k9BackupDlg; +class k9DecodeThread : public QThread { private: - kDecMPEG2 *m_decoder; k9MemoryFifo m_fifo; QWaitCondition wDataRead; QWaitCondition wDataReady; bool noData; - + kDecMPEG2 *m_decmpeg2; + k9SaveImage *m_saveImage; + k9InternalPlayer *m_viewMpeg2; + k9InternalPlayer *m_backupDlg; public: k9DecodeThread(); ~k9DecodeThread(); @@ -39,8 +43,19 @@ void setNoData(); void clear(); void sleepms(int _ms); - kDecMPEG2 *getDecoder() {return m_decoder;} - + + void setSaveImage(k9SaveImage* theValue); + + void setViewMpeg2(k9InternalPlayer* theValue); + + void setBackupDlg(k9InternalPlayer* theValue); + + void Stop(); + + void test(); + void pgm_save(uchar * buf,int wrap,int width,int height); + uint32_t freespace(); + uint32_t count(); protected: int readData(uchar * data,uint size); void run(); diff -Nru k9copy-2.1.0/src/mpeg2/k9plaympeg2.cpp k9copy-2.2.0/src/mpeg2/k9plaympeg2.cpp --- k9copy-2.1.0/src/mpeg2/k9plaympeg2.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/k9plaympeg2.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -19,6 +19,8 @@ k9PlayMPEG2::k9PlayMPEG2() { m_title=NULL; + m_stopped=true; + connect (&m_timer,SIGNAL(timeout()),this,SLOT(timeout())); } @@ -30,10 +32,11 @@ void k9PlayMPEG2::updatePos( uint32_t _position) { m_idxLect=_position; m_decoder.clear(); - m_decoder.getDecoder()->restart(); } - +void k9PlayMPEG2::timeout() { + emit setPosition(m_position); +} #define DVD_LANGUAGE "en" #define DVD_READ_CACHE 1 @@ -118,11 +121,11 @@ if (tt != title) finished=1; - if (finished==0 && buf[17]==0xE0) { + if (finished==0 && buf[17]==0xE0 && !m_stopped) { m_decoder.addData( buf,len); } // if (qApp->tryLock()) { - emit setPosition( pos); + m_position= pos; // qApp->unlock(); // } @@ -132,7 +135,8 @@ //removed break --> save case DVDNAV_BLOCK_OK: /* We have received a regular block of the currently playing MPEG stream.*/ - m_decoder.addData( buf,len); + if (!m_stopped) + m_decoder.addData( buf,len); break; case DVDNAV_NOP: /* Nothing to do here. */ @@ -144,7 +148,7 @@ * A length of 0xff means an indefinite still which has to be skipped * indirectly by some user interaction. */ { - dvdnav_still_event_t *still_event = (dvdnav_still_event_t *)buf; +// dvdnav_still_event_t *still_event = (dvdnav_still_event_t *)buf; dvdnav_still_skip(dvdnav); } break; @@ -171,7 +175,7 @@ /* Player applications should inform their overlay engine to highlight the * given button */ { - dvdnav_highlight_event_t *highlight_event = (dvdnav_highlight_event_t *)buf; +// dvdnav_highlight_event_t *highlight_event = (dvdnav_highlight_event_t *)buf; } break; case DVDNAV_VTS_CHANGE: @@ -214,27 +218,46 @@ m_stopped=false; m_idxLect=m_startSector; - playTitle(); + m_decoder.start(QThread::LowPriority); + playTitle(); + m_decoder.Stop(); + m_decoder.wait(); + m_timer.stop(); } void k9PlayMPEG2::stop() { - m_stopped=TRUE; + m_stopped=true; m_decoder.setNoData(); m_decoder.clear(); - m_decoder.wait(); +/* + m_decoder.wait(); +*/ + wait(); } void k9PlayMPEG2::play() { - if (m_stopped && m_title!=NULL) - open(m_dvd,m_device,m_title,m_chapter); + if (m_stopped && m_title!=NULL) { + m_stopped=false; + m_startSector=m_title->getChapter( 0)->getstartSector(); + m_lastSector= m_startSector + m_title->getsectors(); //m_title->getChapter(m_title->getchapterCount()-1)->getendSector(); + m_position=m_startSector; + emit setPosition( m_startSector); + emit setMax( m_lastSector); + emit setMin( m_startSector); + start(); + m_timer.start(100); + + + //open(m_dvd,m_device,m_title,m_chapter); + } } -kDecMPEG2 *k9PlayMPEG2::getDecoder() { - return m_decoder.getDecoder() ; +k9DecodeThread *k9PlayMPEG2::getDecoder() { + return &m_decoder; } void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter=0) { @@ -268,8 +291,7 @@ emit setMax( m_lastSector); emit setMin( m_startSector); - m_decoder.start(QThread::LowPriority); - start(); + // start(); } diff -Nru k9copy-2.1.0/src/mpeg2/k9plaympeg2.h k9copy-2.2.0/src/mpeg2/k9plaympeg2.h --- k9copy-2.1.0/src/mpeg2/k9plaympeg2.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/k9plaympeg2.h 2009-02-19 22:30:17.000000000 +0100 @@ -16,10 +16,11 @@ #include "k9dvdtitle.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "k9decodethread.h" /** @author Jean-Michel PETIT @@ -39,10 +40,12 @@ QMutex mutex; dvd_reader_t *m_dvd; int m_chapter; + int m_position; + QTimer m_timer; public: k9PlayMPEG2(); void open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter); - kDecMPEG2 *getDecoder(); + k9DecodeThread *getDecoder(); void setDvd(dvd_reader_t* _value) { m_dvd = _value;} dvd_reader_t* getDvd() const {return m_dvd;} ~k9PlayMPEG2(); @@ -53,6 +56,7 @@ void stop(); void play(); void updatePos(uint32_t _position); + void timeout(); signals: void setPosition(uint _position); diff -Nru k9copy-2.1.0/src/mpeg2/kdecmpeg2.cpp k9copy-2.2.0/src/mpeg2/kdecmpeg2.cpp --- k9copy-2.1.0/src/mpeg2/kdecmpeg2.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/kdecmpeg2.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -19,60 +19,22 @@ ***************************************************************************/ #include "kdecmpeg2.h" -#include "mpeg2.h" -#include "mpeg2convert.h" #include #include #include #include #include "k9saveimage.h" #include "k9decodethread.h" - -void k9DisplayThread::setImage( QImage _image) { - if (! m_playing) { - m_playing=true; - m_image=_image; - m_raw=FALSE; - start(); - } +extern "C" { +#include +#include } -void k9DisplayThread::setRawImage(uchar *_buffer,int _width,int _height,int size) { - //if (!m_playing) { - if (m_mutex.tryLock()) { - m_playing=true; - if (m_buffer) - delete[] m_buffer; - m_buffer=new uchar[size]; - tc_memcpy(m_buffer,_buffer,size); - m_size=size; - m_width=_width; - m_height=_height, - m_raw=TRUE; - m_mutex.unlock(); - start(); - } - // } -} - -void k9DisplayThread::run() { - if (qApp==NULL) - return; - if (m_raw) { - m_mutex.lock(); - m_dec->drawRaw( m_buffer,m_width,m_height,m_size); - m_mutex.unlock(); - //free(m_buffer); - }else - m_dec->draw( &m_image); - m_playing=false; -} void kDecMPEG2::init() { demux_pid=0; m_thread=NULL; - m_saveImage=NULL; demux_track=0xe0; decoder = mpeg2_init (); m_opened=true; @@ -80,33 +42,16 @@ fprintf (stderr, "Could not allocate a decoder object.\n"); exit (1); } - m_display=new k9DisplayThread(this); - m_useGL=FALSE; } kDecMPEG2::kDecMPEG2(k9DecodeThread *_thread) { init(); m_thread=_thread; - m_player=NULL; } kDecMPEG2::kDecMPEG2(){ init(); - m_player=NULL; -} - -void kDecMPEG2::draw(QImage *image) { - if (m_player) - m_player->drawPixmap(image); - else - emit pixmapReady(image); -} -void kDecMPEG2::drawRaw(uchar *_buffer,int width,int height,int size) { - if (m_player) - m_player->drawPpm(_buffer,width,height,size); - else - emit ppmReady (_buffer,width,height,size); } @@ -152,16 +97,16 @@ if (missing > 0) { \ if (header == head_buf) { \ if (missing <= end - buf) { \ - tc_memcpy (header + bytes, buf, missing); \ + memcpy (header + bytes, buf, missing); \ buf += missing; \ bytes = (x); \ } else { \ - tc_memcpy (header + bytes, buf, end - buf); \ + memcpy (header + bytes, buf, end - buf); \ state_bytes = bytes + end - buf; \ return 0; \ } \ } else { \ - tc_memcpy (head_buf, header, bytes); \ + memcpy (head_buf, header, bytes); \ state = DEMUX_HEADER; \ state_bytes = bytes; \ return 0; \ @@ -352,33 +297,9 @@ m_timer.restart(); } -void kDecMPEG2::save_ppm (int width, int height, uint8_t * buf, int num) +void kDecMPEG2::save_ppm (int width, int height, uint8_t * buf, int ) { - - int len; - if (!m_useGL) { - len =(int) (3*width*height); - char c[255]; - sprintf(c,"P6\n%d %d\n255\n", width, height); - char *s; - s= new char[len+strlen(c)]; - tc_memcpy(s,c,strlen(c)); - tc_memcpy(s+strlen(c),buf, len); - pix.loadFromData((uchar*)s,strlen(c)+len); - delete s; - sync(); - if (m_thread !=NULL) - m_display->setImage( pix); - else - draw( &pix); - if (m_saveImage) - m_saveImage->drawImage(&pix); - - } else { - len =(int) (4*width*height); - sync(); - m_display->setRawImage( (uchar*)buf,width,height,len); - } + m_thread->pgm_save((uchar*) buf,0,width,height); } void kDecMPEG2::decode_mpeg2(uint8_t * current, uint8_t * end) @@ -396,10 +317,7 @@ case STATE_BUFFER: return; case STATE_SEQUENCE: - if (! m_useGL) mpeg2_convert (decoder, mpeg2convert_rgb (MPEG2CONVERT_RGB,24), NULL); - else - mpeg2_convert (decoder, mpeg2convert_rgb (MPEG2CONVERT_BGR,32), NULL); break; case STATE_PICTURE: break; @@ -414,7 +332,7 @@ } } -int kDecMPEG2::decode (uint8_t * buf, uint8_t * end, int flags) +int kDecMPEG2::decode (uint8_t * buf, uint8_t * end, int ) { mutex.lock(); demux (buf,end,0); @@ -422,8 +340,6 @@ return 0; } kDecMPEG2::~kDecMPEG2(){ - m_display->wait(); - delete m_display; if (m_opened) mpeg2_close (decoder); } diff -Nru k9copy-2.1.0/src/mpeg2/kdecmpeg2.h k9copy-2.2.0/src/mpeg2/kdecmpeg2.h --- k9copy-2.1.0/src/mpeg2/kdecmpeg2.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/kdecmpeg2.h 2009-02-19 22:30:17.000000000 +0100 @@ -22,7 +22,7 @@ #define KDECMPEG2_H #include "k9common.h" #include "k9internalplayer.h" -#include "mpeg2.h" + #include #include #include @@ -32,6 +32,10 @@ #include #include #include + +extern "C" { +#include +} /** *@author */ @@ -39,24 +43,6 @@ class kDecMPEG2; class k9SaveImage; -class k9DisplayThread:public QThread { - -public: - k9DisplayThread(kDecMPEG2 *_dec) {m_dec=_dec;m_playing=false;m_buffer=NULL;} - ~k9DisplayThread() { if (m_buffer) delete[] m_buffer;} - void setImage(QImage _image); - void setRawImage(uchar *_buffer,int _width,int _height,int size); -protected: - kDecMPEG2 *m_dec; - uchar *m_buffer; - int m_size,m_width,m_height; - QImage m_image; - QMutex m_mutex; - bool m_raw; - bool m_playing; - void run(); - -}; class k9DecodeThread; @@ -72,16 +58,9 @@ void start(); void stop(); void pause(); - void draw(QImage *image) ; - void drawRaw(uchar *_buffer,int width,int height,int size); - void setUseGL(bool _value) {m_useGL = _value;} - void setSaveImage(k9SaveImage * _saveImage) {m_saveImage=_saveImage;} - void setPlayer(k9InternalPlayer* theValue) { m_player = theValue;} - private: - bool m_useGL; bool m_pause; k9DecodeThread *m_thread; QImage pix; @@ -91,18 +70,12 @@ int demux_track; QMutex mutex; mpeg2dec_t * decoder; - k9DisplayThread *m_display; - k9SaveImage *m_saveImage; - k9InternalPlayer *m_player; + int demux (uint8_t * buf, uint8_t * end, int flags); void save_ppm (int width, int height, uint8_t * buf, int num); void decode_mpeg2(uint8_t * current, uint8_t * end); void init(); void sync(); - signals: // Signals - /** No descriptions */ - void pixmapReady(QImage *image); - void ppmReady(uchar *buffer,int width,int height,int size); }; #endif diff -Nru k9copy-2.1.0/src/mpeg2/mmx.h k9copy-2.2.0/src/mpeg2/mmx.h --- k9copy-2.1.0/src/mpeg2/mmx.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/mmx.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,263 +0,0 @@ -/* - * mmx.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* - * The type of an value that fits in an MMX register (note that long - * long constant values MUST be suffixed by LL and unsigned long long - * values by ULL, lest they be truncated by the compiler) - */ - -typedef union { - long long q; /* Quadword (64-bit) value */ - unsigned long long uq; /* Unsigned Quadword */ - int d[2]; /* 2 Doubleword (32-bit) values */ - unsigned int ud[2]; /* 2 Unsigned Doubleword */ - short w[4]; /* 4 Word (16-bit) values */ - unsigned short uw[4]; /* 4 Unsigned Word */ - char b[8]; /* 8 Byte (8-bit) values */ - unsigned char ub[8]; /* 8 Unsigned Byte */ - float s[2]; /* Single-precision (32-bit) value */ -} ATTR_ALIGN(8) mmx_t; /* On an 8-byte (64-bit) boundary */ - - -#define mmx_i2r(op,imm,reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "i" (imm) ) - -#define mmx_m2r(op,mem,reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ - : /* nothing */ \ - : "m" (mem)) - -#define mmx_r2m(op,reg,mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ - : "=m" (mem) \ - : /* nothing */ ) - -#define mmx_r2r(op,regs,regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) - - -#define emms() __asm__ __volatile__ ("emms") - -#define movd_m2r(var,reg) mmx_m2r (movd, var, reg) -#define movd_r2m(reg,var) mmx_r2m (movd, reg, var) -#define movd_v2r(var,reg) __asm__ __volatile__ ("movd %0, %%" #reg \ - : /* nothing */ \ - : "rm" (var)) -#define movd_r2v(reg,var) __asm__ __volatile__ ("movd %%" #reg ", %0" \ - : "=rm" (var) \ - : /* nothing */ ) - -#define movq_m2r(var,reg) mmx_m2r (movq, var, reg) -#define movq_r2m(reg,var) mmx_r2m (movq, reg, var) -#define movq_r2r(regs,regd) mmx_r2r (movq, regs, regd) - -#define packssdw_m2r(var,reg) mmx_m2r (packssdw, var, reg) -#define packssdw_r2r(regs,regd) mmx_r2r (packssdw, regs, regd) -#define packsswb_m2r(var,reg) mmx_m2r (packsswb, var, reg) -#define packsswb_r2r(regs,regd) mmx_r2r (packsswb, regs, regd) - -#define packuswb_m2r(var,reg) mmx_m2r (packuswb, var, reg) -#define packuswb_r2r(regs,regd) mmx_r2r (packuswb, regs, regd) - -#define paddb_m2r(var,reg) mmx_m2r (paddb, var, reg) -#define paddb_r2r(regs,regd) mmx_r2r (paddb, regs, regd) -#define paddd_m2r(var,reg) mmx_m2r (paddd, var, reg) -#define paddd_r2r(regs,regd) mmx_r2r (paddd, regs, regd) -#define paddw_m2r(var,reg) mmx_m2r (paddw, var, reg) -#define paddw_r2r(regs,regd) mmx_r2r (paddw, regs, regd) - -#define paddsb_m2r(var,reg) mmx_m2r (paddsb, var, reg) -#define paddsb_r2r(regs,regd) mmx_r2r (paddsb, regs, regd) -#define paddsw_m2r(var,reg) mmx_m2r (paddsw, var, reg) -#define paddsw_r2r(regs,regd) mmx_r2r (paddsw, regs, regd) - -#define paddusb_m2r(var,reg) mmx_m2r (paddusb, var, reg) -#define paddusb_r2r(regs,regd) mmx_r2r (paddusb, regs, regd) -#define paddusw_m2r(var,reg) mmx_m2r (paddusw, var, reg) -#define paddusw_r2r(regs,regd) mmx_r2r (paddusw, regs, regd) - -#define pand_m2r(var,reg) mmx_m2r (pand, var, reg) -#define pand_r2r(regs,regd) mmx_r2r (pand, regs, regd) - -#define pandn_m2r(var,reg) mmx_m2r (pandn, var, reg) -#define pandn_r2r(regs,regd) mmx_r2r (pandn, regs, regd) - -#define pcmpeqb_m2r(var,reg) mmx_m2r (pcmpeqb, var, reg) -#define pcmpeqb_r2r(regs,regd) mmx_r2r (pcmpeqb, regs, regd) -#define pcmpeqd_m2r(var,reg) mmx_m2r (pcmpeqd, var, reg) -#define pcmpeqd_r2r(regs,regd) mmx_r2r (pcmpeqd, regs, regd) -#define pcmpeqw_m2r(var,reg) mmx_m2r (pcmpeqw, var, reg) -#define pcmpeqw_r2r(regs,regd) mmx_r2r (pcmpeqw, regs, regd) - -#define pcmpgtb_m2r(var,reg) mmx_m2r (pcmpgtb, var, reg) -#define pcmpgtb_r2r(regs,regd) mmx_r2r (pcmpgtb, regs, regd) -#define pcmpgtd_m2r(var,reg) mmx_m2r (pcmpgtd, var, reg) -#define pcmpgtd_r2r(regs,regd) mmx_r2r (pcmpgtd, regs, regd) -#define pcmpgtw_m2r(var,reg) mmx_m2r (pcmpgtw, var, reg) -#define pcmpgtw_r2r(regs,regd) mmx_r2r (pcmpgtw, regs, regd) - -#define pmaddwd_m2r(var,reg) mmx_m2r (pmaddwd, var, reg) -#define pmaddwd_r2r(regs,regd) mmx_r2r (pmaddwd, regs, regd) - -#define pmulhw_m2r(var,reg) mmx_m2r (pmulhw, var, reg) -#define pmulhw_r2r(regs,regd) mmx_r2r (pmulhw, regs, regd) - -#define pmullw_m2r(var,reg) mmx_m2r (pmullw, var, reg) -#define pmullw_r2r(regs,regd) mmx_r2r (pmullw, regs, regd) - -#define por_m2r(var,reg) mmx_m2r (por, var, reg) -#define por_r2r(regs,regd) mmx_r2r (por, regs, regd) - -#define pslld_i2r(imm,reg) mmx_i2r (pslld, imm, reg) -#define pslld_m2r(var,reg) mmx_m2r (pslld, var, reg) -#define pslld_r2r(regs,regd) mmx_r2r (pslld, regs, regd) -#define psllq_i2r(imm,reg) mmx_i2r (psllq, imm, reg) -#define psllq_m2r(var,reg) mmx_m2r (psllq, var, reg) -#define psllq_r2r(regs,regd) mmx_r2r (psllq, regs, regd) -#define psllw_i2r(imm,reg) mmx_i2r (psllw, imm, reg) -#define psllw_m2r(var,reg) mmx_m2r (psllw, var, reg) -#define psllw_r2r(regs,regd) mmx_r2r (psllw, regs, regd) - -#define psrad_i2r(imm,reg) mmx_i2r (psrad, imm, reg) -#define psrad_m2r(var,reg) mmx_m2r (psrad, var, reg) -#define psrad_r2r(regs,regd) mmx_r2r (psrad, regs, regd) -#define psraw_i2r(imm,reg) mmx_i2r (psraw, imm, reg) -#define psraw_m2r(var,reg) mmx_m2r (psraw, var, reg) -#define psraw_r2r(regs,regd) mmx_r2r (psraw, regs, regd) - -#define psrld_i2r(imm,reg) mmx_i2r (psrld, imm, reg) -#define psrld_m2r(var,reg) mmx_m2r (psrld, var, reg) -#define psrld_r2r(regs,regd) mmx_r2r (psrld, regs, regd) -#define psrlq_i2r(imm,reg) mmx_i2r (psrlq, imm, reg) -#define psrlq_m2r(var,reg) mmx_m2r (psrlq, var, reg) -#define psrlq_r2r(regs,regd) mmx_r2r (psrlq, regs, regd) -#define psrlw_i2r(imm,reg) mmx_i2r (psrlw, imm, reg) -#define psrlw_m2r(var,reg) mmx_m2r (psrlw, var, reg) -#define psrlw_r2r(regs,regd) mmx_r2r (psrlw, regs, regd) - -#define psubb_m2r(var,reg) mmx_m2r (psubb, var, reg) -#define psubb_r2r(regs,regd) mmx_r2r (psubb, regs, regd) -#define psubd_m2r(var,reg) mmx_m2r (psubd, var, reg) -#define psubd_r2r(regs,regd) mmx_r2r (psubd, regs, regd) -#define psubw_m2r(var,reg) mmx_m2r (psubw, var, reg) -#define psubw_r2r(regs,regd) mmx_r2r (psubw, regs, regd) - -#define psubsb_m2r(var,reg) mmx_m2r (psubsb, var, reg) -#define psubsb_r2r(regs,regd) mmx_r2r (psubsb, regs, regd) -#define psubsw_m2r(var,reg) mmx_m2r (psubsw, var, reg) -#define psubsw_r2r(regs,regd) mmx_r2r (psubsw, regs, regd) - -#define psubusb_m2r(var,reg) mmx_m2r (psubusb, var, reg) -#define psubusb_r2r(regs,regd) mmx_r2r (psubusb, regs, regd) -#define psubusw_m2r(var,reg) mmx_m2r (psubusw, var, reg) -#define psubusw_r2r(regs,regd) mmx_r2r (psubusw, regs, regd) - -#define punpckhbw_m2r(var,reg) mmx_m2r (punpckhbw, var, reg) -#define punpckhbw_r2r(regs,regd) mmx_r2r (punpckhbw, regs, regd) -#define punpckhdq_m2r(var,reg) mmx_m2r (punpckhdq, var, reg) -#define punpckhdq_r2r(regs,regd) mmx_r2r (punpckhdq, regs, regd) -#define punpckhwd_m2r(var,reg) mmx_m2r (punpckhwd, var, reg) -#define punpckhwd_r2r(regs,regd) mmx_r2r (punpckhwd, regs, regd) - -#define punpcklbw_m2r(var,reg) mmx_m2r (punpcklbw, var, reg) -#define punpcklbw_r2r(regs,regd) mmx_r2r (punpcklbw, regs, regd) -#define punpckldq_m2r(var,reg) mmx_m2r (punpckldq, var, reg) -#define punpckldq_r2r(regs,regd) mmx_r2r (punpckldq, regs, regd) -#define punpcklwd_m2r(var,reg) mmx_m2r (punpcklwd, var, reg) -#define punpcklwd_r2r(regs,regd) mmx_r2r (punpcklwd, regs, regd) - -#define pxor_m2r(var,reg) mmx_m2r (pxor, var, reg) -#define pxor_r2r(regs,regd) mmx_r2r (pxor, regs, regd) - - -/* 3DNOW extensions */ - -#define pavgusb_m2r(var,reg) mmx_m2r (pavgusb, var, reg) -#define pavgusb_r2r(regs,regd) mmx_r2r (pavgusb, regs, regd) - - -/* AMD MMX extensions - also available in intel SSE */ - - -#define mmx_m2ri(op,mem,reg,imm) \ - __asm__ __volatile__ (#op " %1, %0, %%" #reg \ - : /* nothing */ \ - : "m" (mem), "i" (imm)) - -#define mmx_r2ri(op,regs,regd,imm) \ - __asm__ __volatile__ (#op " %0, %%" #regs ", %%" #regd \ - : /* nothing */ \ - : "i" (imm) ) - -#define mmx_fetch(mem,hint) \ - __asm__ __volatile__ ("prefetch" #hint " %0" \ - : /* nothing */ \ - : "m" (mem)) - - -#define maskmovq(regs,maskreg) mmx_r2ri (maskmovq, regs, maskreg) - -#define movntq_r2m(mmreg,var) mmx_r2m (movntq, mmreg, var) - -#define pavgb_m2r(var,reg) mmx_m2r (pavgb, var, reg) -#define pavgb_r2r(regs,regd) mmx_r2r (pavgb, regs, regd) -#define pavgw_m2r(var,reg) mmx_m2r (pavgw, var, reg) -#define pavgw_r2r(regs,regd) mmx_r2r (pavgw, regs, regd) - -#define pextrw_r2r(mmreg,reg,imm) mmx_r2ri (pextrw, mmreg, reg, imm) - -#define pinsrw_r2r(reg,mmreg,imm) mmx_r2ri (pinsrw, reg, mmreg, imm) - -#define pmaxsw_m2r(var,reg) mmx_m2r (pmaxsw, var, reg) -#define pmaxsw_r2r(regs,regd) mmx_r2r (pmaxsw, regs, regd) - -#define pmaxub_m2r(var,reg) mmx_m2r (pmaxub, var, reg) -#define pmaxub_r2r(regs,regd) mmx_r2r (pmaxub, regs, regd) - -#define pminsw_m2r(var,reg) mmx_m2r (pminsw, var, reg) -#define pminsw_r2r(regs,regd) mmx_r2r (pminsw, regs, regd) - -#define pminub_m2r(var,reg) mmx_m2r (pminub, var, reg) -#define pminub_r2r(regs,regd) mmx_r2r (pminub, regs, regd) - -#define pmovmskb(mmreg,reg) \ - __asm__ __volatile__ ("movmskps %" #mmreg ", %" #reg) - -#define pmulhuw_m2r(var,reg) mmx_m2r (pmulhuw, var, reg) -#define pmulhuw_r2r(regs,regd) mmx_r2r (pmulhuw, regs, regd) - -#define prefetcht0(mem) mmx_fetch (mem, t0) -#define prefetcht1(mem) mmx_fetch (mem, t1) -#define prefetcht2(mem) mmx_fetch (mem, t2) -#define prefetchnta(mem) mmx_fetch (mem, nta) - -#define psadbw_m2r(var,reg) mmx_m2r (psadbw, var, reg) -#define psadbw_r2r(regs,regd) mmx_r2r (psadbw, regs, regd) - -#define pshufw_m2r(var,reg,imm) mmx_m2ri(pshufw, var, reg, imm) -#define pshufw_r2r(regs,regd,imm) mmx_r2ri(pshufw, regs, regd, imm) - -#define sfence() __asm__ __volatile__ ("sfence\n\t") diff -Nru k9copy-2.1.0/src/mpeg2/motion_comp_alpha.cpp k9copy-2.2.0/src/mpeg2/motion_comp_alpha.cpp --- k9copy-2.1.0/src/mpeg2/motion_comp_alpha.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/motion_comp_alpha.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,253 +0,0 @@ -/* - * motion_comp_alpha.c - * Copyright (C) 2002-2003 Falk Hueffner - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_ALPHA - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#include "alpha_asm.h" - -static inline uint64_t avg2 (uint64_t a, uint64_t b) -{ - return (a | b) - (((a ^ b) & BYTE_VEC (0xfe)) >> 1); -} - -// Load two unaligned quadwords from addr. This macro only works if -// addr is actually unaligned. -#define ULOAD16(ret_l,ret_r,addr) \ - do { \ - uint64_t _l = ldq_u (addr + 0); \ - uint64_t _m = ldq_u (addr + 8); \ - uint64_t _r = ldq_u (addr + 16); \ - ret_l = extql (_l, addr) | extqh (_m, addr); \ - ret_r = extql (_m, addr) | extqh (_r, addr); \ - } while (0) - -// Load two aligned quadwords from addr. -#define ALOAD16(ret_l,ret_r,addr) \ - do { \ - ret_l = ldq (addr); \ - ret_r = ldq (addr + 8); \ - } while (0) - -#define OP8(LOAD,LOAD16,STORE) \ - do { \ - STORE (LOAD (pixels), block); \ - pixels += line_size; \ - block += line_size; \ - } while (--h) - -#define OP16(LOAD,LOAD16,STORE) \ - do { \ - uint64_t l, r; \ - LOAD16 (l, r, pixels); \ - STORE (l, block); \ - STORE (r, block + 8); \ - pixels += line_size; \ - block += line_size; \ - } while (--h) - -#define OP8_X2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t p0, p1; \ - \ - p0 = LOAD (pixels); \ - p1 = p0 >> 8 | ((uint64_t) pixels[8] << 56); \ - STORE (avg2 (p0, p1), block); \ - pixels += line_size; \ - block += line_size; \ - } while (--h) - -#define OP16_X2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t p0, p1; \ - \ - LOAD16 (p0, p1, pixels); \ - STORE (avg2(p0, p0 >> 8 | p1 << 56), block); \ - STORE (avg2(p1, p1 >> 8 | (uint64_t) pixels[16] << 56), \ - block + 8); \ - pixels += line_size; \ - block += line_size; \ - } while (--h) - -#define OP8_Y2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t p0, p1; \ - p0 = LOAD (pixels); \ - pixels += line_size; \ - p1 = LOAD (pixels); \ - do { \ - uint64_t av = avg2 (p0, p1); \ - if (--h == 0) line_size = 0; \ - pixels += line_size; \ - p0 = p1; \ - p1 = LOAD (pixels); \ - STORE (av, block); \ - block += line_size; \ - } while (h); \ - } while (0) - -#define OP16_Y2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t p0l, p0r, p1l, p1r; \ - LOAD16 (p0l, p0r, pixels); \ - pixels += line_size; \ - LOAD16 (p1l, p1r, pixels); \ - do { \ - uint64_t avl, avr; \ - if (--h == 0) line_size = 0; \ - avl = avg2 (p0l, p1l); \ - avr = avg2 (p0r, p1r); \ - p0l = p1l; \ - p0r = p1r; \ - pixels += line_size; \ - LOAD16 (p1l, p1r, pixels); \ - STORE (avl, block); \ - STORE (avr, block + 8); \ - block += line_size; \ - } while (h); \ - } while (0) - -#define OP8_XY2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t pl, ph; \ - uint64_t p1 = LOAD (pixels); \ - uint64_t p2 = p1 >> 8 | ((uint64_t) pixels[8] << 56); \ - \ - ph = (((p1 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p2 & ~BYTE_VEC (0x03)) >> 2)); \ - pl = ((p1 & BYTE_VEC (0x03)) + \ - (p2 & BYTE_VEC (0x03))); \ - \ - do { \ - uint64_t npl, nph; \ - \ - pixels += line_size; \ - p1 = LOAD (pixels); \ - p2 = (p1 >> 8) | ((uint64_t) pixels[8] << 56); \ - nph = (((p1 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p2 & ~BYTE_VEC (0x03)) >> 2)); \ - npl = ((p1 & BYTE_VEC (0x03)) + \ - (p2 & BYTE_VEC (0x03))); \ - \ - STORE (ph + nph + \ - (((pl + npl + BYTE_VEC (0x02)) >> 2) & \ - BYTE_VEC (0x03)), block); \ - \ - block += line_size; \ - pl = npl; \ - ph = nph; \ - } while (--h); \ - } while (0) - -#define OP16_XY2(LOAD,LOAD16,STORE) \ - do { \ - uint64_t p0, p1, p2, p3, pl_l, ph_l, pl_r, ph_r; \ - LOAD16 (p0, p2, pixels); \ - p1 = p0 >> 8 | (p2 << 56); \ - p3 = p2 >> 8 | ((uint64_t)pixels[16] << 56); \ - \ - ph_l = (((p0 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p1 & ~BYTE_VEC (0x03)) >> 2)); \ - pl_l = ((p0 & BYTE_VEC (0x03)) + \ - (p1 & BYTE_VEC(0x03))); \ - ph_r = (((p2 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p3 & ~BYTE_VEC (0x03)) >> 2)); \ - pl_r = ((p2 & BYTE_VEC (0x03)) + \ - (p3 & BYTE_VEC (0x03))); \ - \ - do { \ - uint64_t npl_l, nph_l, npl_r, nph_r; \ - \ - pixels += line_size; \ - LOAD16 (p0, p2, pixels); \ - p1 = p0 >> 8 | (p2 << 56); \ - p3 = p2 >> 8 | ((uint64_t)pixels[16] << 56); \ - nph_l = (((p0 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p1 & ~BYTE_VEC (0x03)) >> 2)); \ - npl_l = ((p0 & BYTE_VEC (0x03)) + \ - (p1 & BYTE_VEC (0x03))); \ - nph_r = (((p2 & ~BYTE_VEC (0x03)) >> 2) + \ - ((p3 & ~BYTE_VEC (0x03)) >> 2)); \ - npl_r = ((p2 & BYTE_VEC (0x03)) + \ - (p3 & BYTE_VEC (0x03))); \ - \ - STORE (ph_l + nph_l + \ - (((pl_l + npl_l + BYTE_VEC (0x02)) >> 2) & \ - BYTE_VEC(0x03)), block); \ - STORE (ph_r + nph_r + \ - (((pl_r + npl_r + BYTE_VEC (0x02)) >> 2) & \ - BYTE_VEC(0x03)), block + 8); \ - \ - block += line_size; \ - pl_l = npl_l; \ - ph_l = nph_l; \ - pl_r = npl_r; \ - ph_r = nph_r; \ - } while (--h); \ - } while (0) - -#define MAKE_OP(OPNAME,SIZE,SUFF,OPKIND,STORE) \ -static void MC_ ## OPNAME ## _ ## SUFF ## _ ## SIZE ## _alpha \ - (uint8_t *restrict block, const uint8_t *restrict pixels, \ - int line_size, int h) \ -{ \ - if ((uint64_t) pixels & 0x7) { \ - OPKIND (uldq, ULOAD16, STORE); \ - } else { \ - OPKIND (ldq, ALOAD16, STORE); \ - } \ -} - -#define PIXOP(OPNAME,STORE) \ - MAKE_OP (OPNAME, 8, o, OP8, STORE); \ - MAKE_OP (OPNAME, 8, x, OP8_X2, STORE); \ - MAKE_OP (OPNAME, 8, y, OP8_Y2, STORE); \ - MAKE_OP (OPNAME, 8, xy, OP8_XY2, STORE); \ - MAKE_OP (OPNAME, 16, o, OP16, STORE); \ - MAKE_OP (OPNAME, 16, x, OP16_X2, STORE); \ - MAKE_OP (OPNAME, 16, y, OP16_Y2, STORE); \ - MAKE_OP (OPNAME, 16, xy, OP16_XY2, STORE); - -#define STORE(l,b) stq (l, b) -PIXOP (put, STORE); -#undef STORE -#define STORE(l,b) stq (avg2 (l, ldq (b)), b); -PIXOP (avg, STORE); - -mpeg2_mc_t mpeg2_mc_alpha = { - { MC_put_o_16_alpha, MC_put_x_16_alpha, - MC_put_y_16_alpha, MC_put_xy_16_alpha, - MC_put_o_8_alpha, MC_put_x_8_alpha, - MC_put_y_8_alpha, MC_put_xy_8_alpha }, - { MC_avg_o_16_alpha, MC_avg_x_16_alpha, - MC_avg_y_16_alpha, MC_avg_xy_16_alpha, - MC_avg_o_8_alpha, MC_avg_x_8_alpha, - MC_avg_y_8_alpha, MC_avg_xy_8_alpha } -}; - -#endif diff -Nru k9copy-2.1.0/src/mpeg2/motion_comp_altivec.cpp k9copy-2.2.0/src/mpeg2/motion_comp_altivec.cpp --- k9copy-2.1.0/src/mpeg2/motion_comp_altivec.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/motion_comp_altivec.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1010 +0,0 @@ -/* - * motion_comp_altivec.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_PPC - -#ifdef HAVE_ALTIVEC_H -#include -#endif -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -typedef vector signed char vector_s8_t; -typedef vector unsigned char vector_u8_t; -typedef vector signed short vector_s16_t; -typedef vector unsigned short vector_u16_t; -typedef vector signed int vector_s32_t; -typedef vector unsigned int vector_u32_t; - -#ifndef COFFEE_BREAK /* Workarounds for gcc suckage */ - -static inline vector_u8_t my_vec_ld (int const A, const uint8_t * const B) -{ - return vec_ld (A, (uint8_t *)B); -} -#undef vec_ld -#define vec_ld my_vec_ld - -static inline vector_u8_t my_vec_and (vector_u8_t const A, vector_u8_t const B) -{ - return vec_and (A, B); -} -#undef vec_and -#define vec_and my_vec_and - -static inline vector_u8_t my_vec_avg (vector_u8_t const A, vector_u8_t const B) -{ - return vec_avg (A, B); -} -#undef vec_avg -#define vec_avg my_vec_avg - -#endif - -static void MC_put_o_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm, ref0, ref1, tmp; - - perm = vec_lvsl (0, ref); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - tmp = vec_perm (ref0, ref1, perm); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - vec_st (tmp, 0, dest); - tmp = vec_perm (ref0, ref1, perm); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp = vec_perm (ref0, ref1, perm); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - vec_st (tmp, 0, dest); - tmp = vec_perm (ref0, ref1, perm); - vec_st (tmp, stride, dest); -} - -static void MC_put_o_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0, perm1, tmp0, tmp1, ref0, ref1; - - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0 = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1 = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_perm (ref0, ref1, perm1); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_perm (ref0, ref1, perm1); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); -} - -static void MC_put_x_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t permA, permB, ref0, ref1, tmp; - - permA = vec_lvsl (0, ref); - permB = vec_add (permA, vec_splat_u8 (1)); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - tmp = vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - vec_st (tmp, 0, dest); - tmp = vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp = vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - vec_st (tmp, 0, dest); - tmp = vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB)); - vec_st (tmp, stride, dest); -} - -static void MC_put_x_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0A, perm0B, perm1A, perm1B, ones, tmp0, tmp1, ref0, ref1; - - ones = vec_splat_u8 (1); - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0A = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - perm0B = vec_add (perm0A, ones); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1A = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - perm1B = vec_add (perm1A, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - tmp0 = vec_avg (vec_perm (ref0, ref1, perm0A), - vec_perm (ref0, ref1, perm0B)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (vec_perm (ref0, ref1, perm1A), - vec_perm (ref0, ref1, perm1B)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_avg (vec_perm (ref0, ref1, perm0A), - vec_perm (ref0, ref1, perm0B)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (vec_perm (ref0, ref1, perm1A), - vec_perm (ref0, ref1, perm1B)); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); -} - -static void MC_put_y_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm, ref0, ref1, tmp0, tmp1, tmp; - - perm = vec_lvsl (0, ref); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - tmp0 = vec_perm (ref0, ref1, perm); - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - tmp1 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (tmp0, tmp1); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - vec_st (tmp, 0, dest); - tmp0 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (tmp0, tmp1); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp1 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (tmp0, tmp1); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - vec_st (tmp, 0, dest); - tmp0 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (tmp0, tmp1); - vec_st (tmp, stride, dest); -} - -static void MC_put_y_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0, perm1, tmp0, tmp1, tmp, ref0, ref1; - - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0 = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1 = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - tmp1 = vec_perm (ref0, ref1, perm1); - tmp = vec_avg (tmp0, tmp1); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - tmp = vec_avg (tmp0, tmp1); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_perm (ref0, ref1, perm1); - tmp = vec_avg (tmp0, tmp1); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - tmp = vec_avg (tmp0, tmp1); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); -} - -static void MC_put_xy_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t permA, permB, ref0, ref1, A, B, avg0, avg1, xor0, xor1, tmp; - vector_u8_t ones; - - ones = vec_splat_u8 (1); - permA = vec_lvsl (0, ref); - permB = vec_add (permA, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - vec_st (tmp, 0, dest); - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - vec_st (tmp, stride, dest); - dest += 2*stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - vec_st (tmp, 0, dest); - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - vec_st (tmp, stride, dest); -} - -static void MC_put_xy_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0A, perm0B, perm1A, perm1B, ref0, ref1, A, B; - vector_u8_t avg0, avg1, xor0, xor1, tmp, ones; - - ones = vec_splat_u8 (1); - perm0A = vec_lvsl (0, ref); - perm0A = vec_mergeh (perm0A, perm0A); - perm0A = vec_pack ((vector_u16_t)perm0A, (vector_u16_t)perm0A); - perm0B = vec_add (perm0A, ones); - perm1A = vec_lvsl (stride, ref); - perm1A = vec_mergeh (perm1A, perm1A); - perm1A = vec_pack ((vector_u16_t)perm1A, (vector_u16_t)perm1A); - perm1B = vec_add (perm1A, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - A = vec_perm (ref0, ref1, perm1A); - B = vec_perm (ref0, ref1, perm1B); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm1A); - B = vec_perm (ref0, ref1, perm1B); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1))); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); -} - -#if 0 -static void MC_put_xy_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t permA, permB, ref0, ref1, A, B, C, D, tmp, zero, ones; - vector_u16_t splat2, temp; - - ones = vec_splat_u8 (1); - permA = vec_lvsl (0, ref); - permB = vec_add (permA, ones); - - zero = vec_splat_u8 (0); - splat2 = vec_splat_u16 (2); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - C = vec_perm (ref0, ref1, permA); - D = vec_perm (ref0, ref1, permB); - - temp = vec_add (vec_add ((vector_u16_t)vec_mergeh (zero, A), - (vector_u16_t)vec_mergeh (zero, B)), - vec_add ((vector_u16_t)vec_mergeh (zero, C), - (vector_u16_t)vec_mergeh (zero, D))); - temp = vec_sr (vec_add (temp, splat2), splat2); - tmp = vec_pack (temp, temp); - - vec_st (tmp, 0, dest); - dest += stride; - tmp = vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB)); - } while (--height); -} -#endif - -static void MC_avg_o_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm, ref0, ref1, tmp, prev; - - perm = vec_lvsl (0, ref); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (0, dest); - tmp = vec_avg (prev, vec_perm (ref0, ref1, perm)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp = vec_avg (prev, vec_perm (ref0, ref1, perm)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (2*stride, dest); - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp = vec_avg (prev, vec_perm (ref0, ref1, perm)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp = vec_avg (prev, vec_perm (ref0, ref1, perm)); - vec_st (tmp, stride, dest); -} - -static void MC_avg_o_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0, perm1, tmp0, tmp1, ref0, ref1, prev; - - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0 = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1 = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (0, dest); - tmp0 = vec_avg (prev, vec_perm (ref0, ref1, perm0)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (prev, vec_perm (ref0, ref1, perm1)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_avg (prev, vec_perm (ref0, ref1, perm0)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (prev, vec_perm (ref0, ref1, perm1)); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); -} - -static void MC_avg_x_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t permA, permB, ref0, ref1, tmp, prev; - - permA = vec_lvsl (0, ref); - permB = vec_add (permA, vec_splat_u8 (1)); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - prev = vec_ld (0, dest); - ref += stride; - tmp = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - prev = vec_ld (2*stride, dest); - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, permA), - vec_perm (ref0, ref1, permB))); - vec_st (tmp, stride, dest); -} - -static void MC_avg_x_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0A, perm0B, perm1A, perm1B, ones, tmp0, tmp1, ref0, ref1; - vector_u8_t prev; - - ones = vec_splat_u8 (1); - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0A = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - perm0B = vec_add (perm0A, ones); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1A = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - perm1B = vec_add (perm1A, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - prev = vec_ld (0, dest); - ref += stride; - tmp0 = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, perm0A), - vec_perm (ref0, ref1, perm0B))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, perm1A), - vec_perm (ref0, ref1, perm1B))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, perm0A), - vec_perm (ref0, ref1, perm0B))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp0, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp0, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_avg (prev, vec_avg (vec_perm (ref0, ref1, perm1A), - vec_perm (ref0, ref1, perm1B))); - vec_ste ((vector_u32_t)tmp1, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp1, 4, (unsigned int *)dest); -} - -static void MC_avg_y_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm, ref0, ref1, tmp0, tmp1, tmp, prev; - - perm = vec_lvsl (0, ref); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - tmp0 = vec_perm (ref0, ref1, perm); - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (0, dest); - tmp1 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp0 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - ref += stride; - prev = vec_ld (2*stride, dest); - vec_st (tmp, stride, dest); - dest += 2*stride; - tmp1 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (15, ref); - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - tmp0 = vec_perm (ref0, ref1, perm); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - vec_st (tmp, stride, dest); -} - -static void MC_avg_y_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0, perm1, tmp0, tmp1, tmp, ref0, ref1, prev; - - tmp0 = vec_lvsl (0, ref); - tmp0 = vec_mergeh (tmp0, tmp0); - perm0 = vec_pack ((vector_u16_t)tmp0, (vector_u16_t)tmp0); - tmp1 = vec_lvsl (stride, ref); - tmp1 = vec_mergeh (tmp1, tmp1); - perm1 = vec_pack ((vector_u16_t)tmp1, (vector_u16_t)tmp1); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (0, dest); - tmp1 = vec_perm (ref0, ref1, perm1); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp1 = vec_perm (ref0, ref1, perm1); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (7, ref); - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - tmp0 = vec_perm (ref0, ref1, perm0); - tmp = vec_avg (prev, vec_avg (tmp0, tmp1)); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); -} - -static void MC_avg_xy_16_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t permA, permB, ref0, ref1, A, B, avg0, avg1, xor0, xor1, tmp; - vector_u8_t ones, prev; - - ones = vec_splat_u8 (1); - permA = vec_lvsl (0, ref); - permB = vec_add (permA, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - prev = vec_ld (0, dest); - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_avg (prev, vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_avg (prev, - vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - ref += stride; - prev = vec_ld (2*stride, dest); - vec_st (tmp, stride, dest); - dest += 2*stride; - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_avg (prev, - vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (16, ref); - prev = vec_ld (stride, dest); - vec_st (tmp, 0, dest); - A = vec_perm (ref0, ref1, permA); - B = vec_perm (ref0, ref1, permB); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_avg (prev, vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - vec_st (tmp, stride, dest); -} - -static void MC_avg_xy_8_altivec (uint8_t * dest, const uint8_t * ref, - const int stride, int height) -{ - vector_u8_t perm0A, perm0B, perm1A, perm1B, ref0, ref1, A, B; - vector_u8_t avg0, avg1, xor0, xor1, tmp, ones, prev; - - ones = vec_splat_u8 (1); - perm0A = vec_lvsl (0, ref); - perm0A = vec_mergeh (perm0A, perm0A); - perm0A = vec_pack ((vector_u16_t)perm0A, (vector_u16_t)perm0A); - perm0B = vec_add (perm0A, ones); - perm1A = vec_lvsl (stride, ref); - perm1A = vec_mergeh (perm1A, perm1A); - perm1A = vec_pack ((vector_u16_t)perm1A, (vector_u16_t)perm1A); - perm1B = vec_add (perm1A, ones); - - height = (height >> 1) - 1; - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - prev = vec_ld (0, dest); - A = vec_perm (ref0, ref1, perm1A); - B = vec_perm (ref0, ref1, perm1B); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_avg (prev, vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - - do { - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_avg (prev, - vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - ref += stride; - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm1A); - B = vec_perm (ref0, ref1, perm1B); - avg1 = vec_avg (A, B); - xor1 = vec_xor (A, B); - tmp = vec_avg (prev, - vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - } while (--height); - - ref0 = vec_ld (0, ref); - ref1 = vec_ld (8, ref); - prev = vec_ld (stride, dest); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); - dest += stride; - A = vec_perm (ref0, ref1, perm0A); - B = vec_perm (ref0, ref1, perm0B); - avg0 = vec_avg (A, B); - xor0 = vec_xor (A, B); - tmp = vec_avg (prev, vec_sub (vec_avg (avg0, avg1), - vec_and (vec_and (ones, vec_or (xor0, xor1)), - vec_xor (avg0, avg1)))); - vec_ste ((vector_u32_t)tmp, 0, (unsigned int *)dest); - vec_ste ((vector_u32_t)tmp, 4, (unsigned int *)dest); -} - -MPEG2_MC_EXTERN (altivec) - -#endif diff -Nru k9copy-2.1.0/src/mpeg2/motion_comp.cpp k9copy-2.2.0/src/mpeg2/motion_comp.cpp --- k9copy-2.1.0/src/mpeg2/motion_comp.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/motion_comp.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,130 +0,0 @@ -/* - * motion_comp.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -mpeg2_mc_t mpeg2_mc; - -void mpeg2_mc_init (uint32_t accel) -{ -#ifdef ARCH_X86 - if (accel & MPEG2_ACCEL_X86_MMXEXT) - mpeg2_mc = mpeg2_mc_mmxext; - else if (accel & MPEG2_ACCEL_X86_3DNOW) - mpeg2_mc = mpeg2_mc_3dnow; - else if (accel & MPEG2_ACCEL_X86_MMX) - mpeg2_mc = mpeg2_mc_mmx; - else -#endif -#ifdef ARCH_PPC - if (accel & MPEG2_ACCEL_PPC_ALTIVEC) - mpeg2_mc = mpeg2_mc_altivec; - else -#endif -#ifdef ARCH_ALPHA - if (accel & MPEG2_ACCEL_ALPHA) - mpeg2_mc = mpeg2_mc_alpha; - else -#endif -#ifdef ARCH_SPARC - if (accel & MPEG2_ACCEL_SPARC_VIS) - mpeg2_mc = mpeg2_mc_vis; - else -#endif - mpeg2_mc = mpeg2_mc_c; -} - -#define avg2(a,b) ((a+b+1)>>1) -#define avg4(a,b,c,d) ((a+b+c+d+2)>>2) - -#define predict_o(i) (ref[i]) -#define predict_x(i) (avg2 (ref[i], ref[i+1])) -#define predict_y(i) (avg2 (ref[i], (ref+stride)[i])) -#define predict_xy(i) (avg4 (ref[i], ref[i+1], \ - (ref+stride)[i], (ref+stride)[i+1])) - -#define put(predictor,i) dest[i] = predictor (i) -#define avg(predictor,i) dest[i] = avg2 (predictor (i), dest[i]) - -/* mc function template */ - -#define MC_FUNC(op,xy) \ -static void MC_##op##_##xy##_16_c (uint8_t * dest, const uint8_t * ref, \ - const int stride, int height) \ -{ \ - do { \ - op (predict_##xy, 0); \ - op (predict_##xy, 1); \ - op (predict_##xy, 2); \ - op (predict_##xy, 3); \ - op (predict_##xy, 4); \ - op (predict_##xy, 5); \ - op (predict_##xy, 6); \ - op (predict_##xy, 7); \ - op (predict_##xy, 8); \ - op (predict_##xy, 9); \ - op (predict_##xy, 10); \ - op (predict_##xy, 11); \ - op (predict_##xy, 12); \ - op (predict_##xy, 13); \ - op (predict_##xy, 14); \ - op (predict_##xy, 15); \ - ref += stride; \ - dest += stride; \ - } while (--height); \ -} \ -static void MC_##op##_##xy##_8_c (uint8_t * dest, const uint8_t * ref, \ - const int stride, int height) \ -{ \ - do { \ - op (predict_##xy, 0); \ - op (predict_##xy, 1); \ - op (predict_##xy, 2); \ - op (predict_##xy, 3); \ - op (predict_##xy, 4); \ - op (predict_##xy, 5); \ - op (predict_##xy, 6); \ - op (predict_##xy, 7); \ - ref += stride; \ - dest += stride; \ - } while (--height); \ -} - -/* definitions of the actual mc functions */ - -MC_FUNC (put,o) -MC_FUNC (avg,o) -MC_FUNC (put,x) -MC_FUNC (avg,x) -MC_FUNC (put,y) -MC_FUNC (avg,y) -MC_FUNC (put,xy) -MC_FUNC (avg,xy) - -MPEG2_MC_EXTERN (c) diff -Nru k9copy-2.1.0/src/mpeg2/motion_comp_mmx.cpp k9copy-2.2.0/src/mpeg2/motion_comp_mmx.cpp --- k9copy-2.1.0/src/mpeg2/motion_comp_mmx.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/motion_comp_mmx.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,1005 +0,0 @@ -/* - * motion_comp_mmx.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_X86 - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#include "mmx.h" - -#define CPU_MMXEXT 0 -#define CPU_3DNOW 1 - - -/* MMX code - needs a rewrite */ - -/* - * Motion Compensation frequently needs to average values using the - * formula (x+y+1)>>1. Both MMXEXT and 3Dnow include one instruction - * to compute this, but it's been left out of classic MMX. - * - * We need to be careful of overflows when doing this computation. - * Rather than unpacking data to 16-bits, which reduces parallelism, - * we use the following formulas: - * - * (x+y)>>1 == (x&y)+((x^y)>>1) - * (x+y+1)>>1 == (x|y)-((x^y)>>1) - */ - -/* some rounding constants */ -static mmx_t mask1 = {0xfefefefefefefefeLL}; -static mmx_t round4 = {0x0002000200020002LL}; - -/* - * This code should probably be compiled with loop unrolling - * (ie, -funroll-loops in gcc)becuase some of the loops - * use a small static number of iterations. This was written - * with the assumption the compiler knows best about when - * unrolling will help - */ - -static inline void mmx_zero_reg () -{ - /* load 0 into mm0 */ - pxor_r2r (mm0, mm0); -} - -static inline void mmx_average_2_U8 (uint8_t * dest, const uint8_t * src1, - const uint8_t * src2) -{ - /* *dest = (*src1 + *src2 + 1)/ 2; */ - - movq_m2r (*src1, mm1); /* load 8 src1 bytes */ - movq_r2r (mm1, mm2); /* copy 8 src1 bytes */ - - movq_m2r (*src2, mm3); /* load 8 src2 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src2 bytes */ - - pxor_r2r (mm1, mm3); /* xor src1 and src2 */ - pand_m2r (mask1, mm3); /* mask lower bits */ - psrlq_i2r (1, mm3); /* /2 */ - por_r2r (mm2, mm4); /* or src1 and src2 */ - psubb_r2r (mm3, mm4); /* subtract subresults */ - movq_r2m (mm4, *dest); /* store result in dest */ -} - -static inline void mmx_interp_average_2_U8 (uint8_t * dest, - const uint8_t * src1, - const uint8_t * src2) -{ - /* *dest = (*dest + (*src1 + *src2 + 1)/ 2 + 1)/ 2; */ - - movq_m2r (*dest, mm1); /* load 8 dest bytes */ - movq_r2r (mm1, mm2); /* copy 8 dest bytes */ - - movq_m2r (*src1, mm3); /* load 8 src1 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src1 bytes */ - - movq_m2r (*src2, mm5); /* load 8 src2 bytes */ - movq_r2r (mm5, mm6); /* copy 8 src2 bytes */ - - pxor_r2r (mm3, mm5); /* xor src1 and src2 */ - pand_m2r (mask1, mm5); /* mask lower bits */ - psrlq_i2r (1, mm5); /* /2 */ - por_r2r (mm4, mm6); /* or src1 and src2 */ - psubb_r2r (mm5, mm6); /* subtract subresults */ - movq_r2r (mm6, mm5); /* copy subresult */ - - pxor_r2r (mm1, mm5); /* xor srcavg and dest */ - pand_m2r (mask1, mm5); /* mask lower bits */ - psrlq_i2r (1, mm5); /* /2 */ - por_r2r (mm2, mm6); /* or srcavg and dest */ - psubb_r2r (mm5, mm6); /* subtract subresults */ - movq_r2m (mm6, *dest); /* store result in dest */ -} - -static inline void mmx_average_4_U8 (uint8_t * dest, const uint8_t * src1, - const uint8_t * src2, - const uint8_t * src3, - const uint8_t * src4) -{ - /* *dest = (*src1 + *src2 + *src3 + *src4 + 2)/ 4; */ - - movq_m2r (*src1, mm1); /* load 8 src1 bytes */ - movq_r2r (mm1, mm2); /* copy 8 src1 bytes */ - - punpcklbw_r2r (mm0, mm1); /* unpack low src1 bytes */ - punpckhbw_r2r (mm0, mm2); /* unpack high src1 bytes */ - - movq_m2r (*src2, mm3); /* load 8 src2 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src2 bytes */ - - punpcklbw_r2r (mm0, mm3); /* unpack low src2 bytes */ - punpckhbw_r2r (mm0, mm4); /* unpack high src2 bytes */ - - paddw_r2r (mm3, mm1); /* add lows */ - paddw_r2r (mm4, mm2); /* add highs */ - - /* now have partials in mm1 and mm2 */ - - movq_m2r (*src3, mm3); /* load 8 src3 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src3 bytes */ - - punpcklbw_r2r (mm0, mm3); /* unpack low src3 bytes */ - punpckhbw_r2r (mm0, mm4); /* unpack high src3 bytes */ - - paddw_r2r (mm3, mm1); /* add lows */ - paddw_r2r (mm4, mm2); /* add highs */ - - movq_m2r (*src4, mm5); /* load 8 src4 bytes */ - movq_r2r (mm5, mm6); /* copy 8 src4 bytes */ - - punpcklbw_r2r (mm0, mm5); /* unpack low src4 bytes */ - punpckhbw_r2r (mm0, mm6); /* unpack high src4 bytes */ - - paddw_r2r (mm5, mm1); /* add lows */ - paddw_r2r (mm6, mm2); /* add highs */ - - /* now have subtotal in mm1 and mm2 */ - - paddw_m2r (round4, mm1); - psraw_i2r (2, mm1); /* /4 */ - paddw_m2r (round4, mm2); - psraw_i2r (2, mm2); /* /4 */ - - packuswb_r2r (mm2, mm1); /* pack (w/ saturation) */ - movq_r2m (mm1, *dest); /* store result in dest */ -} - -static inline void mmx_interp_average_4_U8 (uint8_t * dest, - const uint8_t * src1, - const uint8_t * src2, - const uint8_t * src3, - const uint8_t * src4) -{ - /* *dest = (*dest + (*src1 + *src2 + *src3 + *src4 + 2)/ 4 + 1)/ 2; */ - - movq_m2r (*src1, mm1); /* load 8 src1 bytes */ - movq_r2r (mm1, mm2); /* copy 8 src1 bytes */ - - punpcklbw_r2r (mm0, mm1); /* unpack low src1 bytes */ - punpckhbw_r2r (mm0, mm2); /* unpack high src1 bytes */ - - movq_m2r (*src2, mm3); /* load 8 src2 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src2 bytes */ - - punpcklbw_r2r (mm0, mm3); /* unpack low src2 bytes */ - punpckhbw_r2r (mm0, mm4); /* unpack high src2 bytes */ - - paddw_r2r (mm3, mm1); /* add lows */ - paddw_r2r (mm4, mm2); /* add highs */ - - /* now have partials in mm1 and mm2 */ - - movq_m2r (*src3, mm3); /* load 8 src3 bytes */ - movq_r2r (mm3, mm4); /* copy 8 src3 bytes */ - - punpcklbw_r2r (mm0, mm3); /* unpack low src3 bytes */ - punpckhbw_r2r (mm0, mm4); /* unpack high src3 bytes */ - - paddw_r2r (mm3, mm1); /* add lows */ - paddw_r2r (mm4, mm2); /* add highs */ - - movq_m2r (*src4, mm5); /* load 8 src4 bytes */ - movq_r2r (mm5, mm6); /* copy 8 src4 bytes */ - - punpcklbw_r2r (mm0, mm5); /* unpack low src4 bytes */ - punpckhbw_r2r (mm0, mm6); /* unpack high src4 bytes */ - - paddw_r2r (mm5, mm1); /* add lows */ - paddw_r2r (mm6, mm2); /* add highs */ - - paddw_m2r (round4, mm1); - psraw_i2r (2, mm1); /* /4 */ - paddw_m2r (round4, mm2); - psraw_i2r (2, mm2); /* /4 */ - - /* now have subtotal/4 in mm1 and mm2 */ - - movq_m2r (*dest, mm3); /* load 8 dest bytes */ - movq_r2r (mm3, mm4); /* copy 8 dest bytes */ - - packuswb_r2r (mm2, mm1); /* pack (w/ saturation) */ - movq_r2r (mm1,mm2); /* copy subresult */ - - pxor_r2r (mm1, mm3); /* xor srcavg and dest */ - pand_m2r (mask1, mm3); /* mask lower bits */ - psrlq_i2r (1, mm3); /* /2 */ - por_r2r (mm2, mm4); /* or srcavg and dest */ - psubb_r2r (mm3, mm4); /* subtract subresults */ - movq_r2m (mm4, *dest); /* store result in dest */ -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_avg_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - mmx_zero_reg (); - - do { - mmx_average_2_U8 (dest, dest, ref); - - if (width == 16) - mmx_average_2_U8 (dest+8, dest+8, ref+8); - - dest += stride; - ref += stride; - } while (--height); -} - -static void MC_avg_o_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_mmx (16, height, dest, ref, stride); -} - -static void MC_avg_o_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_put_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - mmx_zero_reg (); - - do { - movq_m2r (* ref, mm1); /* load 8 ref bytes */ - movq_r2m (mm1,* dest); /* store 8 bytes at curr */ - - if (width == 16) - { - movq_m2r (* (ref+8), mm1); /* load 8 ref bytes */ - movq_r2m (mm1,* (dest+8)); /* store 8 bytes at curr */ - } - - dest += stride; - ref += stride; - } while (--height); -} - -static void MC_put_o_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_mmx (16, height, dest, ref, stride); -} - -static void MC_put_o_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -/* Half pixel interpolation in the x direction */ -static inline void MC_avg_x_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - mmx_zero_reg (); - - do { - mmx_interp_average_2_U8 (dest, ref, ref+1); - - if (width == 16) - mmx_interp_average_2_U8 (dest+8, ref+8, ref+9); - - dest += stride; - ref += stride; - } while (--height); -} - -static void MC_avg_x_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_x_mmx (16, height, dest, ref, stride); -} - -static void MC_avg_x_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_x_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_put_x_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - mmx_zero_reg (); - - do { - mmx_average_2_U8 (dest, ref, ref+1); - - if (width == 16) - mmx_average_2_U8 (dest+8, ref+8, ref+9); - - dest += stride; - ref += stride; - } while (--height); -} - -static void MC_put_x_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_x_mmx (16, height, dest, ref, stride); -} - -static void MC_put_x_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_x_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_avg_xy_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - const uint8_t * ref_next = ref + stride; - - mmx_zero_reg (); - - do { - mmx_interp_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1); - - if (width == 16) - mmx_interp_average_4_U8 (dest+8, ref+8, ref+9, - ref_next+8, ref_next+9); - - dest += stride; - ref += stride; - ref_next += stride; - } while (--height); -} - -static void MC_avg_xy_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_xy_mmx (16, height, dest, ref, stride); -} - -static void MC_avg_xy_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_xy_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_put_xy_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - const uint8_t * ref_next = ref + stride; - - mmx_zero_reg (); - - do { - mmx_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1); - - if (width == 16) - mmx_average_4_U8 (dest+8, ref+8, ref+9, ref_next+8, ref_next+9); - - dest += stride; - ref += stride; - ref_next += stride; - } while (--height); -} - -static void MC_put_xy_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_xy_mmx (16, height, dest, ref, stride); -} - -static void MC_put_xy_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_xy_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_avg_y_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - const uint8_t * ref_next = ref + stride; - - mmx_zero_reg (); - - do { - mmx_interp_average_2_U8 (dest, ref, ref_next); - - if (width == 16) - mmx_interp_average_2_U8 (dest+8, ref+8, ref_next+8); - - dest += stride; - ref += stride; - ref_next += stride; - } while (--height); -} - -static void MC_avg_y_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_y_mmx (16, height, dest, ref, stride); -} - -static void MC_avg_y_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg_y_mmx (8, height, dest, ref, stride); -} - -/*-----------------------------------------------------------------------*/ - -static inline void MC_put_y_mmx (const int width, int height, uint8_t * dest, - const uint8_t * ref, const int stride) -{ - const uint8_t * ref_next = ref + stride; - - mmx_zero_reg (); - - do { - mmx_average_2_U8 (dest, ref, ref_next); - - if (width == 16) - mmx_average_2_U8 (dest+8, ref+8, ref_next+8); - - dest += stride; - ref += stride; - ref_next += stride; - } while (--height); -} - -static void MC_put_y_16_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_y_mmx (16, height, dest, ref, stride); -} - -static void MC_put_y_8_mmx (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put_y_mmx (8, height, dest, ref, stride); -} - - -MPEG2_MC_EXTERN (mmx) - - - - - - - -/* CPU_MMXEXT/CPU_3DNOW adaptation layer */ - -#define pavg_r2r(src,dest) \ -do { \ - if (cpu == CPU_MMXEXT) \ - pavgb_r2r (src, dest); \ - else \ - pavgusb_r2r (src, dest); \ -} while (0) - -#define pavg_m2r(src,dest) \ -do { \ - if (cpu == CPU_MMXEXT) \ - pavgb_m2r (src, dest); \ - else \ - pavgusb_m2r (src, dest); \ -} while (0) - - -/* CPU_MMXEXT code */ - - -static inline void MC_put1_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride) -{ - do { - movq_m2r (*ref, mm0); - movq_r2m (mm0, *dest); - ref += stride; - dest += stride; - } while (--height); -} - -static inline void MC_put1_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+8), mm1); - ref += stride; - movq_r2m (mm0, *dest); - movq_r2m (mm1, *(dest+8)); - dest += stride; - } while (--height); -} - -static inline void MC_avg1_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - do { - movq_m2r (*ref, mm0); - pavg_m2r (*dest, mm0); - ref += stride; - movq_r2m (mm0, *dest); - dest += stride; - } while (--height); -} - -static inline void MC_avg1_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+8), mm1); - pavg_m2r (*dest, mm0); - pavg_m2r (*(dest+8), mm1); - movq_r2m (mm0, *dest); - ref += stride; - movq_r2m (mm1, *(dest+8)); - dest += stride; - } while (--height); -} - -static inline void MC_put2_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int offset, - const int cpu) -{ - do { - movq_m2r (*ref, mm0); - pavg_m2r (*(ref+offset), mm0); - ref += stride; - movq_r2m (mm0, *dest); - dest += stride; - } while (--height); -} - -static inline void MC_put2_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int offset, - const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+8), mm1); - pavg_m2r (*(ref+offset), mm0); - pavg_m2r (*(ref+offset+8), mm1); - movq_r2m (mm0, *dest); - ref += stride; - movq_r2m (mm1, *(dest+8)); - dest += stride; - } while (--height); -} - -static inline void MC_avg2_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int offset, - const int cpu) -{ - do { - movq_m2r (*ref, mm0); - pavg_m2r (*(ref+offset), mm0); - pavg_m2r (*dest, mm0); - ref += stride; - movq_r2m (mm0, *dest); - dest += stride; - } while (--height); -} - -static inline void MC_avg2_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int offset, - const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+8), mm1); - pavg_m2r (*(ref+offset), mm0); - pavg_m2r (*(ref+offset+8), mm1); - pavg_m2r (*dest, mm0); - pavg_m2r (*(dest+8), mm1); - ref += stride; - movq_r2m (mm0, *dest); - movq_r2m (mm1, *(dest+8)); - dest += stride; - } while (--height); -} - -static mmx_t mask_one = {0x0101010101010101LL}; - -static inline void MC_put4_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - movq_m2r (*ref, mm0); - movq_m2r (*(ref+1), mm1); - movq_r2r (mm0, mm7); - pxor_r2r (mm1, mm7); - pavg_r2r (mm1, mm0); - ref += stride; - - do { - movq_m2r (*ref, mm2); - movq_r2r (mm0, mm5); - - movq_m2r (*(ref+1), mm3); - movq_r2r (mm2, mm6); - - pxor_r2r (mm3, mm6); - pavg_r2r (mm3, mm2); - - por_r2r (mm6, mm7); - pxor_r2r (mm2, mm5); - - pand_r2r (mm5, mm7); - pavg_r2r (mm2, mm0); - - pand_m2r (mask_one, mm7); - - psubusb_r2r (mm7, mm0); - - ref += stride; - movq_r2m (mm0, *dest); - dest += stride; - - movq_r2r (mm6, mm7); /* unroll ! */ - movq_r2r (mm2, mm0); /* unroll ! */ - } while (--height); -} - -static inline void MC_put4_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+stride+1), mm1); - movq_r2r (mm0, mm7); - movq_m2r (*(ref+1), mm2); - pxor_r2r (mm1, mm7); - movq_m2r (*(ref+stride), mm3); - movq_r2r (mm2, mm6); - pxor_r2r (mm3, mm6); - pavg_r2r (mm1, mm0); - pavg_r2r (mm3, mm2); - por_r2r (mm6, mm7); - movq_r2r (mm0, mm6); - pxor_r2r (mm2, mm6); - pand_r2r (mm6, mm7); - pand_m2r (mask_one, mm7); - pavg_r2r (mm2, mm0); - psubusb_r2r (mm7, mm0); - movq_r2m (mm0, *dest); - - movq_m2r (*(ref+8), mm0); - movq_m2r (*(ref+stride+9), mm1); - movq_r2r (mm0, mm7); - movq_m2r (*(ref+9), mm2); - pxor_r2r (mm1, mm7); - movq_m2r (*(ref+stride+8), mm3); - movq_r2r (mm2, mm6); - pxor_r2r (mm3, mm6); - pavg_r2r (mm1, mm0); - pavg_r2r (mm3, mm2); - por_r2r (mm6, mm7); - movq_r2r (mm0, mm6); - pxor_r2r (mm2, mm6); - pand_r2r (mm6, mm7); - pand_m2r (mask_one, mm7); - pavg_r2r (mm2, mm0); - psubusb_r2r (mm7, mm0); - ref += stride; - movq_r2m (mm0, *(dest+8)); - dest += stride; - } while (--height); -} - -static inline void MC_avg4_8 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+stride+1), mm1); - movq_r2r (mm0, mm7); - movq_m2r (*(ref+1), mm2); - pxor_r2r (mm1, mm7); - movq_m2r (*(ref+stride), mm3); - movq_r2r (mm2, mm6); - pxor_r2r (mm3, mm6); - pavg_r2r (mm1, mm0); - pavg_r2r (mm3, mm2); - por_r2r (mm6, mm7); - movq_r2r (mm0, mm6); - pxor_r2r (mm2, mm6); - pand_r2r (mm6, mm7); - pand_m2r (mask_one, mm7); - pavg_r2r (mm2, mm0); - psubusb_r2r (mm7, mm0); - movq_m2r (*dest, mm1); - pavg_r2r (mm1, mm0); - ref += stride; - movq_r2m (mm0, *dest); - dest += stride; - } while (--height); -} - -static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref, - const int stride, const int cpu) -{ - do { - movq_m2r (*ref, mm0); - movq_m2r (*(ref+stride+1), mm1); - movq_r2r (mm0, mm7); - movq_m2r (*(ref+1), mm2); - pxor_r2r (mm1, mm7); - movq_m2r (*(ref+stride), mm3); - movq_r2r (mm2, mm6); - pxor_r2r (mm3, mm6); - pavg_r2r (mm1, mm0); - pavg_r2r (mm3, mm2); - por_r2r (mm6, mm7); - movq_r2r (mm0, mm6); - pxor_r2r (mm2, mm6); - pand_r2r (mm6, mm7); - pand_m2r (mask_one, mm7); - pavg_r2r (mm2, mm0); - psubusb_r2r (mm7, mm0); - movq_m2r (*dest, mm1); - pavg_r2r (mm1, mm0); - movq_r2m (mm0, *dest); - - movq_m2r (*(ref+8), mm0); - movq_m2r (*(ref+stride+9), mm1); - movq_r2r (mm0, mm7); - movq_m2r (*(ref+9), mm2); - pxor_r2r (mm1, mm7); - movq_m2r (*(ref+stride+8), mm3); - movq_r2r (mm2, mm6); - pxor_r2r (mm3, mm6); - pavg_r2r (mm1, mm0); - pavg_r2r (mm3, mm2); - por_r2r (mm6, mm7); - movq_r2r (mm0, mm6); - pxor_r2r (mm2, mm6); - pand_r2r (mm6, mm7); - pand_m2r (mask_one, mm7); - pavg_r2r (mm2, mm0); - psubusb_r2r (mm7, mm0); - movq_m2r (*(dest+8), mm1); - pavg_r2r (mm1, mm0); - ref += stride; - movq_r2m (mm0, *(dest+8)); - dest += stride; - } while (--height); -} - -static void MC_avg_o_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg1_16 (height, dest, ref, stride, CPU_MMXEXT); -} - -static void MC_avg_o_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg1_8 (height, dest, ref, stride, CPU_MMXEXT); -} - -static void MC_put_o_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put1_16 (height, dest, ref, stride); -} - -static void MC_put_o_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put1_8 (height, dest, ref, stride); -} - -static void MC_avg_x_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_16 (height, dest, ref, stride, 1, CPU_MMXEXT); -} - -static void MC_avg_x_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_8 (height, dest, ref, stride, 1, CPU_MMXEXT); -} - -static void MC_put_x_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_16 (height, dest, ref, stride, 1, CPU_MMXEXT); -} - -static void MC_put_x_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_8 (height, dest, ref, stride, 1, CPU_MMXEXT); -} - -static void MC_avg_y_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_16 (height, dest, ref, stride, stride, CPU_MMXEXT); -} - -static void MC_avg_y_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_8 (height, dest, ref, stride, stride, CPU_MMXEXT); -} - -static void MC_put_y_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_16 (height, dest, ref, stride, stride, CPU_MMXEXT); -} - -static void MC_put_y_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_8 (height, dest, ref, stride, stride, CPU_MMXEXT); -} - -static void MC_avg_xy_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg4_16 (height, dest, ref, stride, CPU_MMXEXT); -} - -static void MC_avg_xy_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg4_8 (height, dest, ref, stride, CPU_MMXEXT); -} - -static void MC_put_xy_16_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put4_16 (height, dest, ref, stride, CPU_MMXEXT); -} - -static void MC_put_xy_8_mmxext (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put4_8 (height, dest, ref, stride, CPU_MMXEXT); -} - - -MPEG2_MC_EXTERN (mmxext) - - - -static void MC_avg_o_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg1_16 (height, dest, ref, stride, CPU_3DNOW); -} - -static void MC_avg_o_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg1_8 (height, dest, ref, stride, CPU_3DNOW); -} - -static void MC_put_o_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put1_16 (height, dest, ref, stride); -} - -static void MC_put_o_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put1_8 (height, dest, ref, stride); -} - -static void MC_avg_x_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_16 (height, dest, ref, stride, 1, CPU_3DNOW); -} - -static void MC_avg_x_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_8 (height, dest, ref, stride, 1, CPU_3DNOW); -} - -static void MC_put_x_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_16 (height, dest, ref, stride, 1, CPU_3DNOW); -} - -static void MC_put_x_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_8 (height, dest, ref, stride, 1, CPU_3DNOW); -} - -static void MC_avg_y_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_16 (height, dest, ref, stride, stride, CPU_3DNOW); -} - -static void MC_avg_y_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg2_8 (height, dest, ref, stride, stride, CPU_3DNOW); -} - -static void MC_put_y_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_16 (height, dest, ref, stride, stride, CPU_3DNOW); -} - -static void MC_put_y_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put2_8 (height, dest, ref, stride, stride, CPU_3DNOW); -} - -static void MC_avg_xy_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg4_16 (height, dest, ref, stride, CPU_3DNOW); -} - -static void MC_avg_xy_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_avg4_8 (height, dest, ref, stride, CPU_3DNOW); -} - -static void MC_put_xy_16_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put4_16 (height, dest, ref, stride, CPU_3DNOW); -} - -static void MC_put_xy_8_3dnow (uint8_t * dest, const uint8_t * ref, - int stride, int height) -{ - MC_put4_8 (height, dest, ref, stride, CPU_3DNOW); -} - - -MPEG2_MC_EXTERN (3dnow) - -#endif diff -Nru k9copy-2.1.0/src/mpeg2/motion_comp_vis.cpp k9copy-2.2.0/src/mpeg2/motion_comp_vis.cpp --- k9copy-2.1.0/src/mpeg2/motion_comp_vis.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/motion_comp_vis.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,2061 +0,0 @@ -/* - * motion_comp_vis.c - * Copyright (C) 2003 David S. Miller - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_SPARC - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" -#include "vis.h" - -/* The trick used in some of this file is the formula from the MMX - * motion comp code, which is: - * - * (x+y+1)>>1 == (x|y)-((x^y)>>1) - * - * This allows us to average 8 bytes at a time in a 64-bit FPU reg. - * We avoid overflows by masking before we do the shift, and we - * implement the shift by multiplying by 1/2 using mul8x16. So in - * VIS this is (assume 'x' is in f0, 'y' is in f2, a repeating mask - * of '0xfe' is in f4, a repeating mask of '0x7f' is in f6, and - * the value 0x80808080 is in f8): - * - * fxor f0, f2, f10 - * fand f10, f4, f10 - * fmul8x16 f8, f10, f10 - * fand f10, f6, f10 - * for f0, f2, f12 - * fpsub16 f12, f10, f10 - */ - -#define DUP4(x) {x, x, x, x} -#define DUP8(x) {x, x, x, x, x, x, x, x} -static const int16_t constants1[] ATTR_ALIGN(8) = DUP4 (1); -static const int16_t constants2[] ATTR_ALIGN(8) = DUP4 (2); -static const int16_t constants3[] ATTR_ALIGN(8) = DUP4 (3); -static const int16_t constants6[] ATTR_ALIGN(8) = DUP4 (6); -static const int8_t constants_fe[] ATTR_ALIGN(8) = DUP8 (0xfe); -static const int8_t constants_7f[] ATTR_ALIGN(8) = DUP8 (0x7f); -static const int8_t constants128[] ATTR_ALIGN(8) = DUP8 (128); -static const int16_t constants256_512[] ATTR_ALIGN(8) = - {256, 512, 256, 512}; -static const int16_t constants256_1024[] ATTR_ALIGN(8) = - {256, 1024, 256, 1024}; - -#define REF_0 0 -#define REF_0_1 1 -#define REF_2 2 -#define REF_2_1 3 -#define REF_4 4 -#define REF_4_1 5 -#define REF_6 6 -#define REF_6_1 7 -#define REF_S0 8 -#define REF_S0_1 9 -#define REF_S2 10 -#define REF_S2_1 11 -#define REF_S4 12 -#define REF_S4_1 13 -#define REF_S6 14 -#define REF_S6_1 15 -#define DST_0 16 -#define DST_1 17 -#define DST_2 18 -#define DST_3 19 -#define CONST_1 20 -#define CONST_2 20 -#define CONST_3 20 -#define CONST_6 20 -#define MASK_fe 20 -#define CONST_128 22 -#define CONST_256 22 -#define CONST_512 22 -#define CONST_1024 22 -#define TMP0 24 -#define TMP1 25 -#define TMP2 26 -#define TMP3 27 -#define TMP4 28 -#define TMP5 29 -#define ZERO 30 -#define MASK_7f 30 - -#define TMP6 32 -#define TMP8 34 -#define TMP10 36 -#define TMP12 38 -#define TMP14 40 -#define TMP16 42 -#define TMP18 44 -#define TMP20 46 -#define TMP22 48 -#define TMP24 50 -#define TMP26 52 -#define TMP28 54 -#define TMP30 56 -#define TMP32 58 - -static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 16 : 0; - do { /* 5 cycles */ - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, 8, TMP2); - - vis_ld64_2(ref, offset, TMP4); - ref += stride; - - vis_faligndata(TMP0, TMP2, REF_0); - vis_st64(REF_0, dest[0]); - - vis_faligndata(TMP2, TMP4, REF_2); - vis_st64_2(REF_2, dest, 8); - dest += stride; - } while (--height); -} - -static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 8 : 0; - do { /* 4 cycles */ - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, offset, TMP2); - ref += stride; - - /* stall */ - - vis_faligndata(TMP0, TMP2, REF_0); - vis_st64(REF_0, dest[0]); - dest += stride; - } while (--height); -} - - -static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int stride_8 = stride + 8; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 16 : 0; - - vis_ld64(ref[0], TMP0); - - vis_ld64(ref[8], TMP2); - - vis_ld64_2(ref, offset, TMP4); - - vis_ld64(dest[0], DST_0); - - vis_ld64(dest[8], DST_2); - - vis_ld64(constants_fe[0], MASK_fe); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64(constants_7f[0], MASK_7f); - vis_faligndata(TMP2, TMP4, REF_2); - - vis_ld64(constants128[0], CONST_128); - - ref += stride; - height = (height >> 1) - 1; - - do { /* 24 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(DST_0, REF_0, TMP6); - - vis_ld64_2(ref, 8, TMP2); - vis_and(TMP6, MASK_fe, TMP6); - - vis_ld64_2(ref, offset, TMP4); - ref += stride; - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_xor(DST_2, REF_2, TMP8); - - vis_and(TMP8, MASK_fe, TMP8); - - vis_or(DST_0, REF_0, TMP10); - vis_ld64_2(dest, stride, DST_0); - vis_mul8x16(CONST_128, TMP8, TMP8); - - vis_or(DST_2, REF_2, TMP12); - vis_ld64_2(dest, stride_8, DST_2); - - vis_ld64(ref[0], TMP14); - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); - - dest += stride; - vis_ld64_2(ref, 8, TMP16); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, offset, TMP18); - vis_faligndata(TMP2, TMP4, REF_2); - ref += stride; - - vis_xor(DST_0, REF_0, TMP20); - - vis_and(TMP20, MASK_fe, TMP20); - - vis_xor(DST_2, REF_2, TMP22); - vis_mul8x16(CONST_128, TMP20, TMP20); - - vis_and(TMP22, MASK_fe, TMP22); - - vis_or(DST_0, REF_0, TMP24); - vis_mul8x16(CONST_128, TMP22, TMP22); - - vis_or(DST_2, REF_2, TMP26); - - vis_ld64_2(dest, stride, DST_0); - vis_faligndata(TMP14, TMP16, REF_0); - - vis_ld64_2(dest, stride_8, DST_2); - vis_faligndata(TMP16, TMP18, REF_2); - - vis_and(TMP20, MASK_7f, TMP20); - - vis_and(TMP22, MASK_7f, TMP22); - - vis_psub16(TMP24, TMP20, TMP20); - vis_st64(TMP20, dest[0]); - - vis_psub16(TMP26, TMP22, TMP22); - vis_st64_2(TMP22, dest, 8); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(DST_0, REF_0, TMP6); - - vis_ld64_2(ref, 8, TMP2); - vis_and(TMP6, MASK_fe, TMP6); - - vis_ld64_2(ref, offset, TMP4); - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_xor(DST_2, REF_2, TMP8); - - vis_and(TMP8, MASK_fe, TMP8); - - vis_or(DST_0, REF_0, TMP10); - vis_ld64_2(dest, stride, DST_0); - vis_mul8x16(CONST_128, TMP8, TMP8); - - vis_or(DST_2, REF_2, TMP12); - vis_ld64_2(dest, stride_8, DST_2); - - vis_ld64(ref[0], TMP14); - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); - - dest += stride; - vis_faligndata(TMP0, TMP2, REF_0); - - vis_faligndata(TMP2, TMP4, REF_2); - - vis_xor(DST_0, REF_0, TMP20); - - vis_and(TMP20, MASK_fe, TMP20); - - vis_xor(DST_2, REF_2, TMP22); - vis_mul8x16(CONST_128, TMP20, TMP20); - - vis_and(TMP22, MASK_fe, TMP22); - - vis_or(DST_0, REF_0, TMP24); - vis_mul8x16(CONST_128, TMP22, TMP22); - - vis_or(DST_2, REF_2, TMP26); - - vis_and(TMP20, MASK_7f, TMP20); - - vis_and(TMP22, MASK_7f, TMP22); - - vis_psub16(TMP24, TMP20, TMP20); - vis_st64(TMP20, dest[0]); - - vis_psub16(TMP26, TMP22, TMP22); - vis_st64_2(TMP22, dest, 8); -} - -static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 8 : 0; - - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, offset, TMP2); - - vis_ld64(dest[0], DST_0); - - vis_ld64(constants_fe[0], MASK_fe); - - vis_ld64(constants_7f[0], MASK_7f); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64(constants128[0], CONST_128); - - ref += stride; - height = (height >> 1) - 1; - - do { /* 12 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(DST_0, REF_0, TMP4); - - vis_ld64_2(ref, offset, TMP2); - vis_and(TMP4, MASK_fe, TMP4); - - vis_or(DST_0, REF_0, TMP6); - vis_ld64_2(dest, stride, DST_0); - ref += stride; - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_ld64(ref[0], TMP12); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, offset, TMP2); - vis_xor(DST_0, REF_0, TMP0); - ref += stride; - - vis_and(TMP0, MASK_fe, TMP0); - - vis_and(TMP4, MASK_7f, TMP4); - - vis_psub16(TMP6, TMP4, TMP4); - vis_st64(TMP4, dest[0]); - dest += stride; - vis_mul8x16(CONST_128, TMP0, TMP0); - - vis_or(DST_0, REF_0, TMP6); - vis_ld64_2(dest, stride, DST_0); - - vis_faligndata(TMP12, TMP2, REF_0); - - vis_and(TMP0, MASK_7f, TMP0); - - vis_psub16(TMP6, TMP0, TMP4); - vis_st64(TMP4, dest[0]); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(DST_0, REF_0, TMP4); - - vis_ld64_2(ref, offset, TMP2); - vis_and(TMP4, MASK_fe, TMP4); - - vis_or(DST_0, REF_0, TMP6); - vis_ld64_2(dest, stride, DST_0); - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_faligndata(TMP0, TMP2, REF_0); - - vis_xor(DST_0, REF_0, TMP0); - - vis_and(TMP0, MASK_fe, TMP0); - - vis_and(TMP4, MASK_7f, TMP4); - - vis_psub16(TMP6, TMP4, TMP4); - vis_st64(TMP4, dest[0]); - dest += stride; - vis_mul8x16(CONST_128, TMP0, TMP0); - - vis_or(DST_0, REF_0, TMP6); - - vis_and(TMP0, MASK_7f, TMP0); - - vis_psub16(TMP6, TMP0, TMP4); - vis_st64(TMP4, dest[0]); -} - -static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - - ref = vis_alignaddr(ref); - - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, 8, TMP2); - - vis_ld64_2(ref, 16, TMP4); - - vis_ld64(constants_fe[0], MASK_fe); - - vis_ld64(constants_7f[0], MASK_7f); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64(constants128[0], CONST_128); - vis_faligndata(TMP2, TMP4, REF_4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - } - - ref += stride; - height = (height >> 1) - 1; - - do { /* 34 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP6); - - vis_ld64_2(ref, 8, TMP2); - vis_xor(REF_4, REF_6, TMP8); - - vis_ld64_2(ref, 16, TMP4); - vis_and(TMP6, MASK_fe, TMP6); - ref += stride; - - vis_ld64(ref[0], TMP14); - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_and(TMP8, MASK_fe, TMP8); - - vis_ld64_2(ref, 8, TMP16); - vis_mul8x16(CONST_128, TMP8, TMP8); - vis_or(REF_0, REF_2, TMP10); - - vis_ld64_2(ref, 16, TMP18); - ref += stride; - vis_or(REF_4, REF_6, TMP12); - - vis_alignaddr_g0((void *)off); - - vis_faligndata(TMP0, TMP2, REF_0); - - vis_faligndata(TMP2, TMP4, REF_4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - } - - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); - dest += stride; - - vis_xor(REF_0, REF_2, TMP6); - - vis_xor(REF_4, REF_6, TMP8); - - vis_and(TMP6, MASK_fe, TMP6); - - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_and(TMP8, MASK_fe, TMP8); - - vis_mul8x16(CONST_128, TMP8, TMP8); - vis_or(REF_0, REF_2, TMP10); - - vis_or(REF_4, REF_6, TMP12); - - vis_alignaddr_g0((void *)off); - - vis_faligndata(TMP14, TMP16, REF_0); - - vis_faligndata(TMP16, TMP18, REF_4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP14, TMP16, REF_2); - vis_faligndata(TMP16, TMP18, REF_6); - } else { - vis_src1(TMP16, REF_2); - vis_src1(TMP18, REF_6); - } - - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP6); - - vis_ld64_2(ref, 8, TMP2); - vis_xor(REF_4, REF_6, TMP8); - - vis_ld64_2(ref, 16, TMP4); - vis_and(TMP6, MASK_fe, TMP6); - - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_and(TMP8, MASK_fe, TMP8); - - vis_mul8x16(CONST_128, TMP8, TMP8); - vis_or(REF_0, REF_2, TMP10); - - vis_or(REF_4, REF_6, TMP12); - - vis_alignaddr_g0((void *)off); - - vis_faligndata(TMP0, TMP2, REF_0); - - vis_faligndata(TMP2, TMP4, REF_4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - } - - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); - dest += stride; - - vis_xor(REF_0, REF_2, TMP6); - - vis_xor(REF_4, REF_6, TMP8); - - vis_and(TMP6, MASK_fe, TMP6); - - vis_mul8x16(CONST_128, TMP6, TMP6); - vis_and(TMP8, MASK_fe, TMP8); - - vis_mul8x16(CONST_128, TMP8, TMP8); - vis_or(REF_0, REF_2, TMP10); - - vis_or(REF_4, REF_6, TMP12); - - vis_and(TMP6, MASK_7f, TMP6); - - vis_and(TMP8, MASK_7f, TMP8); - - vis_psub16(TMP10, TMP6, TMP6); - vis_st64(TMP6, dest[0]); - - vis_psub16(TMP12, TMP8, TMP8); - vis_st64_2(TMP8, dest, 8); -} - -static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - - ref = vis_alignaddr(ref); - - vis_ld64(ref[0], TMP0); - - vis_ld64(ref[8], TMP2); - - vis_ld64(constants_fe[0], MASK_fe); - - vis_ld64(constants_7f[0], MASK_7f); - - vis_ld64(constants128[0], CONST_128); - vis_faligndata(TMP0, TMP2, REF_0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - } else { - vis_src1(TMP2, REF_2); - } - - ref += stride; - height = (height >> 1) - 1; - - do { /* 20 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP4); - - vis_ld64_2(ref, 8, TMP2); - vis_and(TMP4, MASK_fe, TMP4); - ref += stride; - - vis_ld64(ref[0], TMP8); - vis_or(REF_0, REF_2, TMP6); - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_alignaddr_g0((void *)off); - - vis_ld64_2(ref, 8, TMP10); - ref += stride; - vis_faligndata(TMP0, TMP2, REF_0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - } else { - vis_src1(TMP2, REF_2); - } - - vis_and(TMP4, MASK_7f, TMP4); - - vis_psub16(TMP6, TMP4, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_xor(REF_0, REF_2, TMP12); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_or(REF_0, REF_2, TMP14); - vis_mul8x16(CONST_128, TMP12, TMP12); - - vis_alignaddr_g0((void *)off); - vis_faligndata(TMP8, TMP10, REF_0); - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP8, TMP10, REF_2); - } else { - vis_src1(TMP10, REF_2); - } - - vis_and(TMP12, MASK_7f, TMP12); - - vis_psub16(TMP14, TMP12, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP4); - - vis_ld64_2(ref, 8, TMP2); - vis_and(TMP4, MASK_fe, TMP4); - - vis_or(REF_0, REF_2, TMP6); - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_alignaddr_g0((void *)off); - - vis_faligndata(TMP0, TMP2, REF_0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - } else { - vis_src1(TMP2, REF_2); - } - - vis_and(TMP4, MASK_7f, TMP4); - - vis_psub16(TMP6, TMP4, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_xor(REF_0, REF_2, TMP12); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_or(REF_0, REF_2, TMP14); - vis_mul8x16(CONST_128, TMP12, TMP12); - - vis_and(TMP12, MASK_7f, TMP12); - - vis_psub16(TMP14, TMP12, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; -} - -static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - vis_ld64(constants3[0], CONST_3); - vis_fzero(ZERO); - vis_ld64(constants256_512[0], CONST_256); - - ref = vis_alignaddr(ref); - do { /* 26 cycles */ - vis_ld64(ref[0], TMP0); - - vis_ld64(ref[8], TMP2); - - vis_alignaddr_g0((void *)off); - - vis_ld64(ref[16], TMP4); - - vis_ld64(dest[0], DST_0); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64(dest[8], DST_2); - vis_faligndata(TMP2, TMP4, REF_4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - } - - vis_mul8x16au(REF_0, CONST_256, TMP0); - - vis_pmerge(ZERO, REF_2, TMP4); - vis_mul8x16au(REF_0_1, CONST_256, TMP2); - - vis_pmerge(ZERO, REF_2_1, TMP6); - - vis_padd16(TMP0, TMP4, TMP0); - - vis_mul8x16al(DST_0, CONST_512, TMP4); - vis_padd16(TMP2, TMP6, TMP2); - - vis_mul8x16al(DST_1, CONST_512, TMP6); - - vis_mul8x16au(REF_6, CONST_256, TMP12); - - vis_padd16(TMP0, TMP4, TMP0); - vis_mul8x16au(REF_6_1, CONST_256, TMP14); - - vis_padd16(TMP2, TMP6, TMP2); - vis_mul8x16au(REF_4, CONST_256, TMP16); - - vis_padd16(TMP0, CONST_3, TMP8); - vis_mul8x16au(REF_4_1, CONST_256, TMP18); - - vis_padd16(TMP2, CONST_3, TMP10); - vis_pack16(TMP8, DST_0); - - vis_pack16(TMP10, DST_1); - vis_padd16(TMP16, TMP12, TMP0); - - vis_st64(DST_0, dest[0]); - vis_mul8x16al(DST_2, CONST_512, TMP4); - vis_padd16(TMP18, TMP14, TMP2); - - vis_mul8x16al(DST_3, CONST_512, TMP6); - vis_padd16(TMP0, CONST_3, TMP0); - - vis_padd16(TMP2, CONST_3, TMP2); - - vis_padd16(TMP0, TMP4, TMP0); - - vis_padd16(TMP2, TMP6, TMP2); - vis_pack16(TMP0, DST_2); - - vis_pack16(TMP2, DST_3); - vis_st64(DST_2, dest[8]); - - ref += stride; - dest += stride; - } while (--height); -} - -static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - int stride_times_2 = stride << 1; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - vis_ld64(constants3[0], CONST_3); - vis_fzero(ZERO); - vis_ld64(constants256_512[0], CONST_256); - - ref = vis_alignaddr(ref); - height >>= 2; - do { /* 47 cycles */ - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, 8, TMP2); - ref += stride; - - vis_alignaddr_g0((void *)off); - - vis_ld64(ref[0], TMP4); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, 8, TMP6); - ref += stride; - - vis_ld64(ref[0], TMP8); - - vis_ld64_2(ref, 8, TMP10); - ref += stride; - vis_faligndata(TMP4, TMP6, REF_4); - - vis_ld64(ref[0], TMP12); - - vis_ld64_2(ref, 8, TMP14); - ref += stride; - vis_faligndata(TMP8, TMP10, REF_S0); - - vis_faligndata(TMP12, TMP14, REF_S4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - - vis_ld64(dest[0], DST_0); - vis_faligndata(TMP0, TMP2, REF_2); - - vis_ld64_2(dest, stride, DST_2); - vis_faligndata(TMP4, TMP6, REF_6); - - vis_faligndata(TMP8, TMP10, REF_S2); - - vis_faligndata(TMP12, TMP14, REF_S6); - } else { - vis_ld64(dest[0], DST_0); - vis_src1(TMP2, REF_2); - - vis_ld64_2(dest, stride, DST_2); - vis_src1(TMP6, REF_6); - - vis_src1(TMP10, REF_S2); - - vis_src1(TMP14, REF_S6); - } - - vis_pmerge(ZERO, REF_0, TMP0); - vis_mul8x16au(REF_0_1, CONST_256, TMP2); - - vis_pmerge(ZERO, REF_2, TMP4); - vis_mul8x16au(REF_2_1, CONST_256, TMP6); - - vis_padd16(TMP0, CONST_3, TMP0); - vis_mul8x16al(DST_0, CONST_512, TMP16); - - vis_padd16(TMP2, CONST_3, TMP2); - vis_mul8x16al(DST_1, CONST_512, TMP18); - - vis_padd16(TMP0, TMP4, TMP0); - vis_mul8x16au(REF_4, CONST_256, TMP8); - - vis_padd16(TMP2, TMP6, TMP2); - vis_mul8x16au(REF_4_1, CONST_256, TMP10); - - vis_padd16(TMP0, TMP16, TMP0); - vis_mul8x16au(REF_6, CONST_256, TMP12); - - vis_padd16(TMP2, TMP18, TMP2); - vis_mul8x16au(REF_6_1, CONST_256, TMP14); - - vis_padd16(TMP8, CONST_3, TMP8); - vis_mul8x16al(DST_2, CONST_512, TMP16); - - vis_padd16(TMP8, TMP12, TMP8); - vis_mul8x16al(DST_3, CONST_512, TMP18); - - vis_padd16(TMP10, TMP14, TMP10); - vis_pack16(TMP0, DST_0); - - vis_pack16(TMP2, DST_1); - vis_st64(DST_0, dest[0]); - dest += stride; - vis_padd16(TMP10, CONST_3, TMP10); - - vis_ld64_2(dest, stride, DST_0); - vis_padd16(TMP8, TMP16, TMP8); - - vis_ld64_2(dest, stride_times_2, TMP4/*DST_2*/); - vis_padd16(TMP10, TMP18, TMP10); - vis_pack16(TMP8, DST_2); - - vis_pack16(TMP10, DST_3); - vis_st64(DST_2, dest[0]); - dest += stride; - - vis_mul8x16au(REF_S0_1, CONST_256, TMP2); - vis_pmerge(ZERO, REF_S0, TMP0); - - vis_pmerge(ZERO, REF_S2, TMP24); - vis_mul8x16au(REF_S2_1, CONST_256, TMP6); - - vis_padd16(TMP0, CONST_3, TMP0); - vis_mul8x16au(REF_S4, CONST_256, TMP8); - - vis_padd16(TMP2, CONST_3, TMP2); - vis_mul8x16au(REF_S4_1, CONST_256, TMP10); - - vis_padd16(TMP0, TMP24, TMP0); - vis_mul8x16au(REF_S6, CONST_256, TMP12); - - vis_padd16(TMP2, TMP6, TMP2); - vis_mul8x16au(REF_S6_1, CONST_256, TMP14); - - vis_padd16(TMP8, CONST_3, TMP8); - vis_mul8x16al(DST_0, CONST_512, TMP16); - - vis_padd16(TMP10, CONST_3, TMP10); - vis_mul8x16al(DST_1, CONST_512, TMP18); - - vis_padd16(TMP8, TMP12, TMP8); - vis_mul8x16al(TMP4/*DST_2*/, CONST_512, TMP20); - - vis_mul8x16al(TMP5/*DST_3*/, CONST_512, TMP22); - vis_padd16(TMP0, TMP16, TMP0); - - vis_padd16(TMP2, TMP18, TMP2); - vis_pack16(TMP0, DST_0); - - vis_padd16(TMP10, TMP14, TMP10); - vis_pack16(TMP2, DST_1); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_padd16(TMP8, TMP20, TMP8); - - vis_padd16(TMP10, TMP22, TMP10); - vis_pack16(TMP8, DST_2); - - vis_pack16(TMP10, DST_3); - vis_st64(DST_2, dest[0]); - dest += stride; - } while (--height); -} - -static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 16 : 0; - - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, 8, TMP2); - - vis_ld64_2(ref, offset, TMP4); - ref += stride; - - vis_ld64(ref[0], TMP6); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, 8, TMP8); - vis_faligndata(TMP2, TMP4, REF_4); - - vis_ld64_2(ref, offset, TMP10); - ref += stride; - - vis_ld64(constants_fe[0], MASK_fe); - vis_faligndata(TMP6, TMP8, REF_2); - - vis_ld64(constants_7f[0], MASK_7f); - vis_faligndata(TMP8, TMP10, REF_6); - - vis_ld64(constants128[0], CONST_128); - height = (height >> 1) - 1; - do { /* 24 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP12); - - vis_ld64_2(ref, 8, TMP2); - vis_xor(REF_4, REF_6, TMP16); - - vis_ld64_2(ref, offset, TMP4); - ref += stride; - vis_or(REF_0, REF_2, TMP14); - - vis_ld64(ref[0], TMP6); - vis_or(REF_4, REF_6, TMP18); - - vis_ld64_2(ref, 8, TMP8); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, offset, TMP10); - ref += stride; - vis_faligndata(TMP2, TMP4, REF_4); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_and(TMP16, MASK_fe, TMP16); - vis_mul8x16(CONST_128, TMP12, TMP12); - - vis_mul8x16(CONST_128, TMP16, TMP16); - vis_xor(REF_0, REF_2, TMP0); - - vis_xor(REF_4, REF_6, TMP2); - - vis_or(REF_0, REF_2, TMP20); - - vis_and(TMP12, MASK_7f, TMP12); - - vis_and(TMP16, MASK_7f, TMP16); - - vis_psub16(TMP14, TMP12, TMP12); - vis_st64(TMP12, dest[0]); - - vis_psub16(TMP18, TMP16, TMP16); - vis_st64_2(TMP16, dest, 8); - dest += stride; - - vis_or(REF_4, REF_6, TMP18); - - vis_and(TMP0, MASK_fe, TMP0); - - vis_and(TMP2, MASK_fe, TMP2); - vis_mul8x16(CONST_128, TMP0, TMP0); - - vis_faligndata(TMP6, TMP8, REF_2); - vis_mul8x16(CONST_128, TMP2, TMP2); - - vis_faligndata(TMP8, TMP10, REF_6); - - vis_and(TMP0, MASK_7f, TMP0); - - vis_and(TMP2, MASK_7f, TMP2); - - vis_psub16(TMP20, TMP0, TMP0); - vis_st64(TMP0, dest[0]); - - vis_psub16(TMP18, TMP2, TMP2); - vis_st64_2(TMP2, dest, 8); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP12); - - vis_ld64_2(ref, 8, TMP2); - vis_xor(REF_4, REF_6, TMP16); - - vis_ld64_2(ref, offset, TMP4); - vis_or(REF_0, REF_2, TMP14); - - vis_or(REF_4, REF_6, TMP18); - - vis_faligndata(TMP0, TMP2, REF_0); - - vis_faligndata(TMP2, TMP4, REF_4); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_and(TMP16, MASK_fe, TMP16); - vis_mul8x16(CONST_128, TMP12, TMP12); - - vis_mul8x16(CONST_128, TMP16, TMP16); - vis_xor(REF_0, REF_2, TMP0); - - vis_xor(REF_4, REF_6, TMP2); - - vis_or(REF_0, REF_2, TMP20); - - vis_and(TMP12, MASK_7f, TMP12); - - vis_and(TMP16, MASK_7f, TMP16); - - vis_psub16(TMP14, TMP12, TMP12); - vis_st64(TMP12, dest[0]); - - vis_psub16(TMP18, TMP16, TMP16); - vis_st64_2(TMP16, dest, 8); - dest += stride; - - vis_or(REF_4, REF_6, TMP18); - - vis_and(TMP0, MASK_fe, TMP0); - - vis_and(TMP2, MASK_fe, TMP2); - vis_mul8x16(CONST_128, TMP0, TMP0); - - vis_mul8x16(CONST_128, TMP2, TMP2); - - vis_and(TMP0, MASK_7f, TMP0); - - vis_and(TMP2, MASK_7f, TMP2); - - vis_psub16(TMP20, TMP0, TMP0); - vis_st64(TMP0, dest[0]); - - vis_psub16(TMP18, TMP2, TMP2); - vis_st64_2(TMP2, dest, 8); -} - -static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int offset; - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 8 : 0; - - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, offset, TMP2); - ref += stride; - - vis_ld64(ref[0], TMP4); - - vis_ld64_2(ref, offset, TMP6); - ref += stride; - - vis_ld64(constants_fe[0], MASK_fe); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64(constants_7f[0], MASK_7f); - vis_faligndata(TMP4, TMP6, REF_2); - - vis_ld64(constants128[0], CONST_128); - height = (height >> 1) - 1; - do { /* 12 cycles */ - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP4); - - vis_ld64_2(ref, offset, TMP2); - ref += stride; - vis_and(TMP4, MASK_fe, TMP4); - - vis_or(REF_0, REF_2, TMP6); - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_faligndata(TMP0, TMP2, REF_0); - vis_ld64(ref[0], TMP0); - - vis_ld64_2(ref, offset, TMP2); - ref += stride; - vis_xor(REF_0, REF_2, TMP12); - - vis_and(TMP4, MASK_7f, TMP4); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_mul8x16(CONST_128, TMP12, TMP12); - vis_or(REF_0, REF_2, TMP14); - - vis_psub16(TMP6, TMP4, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_faligndata(TMP0, TMP2, REF_2); - - vis_and(TMP12, MASK_7f, TMP12); - - vis_psub16(TMP14, TMP12, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - } while (--height); - - vis_ld64(ref[0], TMP0); - vis_xor(REF_0, REF_2, TMP4); - - vis_ld64_2(ref, offset, TMP2); - vis_and(TMP4, MASK_fe, TMP4); - - vis_or(REF_0, REF_2, TMP6); - vis_mul8x16(CONST_128, TMP4, TMP4); - - vis_faligndata(TMP0, TMP2, REF_0); - - vis_xor(REF_0, REF_2, TMP12); - - vis_and(TMP4, MASK_7f, TMP4); - - vis_and(TMP12, MASK_fe, TMP12); - - vis_mul8x16(CONST_128, TMP12, TMP12); - vis_or(REF_0, REF_2, TMP14); - - vis_psub16(TMP6, TMP4, DST_0); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_and(TMP12, MASK_7f, TMP12); - - vis_psub16(TMP14, TMP12, DST_0); - vis_st64(DST_0, dest[0]); -} - -static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int stride_8 = stride + 8; - int stride_16; - int offset; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 16 : 0; - - vis_ld64(ref[ 0], TMP0); - vis_fzero(ZERO); - - vis_ld64(ref[ 8], TMP2); - - vis_ld64_2(ref, offset, TMP4); - stride_16 = stride + offset; - - vis_ld64(constants3[0], CONST_3); - vis_faligndata(TMP0, TMP2, REF_2); - - vis_ld64(constants256_512[0], CONST_256); - vis_faligndata(TMP2, TMP4, REF_6); - height >>= 1; - - do { /* 31 cycles */ - vis_ld64_2(ref, stride, TMP0); - vis_pmerge(ZERO, REF_2, TMP12); - vis_mul8x16au(REF_2_1, CONST_256, TMP14); - - vis_ld64_2(ref, stride_8, TMP2); - vis_pmerge(ZERO, REF_6, TMP16); - vis_mul8x16au(REF_6_1, CONST_256, TMP18); - - vis_ld64_2(ref, stride_16, TMP4); - ref += stride; - - vis_ld64(dest[0], DST_0); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(dest, 8, DST_2); - vis_faligndata(TMP2, TMP4, REF_4); - - vis_ld64_2(ref, stride, TMP6); - vis_pmerge(ZERO, REF_0, TMP0); - vis_mul8x16au(REF_0_1, CONST_256, TMP2); - - vis_ld64_2(ref, stride_8, TMP8); - vis_pmerge(ZERO, REF_4, TMP4); - - vis_ld64_2(ref, stride_16, TMP10); - ref += stride; - - vis_ld64_2(dest, stride, REF_S0/*DST_4*/); - vis_faligndata(TMP6, TMP8, REF_2); - vis_mul8x16au(REF_4_1, CONST_256, TMP6); - - vis_ld64_2(dest, stride_8, REF_S2/*DST_6*/); - vis_faligndata(TMP8, TMP10, REF_6); - vis_mul8x16al(DST_0, CONST_512, TMP20); - - vis_padd16(TMP0, CONST_3, TMP0); - vis_mul8x16al(DST_1, CONST_512, TMP22); - - vis_padd16(TMP2, CONST_3, TMP2); - vis_mul8x16al(DST_2, CONST_512, TMP24); - - vis_padd16(TMP4, CONST_3, TMP4); - vis_mul8x16al(DST_3, CONST_512, TMP26); - - vis_padd16(TMP6, CONST_3, TMP6); - - vis_padd16(TMP12, TMP20, TMP12); - vis_mul8x16al(REF_S0, CONST_512, TMP20); - - vis_padd16(TMP14, TMP22, TMP14); - vis_mul8x16al(REF_S0_1, CONST_512, TMP22); - - vis_padd16(TMP16, TMP24, TMP16); - vis_mul8x16al(REF_S2, CONST_512, TMP24); - - vis_padd16(TMP18, TMP26, TMP18); - vis_mul8x16al(REF_S2_1, CONST_512, TMP26); - - vis_padd16(TMP12, TMP0, TMP12); - vis_mul8x16au(REF_2, CONST_256, TMP28); - - vis_padd16(TMP14, TMP2, TMP14); - vis_mul8x16au(REF_2_1, CONST_256, TMP30); - - vis_padd16(TMP16, TMP4, TMP16); - vis_mul8x16au(REF_6, CONST_256, REF_S4); - - vis_padd16(TMP18, TMP6, TMP18); - vis_mul8x16au(REF_6_1, CONST_256, REF_S6); - - vis_pack16(TMP12, DST_0); - vis_padd16(TMP28, TMP0, TMP12); - - vis_pack16(TMP14, DST_1); - vis_st64(DST_0, dest[0]); - vis_padd16(TMP30, TMP2, TMP14); - - vis_pack16(TMP16, DST_2); - vis_padd16(REF_S4, TMP4, TMP16); - - vis_pack16(TMP18, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - vis_padd16(REF_S6, TMP6, TMP18); - - vis_padd16(TMP12, TMP20, TMP12); - - vis_padd16(TMP14, TMP22, TMP14); - vis_pack16(TMP12, DST_0); - - vis_padd16(TMP16, TMP24, TMP16); - vis_pack16(TMP14, DST_1); - vis_st64(DST_0, dest[0]); - - vis_padd16(TMP18, TMP26, TMP18); - vis_pack16(TMP16, DST_2); - - vis_pack16(TMP18, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - } while (--height); -} - -static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - int stride_8; - int offset; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - offset = (ref != _ref) ? 8 : 0; - - vis_ld64(ref[ 0], TMP0); - vis_fzero(ZERO); - - vis_ld64_2(ref, offset, TMP2); - stride_8 = stride + offset; - - vis_ld64(constants3[0], CONST_3); - vis_faligndata(TMP0, TMP2, REF_2); - - vis_ld64(constants256_512[0], CONST_256); - - height >>= 1; - do { /* 20 cycles */ - vis_ld64_2(ref, stride, TMP0); - vis_pmerge(ZERO, REF_2, TMP8); - vis_mul8x16au(REF_2_1, CONST_256, TMP10); - - vis_ld64_2(ref, stride_8, TMP2); - ref += stride; - - vis_ld64(dest[0], DST_0); - - vis_ld64_2(dest, stride, DST_2); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, stride, TMP4); - vis_mul8x16al(DST_0, CONST_512, TMP16); - vis_pmerge(ZERO, REF_0, TMP12); - - vis_ld64_2(ref, stride_8, TMP6); - ref += stride; - vis_mul8x16al(DST_1, CONST_512, TMP18); - vis_pmerge(ZERO, REF_0_1, TMP14); - - vis_padd16(TMP12, CONST_3, TMP12); - vis_mul8x16al(DST_2, CONST_512, TMP24); - - vis_padd16(TMP14, CONST_3, TMP14); - vis_mul8x16al(DST_3, CONST_512, TMP26); - - vis_faligndata(TMP4, TMP6, REF_2); - - vis_padd16(TMP8, TMP12, TMP8); - - vis_padd16(TMP10, TMP14, TMP10); - vis_mul8x16au(REF_2, CONST_256, TMP20); - - vis_padd16(TMP8, TMP16, TMP0); - vis_mul8x16au(REF_2_1, CONST_256, TMP22); - - vis_padd16(TMP10, TMP18, TMP2); - vis_pack16(TMP0, DST_0); - - vis_pack16(TMP2, DST_1); - vis_st64(DST_0, dest[0]); - dest += stride; - vis_padd16(TMP12, TMP20, TMP12); - - vis_padd16(TMP14, TMP22, TMP14); - - vis_padd16(TMP12, TMP24, TMP0); - - vis_padd16(TMP14, TMP26, TMP2); - vis_pack16(TMP0, DST_2); - - vis_pack16(TMP2, DST_3); - vis_st64(DST_2, dest[0]); - dest += stride; - } while (--height); -} - -static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - int stride_8 = stride + 8; - int stride_16 = stride + 16; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - - vis_ld64(ref[ 0], TMP0); - vis_fzero(ZERO); - - vis_ld64(ref[ 8], TMP2); - - vis_ld64(ref[16], TMP4); - - vis_ld64(constants2[0], CONST_2); - vis_faligndata(TMP0, TMP2, REF_S0); - - vis_ld64(constants256_512[0], CONST_256); - vis_faligndata(TMP2, TMP4, REF_S4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S2); - vis_faligndata(TMP2, TMP4, REF_S6); - } else { - vis_src1(TMP2, REF_S2); - vis_src1(TMP4, REF_S6); - } - - height >>= 1; - do { - vis_ld64_2(ref, stride, TMP0); - vis_mul8x16au(REF_S0, CONST_256, TMP12); - vis_pmerge(ZERO, REF_S0_1, TMP14); - - vis_alignaddr_g0((void *)off); - - vis_ld64_2(ref, stride_8, TMP2); - vis_mul8x16au(REF_S2, CONST_256, TMP16); - vis_pmerge(ZERO, REF_S2_1, TMP18); - - vis_ld64_2(ref, stride_16, TMP4); - ref += stride; - vis_mul8x16au(REF_S4, CONST_256, TMP20); - vis_pmerge(ZERO, REF_S4_1, TMP22); - - vis_ld64_2(ref, stride, TMP6); - vis_mul8x16au(REF_S6, CONST_256, TMP24); - vis_pmerge(ZERO, REF_S6_1, TMP26); - - vis_ld64_2(ref, stride_8, TMP8); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, stride_16, TMP10); - ref += stride; - vis_faligndata(TMP2, TMP4, REF_4); - - vis_faligndata(TMP6, TMP8, REF_S0); - - vis_faligndata(TMP8, TMP10, REF_S4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - vis_faligndata(TMP6, TMP8, REF_S2); - vis_faligndata(TMP8, TMP10, REF_S6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - vis_src1(TMP8, REF_S2); - vis_src1(TMP10, REF_S6); - } - - vis_mul8x16au(REF_0, CONST_256, TMP0); - vis_pmerge(ZERO, REF_0_1, TMP2); - - vis_mul8x16au(REF_2, CONST_256, TMP4); - vis_pmerge(ZERO, REF_2_1, TMP6); - - vis_padd16(TMP0, CONST_2, TMP8); - vis_mul8x16au(REF_4, CONST_256, TMP0); - - vis_padd16(TMP2, CONST_2, TMP10); - vis_mul8x16au(REF_4_1, CONST_256, TMP2); - - vis_padd16(TMP8, TMP4, TMP8); - vis_mul8x16au(REF_6, CONST_256, TMP4); - - vis_padd16(TMP10, TMP6, TMP10); - vis_mul8x16au(REF_6_1, CONST_256, TMP6); - - vis_padd16(TMP12, TMP8, TMP12); - - vis_padd16(TMP14, TMP10, TMP14); - - vis_padd16(TMP12, TMP16, TMP12); - - vis_padd16(TMP14, TMP18, TMP14); - vis_pack16(TMP12, DST_0); - - vis_pack16(TMP14, DST_1); - vis_st64(DST_0, dest[0]); - vis_padd16(TMP0, CONST_2, TMP12); - - vis_mul8x16au(REF_S0, CONST_256, TMP0); - vis_padd16(TMP2, CONST_2, TMP14); - - vis_mul8x16au(REF_S0_1, CONST_256, TMP2); - vis_padd16(TMP12, TMP4, TMP12); - - vis_mul8x16au(REF_S2, CONST_256, TMP4); - vis_padd16(TMP14, TMP6, TMP14); - - vis_mul8x16au(REF_S2_1, CONST_256, TMP6); - vis_padd16(TMP20, TMP12, TMP20); - - vis_padd16(TMP22, TMP14, TMP22); - - vis_padd16(TMP20, TMP24, TMP20); - - vis_padd16(TMP22, TMP26, TMP22); - vis_pack16(TMP20, DST_2); - - vis_pack16(TMP22, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - vis_padd16(TMP0, TMP4, TMP24); - - vis_mul8x16au(REF_S4, CONST_256, TMP0); - vis_padd16(TMP2, TMP6, TMP26); - - vis_mul8x16au(REF_S4_1, CONST_256, TMP2); - vis_padd16(TMP24, TMP8, TMP24); - - vis_padd16(TMP26, TMP10, TMP26); - vis_pack16(TMP24, DST_0); - - vis_pack16(TMP26, DST_1); - vis_st64(DST_0, dest[0]); - vis_pmerge(ZERO, REF_S6, TMP4); - - vis_pmerge(ZERO, REF_S6_1, TMP6); - - vis_padd16(TMP0, TMP4, TMP0); - - vis_padd16(TMP2, TMP6, TMP2); - - vis_padd16(TMP0, TMP12, TMP0); - - vis_padd16(TMP2, TMP14, TMP2); - vis_pack16(TMP0, DST_2); - - vis_pack16(TMP2, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - } while (--height); -} - -static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - int stride_8 = stride + 8; - - vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - - vis_ld64(ref[ 0], TMP0); - vis_fzero(ZERO); - - vis_ld64(ref[ 8], TMP2); - - vis_ld64(constants2[0], CONST_2); - - vis_ld64(constants256_512[0], CONST_256); - vis_faligndata(TMP0, TMP2, REF_S0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S2); - } else { - vis_src1(TMP2, REF_S2); - } - - height >>= 1; - do { /* 26 cycles */ - vis_ld64_2(ref, stride, TMP0); - vis_mul8x16au(REF_S0, CONST_256, TMP8); - vis_pmerge(ZERO, REF_S2, TMP12); - - vis_alignaddr_g0((void *)off); - - vis_ld64_2(ref, stride_8, TMP2); - ref += stride; - vis_mul8x16au(REF_S0_1, CONST_256, TMP10); - vis_pmerge(ZERO, REF_S2_1, TMP14); - - vis_ld64_2(ref, stride, TMP4); - - vis_ld64_2(ref, stride_8, TMP6); - ref += stride; - vis_faligndata(TMP0, TMP2, REF_S4); - - vis_pmerge(ZERO, REF_S4, TMP18); - - vis_pmerge(ZERO, REF_S4_1, TMP20); - - vis_faligndata(TMP4, TMP6, REF_S0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S6); - vis_faligndata(TMP4, TMP6, REF_S2); - } else { - vis_src1(TMP2, REF_S6); - vis_src1(TMP6, REF_S2); - } - - vis_padd16(TMP18, CONST_2, TMP18); - vis_mul8x16au(REF_S6, CONST_256, TMP22); - - vis_padd16(TMP20, CONST_2, TMP20); - vis_mul8x16au(REF_S6_1, CONST_256, TMP24); - - vis_mul8x16au(REF_S0, CONST_256, TMP26); - vis_pmerge(ZERO, REF_S0_1, TMP28); - - vis_mul8x16au(REF_S2, CONST_256, TMP30); - vis_padd16(TMP18, TMP22, TMP18); - - vis_mul8x16au(REF_S2_1, CONST_256, TMP32); - vis_padd16(TMP20, TMP24, TMP20); - - vis_padd16(TMP8, TMP18, TMP8); - - vis_padd16(TMP10, TMP20, TMP10); - - vis_padd16(TMP8, TMP12, TMP8); - - vis_padd16(TMP10, TMP14, TMP10); - vis_pack16(TMP8, DST_0); - - vis_pack16(TMP10, DST_1); - vis_st64(DST_0, dest[0]); - dest += stride; - vis_padd16(TMP18, TMP26, TMP18); - - vis_padd16(TMP20, TMP28, TMP20); - - vis_padd16(TMP18, TMP30, TMP18); - - vis_padd16(TMP20, TMP32, TMP20); - vis_pack16(TMP18, DST_2); - - vis_pack16(TMP20, DST_3); - vis_st64(DST_2, dest[0]); - dest += stride; - } while (--height); -} - -static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - int stride_8 = stride + 8; - int stride_16 = stride + 16; - - vis_set_gsr(4 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - - vis_ld64(ref[ 0], TMP0); - vis_fzero(ZERO); - - vis_ld64(ref[ 8], TMP2); - - vis_ld64(ref[16], TMP4); - - vis_ld64(constants6[0], CONST_6); - vis_faligndata(TMP0, TMP2, REF_S0); - - vis_ld64(constants256_1024[0], CONST_256); - vis_faligndata(TMP2, TMP4, REF_S4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S2); - vis_faligndata(TMP2, TMP4, REF_S6); - } else { - vis_src1(TMP2, REF_S2); - vis_src1(TMP4, REF_S6); - } - - height >>= 1; - do { /* 55 cycles */ - vis_ld64_2(ref, stride, TMP0); - vis_mul8x16au(REF_S0, CONST_256, TMP12); - vis_pmerge(ZERO, REF_S0_1, TMP14); - - vis_alignaddr_g0((void *)off); - - vis_ld64_2(ref, stride_8, TMP2); - vis_mul8x16au(REF_S2, CONST_256, TMP16); - vis_pmerge(ZERO, REF_S2_1, TMP18); - - vis_ld64_2(ref, stride_16, TMP4); - ref += stride; - vis_mul8x16au(REF_S4, CONST_256, TMP20); - vis_pmerge(ZERO, REF_S4_1, TMP22); - - vis_ld64_2(ref, stride, TMP6); - vis_mul8x16au(REF_S6, CONST_256, TMP24); - vis_pmerge(ZERO, REF_S6_1, TMP26); - - vis_ld64_2(ref, stride_8, TMP8); - vis_faligndata(TMP0, TMP2, REF_0); - - vis_ld64_2(ref, stride_16, TMP10); - ref += stride; - vis_faligndata(TMP2, TMP4, REF_4); - - vis_ld64(dest[0], DST_0); - vis_faligndata(TMP6, TMP8, REF_S0); - - vis_ld64_2(dest, 8, DST_2); - vis_faligndata(TMP8, TMP10, REF_S4); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_2); - vis_faligndata(TMP2, TMP4, REF_6); - vis_faligndata(TMP6, TMP8, REF_S2); - vis_faligndata(TMP8, TMP10, REF_S6); - } else { - vis_src1(TMP2, REF_2); - vis_src1(TMP4, REF_6); - vis_src1(TMP8, REF_S2); - vis_src1(TMP10, REF_S6); - } - - vis_mul8x16al(DST_0, CONST_1024, TMP30); - vis_pmerge(ZERO, REF_0, TMP0); - - vis_mul8x16al(DST_1, CONST_1024, TMP32); - vis_pmerge(ZERO, REF_0_1, TMP2); - - vis_mul8x16au(REF_2, CONST_256, TMP4); - vis_pmerge(ZERO, REF_2_1, TMP6); - - vis_mul8x16al(DST_2, CONST_1024, REF_0); - vis_padd16(TMP0, CONST_6, TMP0); - - vis_mul8x16al(DST_3, CONST_1024, REF_2); - vis_padd16(TMP2, CONST_6, TMP2); - - vis_padd16(TMP0, TMP4, TMP0); - vis_mul8x16au(REF_4, CONST_256, TMP4); - - vis_padd16(TMP2, TMP6, TMP2); - vis_mul8x16au(REF_4_1, CONST_256, TMP6); - - vis_padd16(TMP12, TMP0, TMP12); - vis_mul8x16au(REF_6, CONST_256, TMP8); - - vis_padd16(TMP14, TMP2, TMP14); - vis_mul8x16au(REF_6_1, CONST_256, TMP10); - - vis_padd16(TMP12, TMP16, TMP12); - vis_mul8x16au(REF_S0, CONST_256, REF_4); - - vis_padd16(TMP14, TMP18, TMP14); - vis_mul8x16au(REF_S0_1, CONST_256, REF_6); - - vis_padd16(TMP12, TMP30, TMP12); - - vis_padd16(TMP14, TMP32, TMP14); - vis_pack16(TMP12, DST_0); - - vis_pack16(TMP14, DST_1); - vis_st64(DST_0, dest[0]); - vis_padd16(TMP4, CONST_6, TMP4); - - vis_ld64_2(dest, stride, DST_0); - vis_padd16(TMP6, CONST_6, TMP6); - vis_mul8x16au(REF_S2, CONST_256, TMP12); - - vis_padd16(TMP4, TMP8, TMP4); - vis_mul8x16au(REF_S2_1, CONST_256, TMP14); - - vis_padd16(TMP6, TMP10, TMP6); - - vis_padd16(TMP20, TMP4, TMP20); - - vis_padd16(TMP22, TMP6, TMP22); - - vis_padd16(TMP20, TMP24, TMP20); - - vis_padd16(TMP22, TMP26, TMP22); - - vis_padd16(TMP20, REF_0, TMP20); - vis_mul8x16au(REF_S4, CONST_256, REF_0); - - vis_padd16(TMP22, REF_2, TMP22); - vis_pack16(TMP20, DST_2); - - vis_pack16(TMP22, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - - vis_ld64_2(dest, 8, DST_2); - vis_mul8x16al(DST_0, CONST_1024, TMP30); - vis_pmerge(ZERO, REF_S4_1, REF_2); - - vis_mul8x16al(DST_1, CONST_1024, TMP32); - vis_padd16(REF_4, TMP0, TMP8); - - vis_mul8x16au(REF_S6, CONST_256, REF_4); - vis_padd16(REF_6, TMP2, TMP10); - - vis_mul8x16au(REF_S6_1, CONST_256, REF_6); - vis_padd16(TMP8, TMP12, TMP8); - - vis_padd16(TMP10, TMP14, TMP10); - - vis_padd16(TMP8, TMP30, TMP8); - - vis_padd16(TMP10, TMP32, TMP10); - vis_pack16(TMP8, DST_0); - - vis_pack16(TMP10, DST_1); - vis_st64(DST_0, dest[0]); - - vis_padd16(REF_0, TMP4, REF_0); - - vis_mul8x16al(DST_2, CONST_1024, TMP30); - vis_padd16(REF_2, TMP6, REF_2); - - vis_mul8x16al(DST_3, CONST_1024, TMP32); - vis_padd16(REF_0, REF_4, REF_0); - - vis_padd16(REF_2, REF_6, REF_2); - - vis_padd16(REF_0, TMP30, REF_0); - - /* stall */ - - vis_padd16(REF_2, TMP32, REF_2); - vis_pack16(REF_0, DST_2); - - vis_pack16(REF_2, DST_3); - vis_st64_2(DST_2, dest, 8); - dest += stride; - } while (--height); -} - -static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * _ref, - const int stride, int height) -{ - uint8_t *ref = (uint8_t *) _ref; - unsigned long off = (unsigned long) ref & 0x7; - unsigned long off_plus_1 = off + 1; - int stride_8 = stride + 8; - - vis_set_gsr(4 << VIS_GSR_SCALEFACT_SHIFT); - - ref = vis_alignaddr(ref); - - vis_ld64(ref[0], TMP0); - vis_fzero(ZERO); - - vis_ld64_2(ref, 8, TMP2); - - vis_ld64(constants6[0], CONST_6); - - vis_ld64(constants256_1024[0], CONST_256); - vis_faligndata(TMP0, TMP2, REF_S0); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S2); - } else { - vis_src1(TMP2, REF_S2); - } - - height >>= 1; - do { /* 31 cycles */ - vis_ld64_2(ref, stride, TMP0); - vis_mul8x16au(REF_S0, CONST_256, TMP8); - vis_pmerge(ZERO, REF_S0_1, TMP10); - - vis_ld64_2(ref, stride_8, TMP2); - ref += stride; - vis_mul8x16au(REF_S2, CONST_256, TMP12); - vis_pmerge(ZERO, REF_S2_1, TMP14); - - vis_alignaddr_g0((void *)off); - - vis_ld64_2(ref, stride, TMP4); - vis_faligndata(TMP0, TMP2, REF_S4); - - vis_ld64_2(ref, stride_8, TMP6); - ref += stride; - - vis_ld64(dest[0], DST_0); - vis_faligndata(TMP4, TMP6, REF_S0); - - vis_ld64_2(dest, stride, DST_2); - - if (off != 0x7) { - vis_alignaddr_g0((void *)off_plus_1); - vis_faligndata(TMP0, TMP2, REF_S6); - vis_faligndata(TMP4, TMP6, REF_S2); - } else { - vis_src1(TMP2, REF_S6); - vis_src1(TMP6, REF_S2); - } - - vis_mul8x16al(DST_0, CONST_1024, TMP30); - vis_pmerge(ZERO, REF_S4, TMP22); - - vis_mul8x16al(DST_1, CONST_1024, TMP32); - vis_pmerge(ZERO, REF_S4_1, TMP24); - - vis_mul8x16au(REF_S6, CONST_256, TMP26); - vis_pmerge(ZERO, REF_S6_1, TMP28); - - vis_mul8x16au(REF_S0, CONST_256, REF_S4); - vis_padd16(TMP22, CONST_6, TMP22); - - vis_mul8x16au(REF_S0_1, CONST_256, REF_S6); - vis_padd16(TMP24, CONST_6, TMP24); - - vis_mul8x16al(DST_2, CONST_1024, REF_0); - vis_padd16(TMP22, TMP26, TMP22); - - vis_mul8x16al(DST_3, CONST_1024, REF_2); - vis_padd16(TMP24, TMP28, TMP24); - - vis_mul8x16au(REF_S2, CONST_256, TMP26); - vis_padd16(TMP8, TMP22, TMP8); - - vis_mul8x16au(REF_S2_1, CONST_256, TMP28); - vis_padd16(TMP10, TMP24, TMP10); - - vis_padd16(TMP8, TMP12, TMP8); - - vis_padd16(TMP10, TMP14, TMP10); - - vis_padd16(TMP8, TMP30, TMP8); - - vis_padd16(TMP10, TMP32, TMP10); - vis_pack16(TMP8, DST_0); - - vis_pack16(TMP10, DST_1); - vis_st64(DST_0, dest[0]); - dest += stride; - - vis_padd16(REF_S4, TMP22, TMP12); - - vis_padd16(REF_S6, TMP24, TMP14); - - vis_padd16(TMP12, TMP26, TMP12); - - vis_padd16(TMP14, TMP28, TMP14); - - vis_padd16(TMP12, REF_0, TMP12); - - vis_padd16(TMP14, REF_2, TMP14); - vis_pack16(TMP12, DST_2); - - vis_pack16(TMP14, DST_3); - vis_st64(DST_2, dest[0]); - dest += stride; - } while (--height); -} - -MPEG2_MC_EXTERN(vis); - -#endif /* !(ARCH_SPARC) */ diff -Nru k9copy-2.1.0/src/mpeg2/mpeg2convert.h k9copy-2.2.0/src/mpeg2/mpeg2convert.h --- k9copy-2.1.0/src/mpeg2/mpeg2convert.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/mpeg2convert.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -/* - * mpeg2convert.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef MPEG2CONVERT_H -#define MPEG2CONVERT_H - -mpeg2_convert_t mpeg2convert_rgb32; -mpeg2_convert_t mpeg2convert_rgb24; -mpeg2_convert_t mpeg2convert_rgb16; -mpeg2_convert_t mpeg2convert_rgb15; -mpeg2_convert_t mpeg2convert_rgb8; -mpeg2_convert_t mpeg2convert_bgr32; -mpeg2_convert_t mpeg2convert_bgr24; -mpeg2_convert_t mpeg2convert_bgr16; -mpeg2_convert_t mpeg2convert_bgr15; -mpeg2_convert_t mpeg2convert_bgr8; - -typedef enum { - MPEG2CONVERT_RGB = 0, - MPEG2CONVERT_BGR = 1 -} mpeg2convert_rgb_order_t; - -mpeg2_convert_t * mpeg2convert_rgb (mpeg2convert_rgb_order_t order, - unsigned int bpp); - -mpeg2_convert_t mpeg2convert_uyvy; - -#endif /* MPEG2CONVERT_H */ diff -Nru k9copy-2.1.0/src/mpeg2/mpeg2.h k9copy-2.2.0/src/mpeg2/mpeg2.h --- k9copy-2.1.0/src/mpeg2/mpeg2.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/mpeg2.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,196 +0,0 @@ -/* - * mpeg2.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef MPEG2_H -#define MPEG2_H - -#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c)) -#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0) /* 0.4.0 */ - -#define SEQ_FLAG_MPEG2 1 -#define SEQ_FLAG_CONSTRAINED_PARAMETERS 2 -#define SEQ_FLAG_PROGRESSIVE_SEQUENCE 4 -#define SEQ_FLAG_LOW_DELAY 8 -#define SEQ_FLAG_COLOUR_DESCRIPTION 16 - -#define SEQ_MASK_VIDEO_FORMAT 0xe0 -#define SEQ_VIDEO_FORMAT_COMPONENT 0 -#define SEQ_VIDEO_FORMAT_PAL 0x20 -#define SEQ_VIDEO_FORMAT_NTSC 0x40 -#define SEQ_VIDEO_FORMAT_SECAM 0x60 -#define SEQ_VIDEO_FORMAT_MAC 0x80 -#define SEQ_VIDEO_FORMAT_UNSPECIFIED 0xa0 - -typedef struct mpeg2_sequence_s { - unsigned int width, height; - unsigned int chroma_width, chroma_height; - unsigned int byte_rate; - unsigned int vbv_buffer_size; - uint32_t flags; - - unsigned int picture_width, picture_height; - unsigned int display_width, display_height; - unsigned int pixel_width, pixel_height; - unsigned int frame_period; - - uint8_t profile_level_id; - uint8_t colour_primaries; - uint8_t transfer_characteristics; - uint8_t matrix_coefficients; -} mpeg2_sequence_t; - -#define GOP_FLAG_DROP_FRAME 1 -#define GOP_FLAG_BROKEN_LINK 2 -#define GOP_FLAG_CLOSED_GOP 4 - -typedef struct mpeg2_gop_s { - uint8_t hours; - uint8_t minutes; - uint8_t seconds; - uint8_t pictures; - uint32_t flags; -} mpeg2_gop_t; - -#define PIC_MASK_CODING_TYPE 7 -#define PIC_FLAG_CODING_TYPE_I 1 -#define PIC_FLAG_CODING_TYPE_P 2 -#define PIC_FLAG_CODING_TYPE_B 3 -#define PIC_FLAG_CODING_TYPE_D 4 - -#define PIC_FLAG_TOP_FIELD_FIRST 8 -#define PIC_FLAG_PROGRESSIVE_FRAME 16 -#define PIC_FLAG_COMPOSITE_DISPLAY 32 -#define PIC_FLAG_SKIP 64 -#define PIC_FLAG_TAGS 128 -#define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000 - -typedef struct mpeg2_picture_s { - unsigned int temporal_reference; - unsigned int nb_fields; - uint32_t tag, tag2; - uint32_t flags; - struct { - int x, y; - } display_offset[3]; -} mpeg2_picture_t; - -typedef struct mpeg2_fbuf_s { - uint8_t * buf[3]; - void * id; -} mpeg2_fbuf_t; - -typedef struct mpeg2_info_s { - const mpeg2_sequence_t * sequence; - const mpeg2_gop_t * gop; - const mpeg2_picture_t * current_picture; - const mpeg2_picture_t * current_picture_2nd; - const mpeg2_fbuf_t * current_fbuf; - const mpeg2_picture_t * display_picture; - const mpeg2_picture_t * display_picture_2nd; - const mpeg2_fbuf_t * display_fbuf; - const mpeg2_fbuf_t * discard_fbuf; - const uint8_t * user_data; - unsigned int user_data_len; -} mpeg2_info_t; - -typedef struct mpeg2dec_s mpeg2dec_t; -typedef struct mpeg2_decoder_s mpeg2_decoder_t; - -typedef enum { - STATE_BUFFER = 0, - STATE_SEQUENCE = 1, - STATE_SEQUENCE_REPEATED = 2, - STATE_GOP = 3, - STATE_PICTURE = 4, - STATE_SLICE_1ST = 5, - STATE_PICTURE_2ND = 6, - STATE_SLICE = 7, - STATE_END = 8, - STATE_INVALID = 9, - STATE_INVALID_END = 10 -} mpeg2_state_t; - -typedef struct mpeg2_convert_init_s { - unsigned int id_size; - unsigned int buf_size[3]; - void (* start) (void * id, const mpeg2_fbuf_t * fbuf, - const mpeg2_picture_t * picture, const mpeg2_gop_t * gop); - void (* copy) (void * id, uint8_t * const * src, unsigned int v_offset); -} mpeg2_convert_init_t; -typedef enum { - MPEG2_CONVERT_SET = 0, - MPEG2_CONVERT_STRIDE = 1, - MPEG2_CONVERT_START = 2 -} mpeg2_convert_stage_t; -typedef int mpeg2_convert_t (int stage, void * id, - const mpeg2_sequence_t * sequence, int stride, - uint32_t accel, void * arg, - mpeg2_convert_init_t * result); -int mpeg2_convert (mpeg2dec_t * mpeg2dec, mpeg2_convert_t convert, void * arg); -int mpeg2_stride (mpeg2dec_t * mpeg2dec, int stride); -void mpeg2_set_buf (mpeg2dec_t * mpeg2dec, uint8_t * buf[3], void * id); -void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf); - -#define MPEG2_ACCEL_X86_MMX 1 -#define MPEG2_ACCEL_X86_3DNOW 2 -#define MPEG2_ACCEL_X86_MMXEXT 4 -#define MPEG2_ACCEL_PPC_ALTIVEC 1 -#define MPEG2_ACCEL_ALPHA 1 -#define MPEG2_ACCEL_ALPHA_MVI 2 -#define MPEG2_ACCEL_SPARC_VIS 1 -#define MPEG2_ACCEL_SPARC_VIS2 2 -#define MPEG2_ACCEL_DETECT 0x80000000 - -uint32_t mpeg2_accel (uint32_t accel); -mpeg2dec_t * mpeg2_init (void); -const mpeg2_info_t * mpeg2_info (mpeg2dec_t * mpeg2dec); -void mpeg2_close (mpeg2dec_t * mpeg2dec); - -void mpeg2_buffer (mpeg2dec_t * mpeg2dec, uint8_t * start, uint8_t * end); -int mpeg2_getpos (mpeg2dec_t * mpeg2dec); -mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec); - -void mpeg2_reset (mpeg2dec_t * mpeg2dec, int full_reset); -void mpeg2_skip (mpeg2dec_t * mpeg2dec, int skip); -void mpeg2_slice_region (mpeg2dec_t * mpeg2dec, int start, int end); - -void mpeg2_tag_picture (mpeg2dec_t * mpeg2dec, uint32_t tag, uint32_t tag2); - -void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, uint8_t * current_fbuf[3], - uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3]); -void mpeg2_slice (mpeg2_decoder_t * decoder, int code, const uint8_t * buffer); - -typedef enum { - MPEG2_ALLOC_MPEG2DEC = 0, - MPEG2_ALLOC_CHUNK = 1, - MPEG2_ALLOC_YUV = 2, - MPEG2_ALLOC_CONVERT_ID = 3, - MPEG2_ALLOC_CONVERTED = 4 -} mpeg2_alloc_t; - -void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason); -void mpeg2_free (void * buf); -void mpeg2_malloc_hooks (void * malloc (unsigned, mpeg2_alloc_t), - int free (void *)); - -#endif /* MPEG2_H */ diff -Nru k9copy-2.1.0/src/mpeg2/mpeg2_internal.h k9copy-2.2.0/src/mpeg2/mpeg2_internal.h --- k9copy-2.1.0/src/mpeg2/mpeg2_internal.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/mpeg2_internal.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,300 +0,0 @@ -/* - * mpeg2_internal.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* macroblock modes */ -#define MACROBLOCK_INTRA 1 -#define MACROBLOCK_PATTERN 2 -#define MACROBLOCK_MOTION_BACKWARD 4 -#define MACROBLOCK_MOTION_FORWARD 8 -#define MACROBLOCK_QUANT 16 -#define DCT_TYPE_INTERLACED 32 -/* motion_type */ -#define MOTION_TYPE_SHIFT 6 -#define MC_FIELD 1 -#define MC_FRAME 2 -#define MC_16X8 2 -#define MC_DMV 3 - -/* picture structure */ -#define TOP_FIELD 1 -#define BOTTOM_FIELD 2 -#define FRAME_PICTURE 3 - -/* picture coding type */ -#define I_TYPE 1 -#define P_TYPE 2 -#define B_TYPE 3 -#define D_TYPE 4 - -typedef void mpeg2_mc_fct (uint8_t *, const uint8_t *, int, int); - -typedef struct { - uint8_t * ref[2][3]; - uint8_t ** ref2[2]; - int pmv[2][2]; - int f_code[2]; -} motion_t; - -typedef void motion_parser_t (mpeg2_decoder_t * decoder, - motion_t * motion, - mpeg2_mc_fct * const * table); - -struct mpeg2_decoder_s { - /* first, state that carries information from one macroblock to the */ - /* next inside a slice, and is never used outside of mpeg2_slice() */ - - /* bit parsing stuff */ - uint32_t bitstream_buf; /* current 32 bit working set */ - int bitstream_bits; /* used bits in working set */ - const uint8_t * bitstream_ptr; /* buffer with stream data */ - - uint8_t * dest[3]; - - int offset; - int stride; - int uv_stride; - int slice_stride; - int slice_uv_stride; - int stride_frame; - unsigned int limit_x; - unsigned int limit_y_16; - unsigned int limit_y_8; - unsigned int limit_y; - - /* Motion vectors */ - /* The f_ and b_ correspond to the forward and backward motion */ - /* predictors */ - motion_t b_motion; - motion_t f_motion; - motion_parser_t * motion_parser[5]; - - /* predictor for DC coefficients in intra blocks */ - int16_t dc_dct_pred[3]; - - /* DCT coefficients */ - int16_t DCTblock[64] ATTR_ALIGN(64); - - uint8_t * picture_dest[3]; - void (* convert) (void * convert_id, uint8_t * const * src, - unsigned int v_offset); - void * convert_id; - - int dmv_offset; - unsigned int v_offset; - - /* now non-slice-specific information */ - - /* sequence header stuff */ - uint16_t * quantizer_matrix[4]; - uint16_t (* chroma_quantizer[2])[64]; - uint16_t quantizer_prescale[4][32][64]; - - /* The width and height of the picture snapped to macroblock units */ - int width; - int height; - int vertical_position_extension; - int chroma_format; - - /* picture header stuff */ - - /* what type of picture this is (I, P, B, D) */ - int coding_type; - - /* picture coding extension stuff */ - - /* quantization factor for intra dc coefficients */ - int intra_dc_precision; - /* top/bottom/both fields */ - int picture_structure; - /* bool to indicate all predictions are frame based */ - int frame_pred_frame_dct; - /* bool to indicate whether intra blocks have motion vectors */ - /* (for concealment) */ - int concealment_motion_vectors; - /* bool to use different vlc tables */ - int intra_vlc_format; - /* used for DMV MC */ - int top_field_first; - - /* stuff derived from bitstream */ - - /* pointer to the zigzag scan we're supposed to be using */ - const uint8_t * scan; - - int second_field; - - int mpeg1; -}; - -typedef struct { - mpeg2_fbuf_t fbuf; -} fbuf_alloc_t; - -struct mpeg2dec_s { - mpeg2_decoder_t decoder; - - mpeg2_info_t info; - - uint32_t shift; - int is_display_initialized; - mpeg2_state_t (* action) (struct mpeg2dec_s * mpeg2dec); - mpeg2_state_t state; - uint32_t ext_state; - - /* allocated in init - gcc has problems allocating such big structures */ - uint8_t * chunk_buffer; - /* pointer to start of the current chunk */ - uint8_t * chunk_start; - /* pointer to current position in chunk_buffer */ - uint8_t * chunk_ptr; - /* last start code ? */ - uint8_t code; - - /* picture tags */ - uint32_t tag_current, tag2_current, tag_previous, tag2_previous; - int num_tags; - int bytes_since_tag; - - int first; - int alloc_index_user; - int alloc_index; - uint8_t first_decode_slice; - uint8_t nb_decode_slices; - - unsigned int user_data_len; - - mpeg2_sequence_t new_sequence; - mpeg2_sequence_t sequence; - mpeg2_gop_t new_gop; - mpeg2_gop_t gop; - mpeg2_picture_t new_picture; - mpeg2_picture_t pictures[4]; - mpeg2_picture_t * picture; - /*const*/ mpeg2_fbuf_t * fbuf[3]; /* 0: current fbuf, 1-2: prediction fbufs */ - - fbuf_alloc_t fbuf_alloc[3]; - int custom_fbuf; - - uint8_t * yuv_buf[3][3]; - int yuv_index; - mpeg2_convert_t * convert; - void * convert_arg; - unsigned int convert_id_size; - int convert_stride; - void (* convert_start) (void * id, const mpeg2_fbuf_t * fbuf, - const mpeg2_picture_t * picture, - const mpeg2_gop_t * gop); - - uint8_t * buf_start; - uint8_t * buf_end; - - int16_t display_offset_x, display_offset_y; - - int copy_matrix; - int8_t q_scale_type, scaled[4]; - uint8_t quantizer_matrix[4][64]; - uint8_t new_quantizer_matrix[4][64]; -}; - -typedef struct { -#ifdef ARCH_PPC - uint8_t regv[12*16]; -#endif - int dummy; -} cpu_state_t; - -/* cpu_accel.c */ -uint32_t mpeg2_detect_accel (void); - -/* cpu_state.c */ -void mpeg2_cpu_state_init (uint32_t accel); - -/* decode.c */ -mpeg2_state_t mpeg2_seek_header (mpeg2dec_t * mpeg2dec); -mpeg2_state_t mpeg2_parse_header (mpeg2dec_t * mpeg2dec); - -/* header.c */ -void mpeg2_header_state_init (mpeg2dec_t * mpeg2dec); -void mpeg2_reset_info (mpeg2_info_t * info); -int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec); -int mpeg2_header_gop (mpeg2dec_t * mpeg2dec); -mpeg2_state_t mpeg2_header_picture_start (mpeg2dec_t * mpeg2dec); -int mpeg2_header_picture (mpeg2dec_t * mpeg2dec); -int mpeg2_header_extension (mpeg2dec_t * mpeg2dec); -int mpeg2_header_user_data (mpeg2dec_t * mpeg2dec); -void mpeg2_header_sequence_finalize (mpeg2dec_t * mpeg2dec); -void mpeg2_header_gop_finalize (mpeg2dec_t * mpeg2dec); -void mpeg2_header_picture_finalize (mpeg2dec_t * mpeg2dec, uint32_t accels); -mpeg2_state_t mpeg2_header_slice_start (mpeg2dec_t * mpeg2dec); -mpeg2_state_t mpeg2_header_end (mpeg2dec_t * mpeg2dec); -void mpeg2_set_fbuf (mpeg2dec_t * mpeg2dec, int b_type); - -/* idct.c */ -void mpeg2_idct_init (uint32_t accel); - -/* idct_mmx.c */ -void mpeg2_idct_copy_mmxext (int16_t * block, uint8_t * dest, int stride); -void mpeg2_idct_add_mmxext (int last, int16_t * block, - uint8_t * dest, int stride); -void mpeg2_idct_copy_mmx (int16_t * block, uint8_t * dest, int stride); -void mpeg2_idct_add_mmx (int last, int16_t * block, - uint8_t * dest, int stride); -void mpeg2_idct_mmx_init (void); - -/* idct_altivec.c */ -void mpeg2_idct_copy_altivec (int16_t * block, uint8_t * dest, int stride); -void mpeg2_idct_add_altivec (int last, int16_t * block, - uint8_t * dest, int stride); -void mpeg2_idct_altivec_init (void); - -/* idct_alpha.c */ -void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, int stride); -void mpeg2_idct_add_mvi (int last, int16_t * block, - uint8_t * dest, int stride); -void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, int stride); -void mpeg2_idct_add_alpha (int last, int16_t * block, - uint8_t * dest, int stride); -void mpeg2_idct_alpha_init (void); - -/* motion_comp.c */ -void mpeg2_mc_init (uint32_t accel); - -typedef struct { - mpeg2_mc_fct * put [8]; - mpeg2_mc_fct * avg [8]; -} mpeg2_mc_t; - -#define MPEG2_MC_EXTERN(x) mpeg2_mc_t mpeg2_mc_##x = { \ - {MC_put_o_16_##x, MC_put_x_16_##x, MC_put_y_16_##x, MC_put_xy_16_##x, \ - MC_put_o_8_##x, MC_put_x_8_##x, MC_put_y_8_##x, MC_put_xy_8_##x}, \ - {MC_avg_o_16_##x, MC_avg_x_16_##x, MC_avg_y_16_##x, MC_avg_xy_16_##x, \ - MC_avg_o_8_##x, MC_avg_x_8_##x, MC_avg_y_8_##x, MC_avg_xy_8_##x} \ -}; - -extern mpeg2_mc_t mpeg2_mc_c; -extern mpeg2_mc_t mpeg2_mc_mmx; -extern mpeg2_mc_t mpeg2_mc_mmxext; -extern mpeg2_mc_t mpeg2_mc_3dnow; -extern mpeg2_mc_t mpeg2_mc_altivec; -extern mpeg2_mc_t mpeg2_mc_alpha; -extern mpeg2_mc_t mpeg2_mc_vis; diff -Nru k9copy-2.1.0/src/mpeg2/rgb.cpp k9copy-2.2.0/src/mpeg2/rgb.cpp --- k9copy-2.1.0/src/mpeg2/rgb.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/rgb.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,583 +0,0 @@ -/* - * rgb.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "k9common.h" - -#include "attributes.h" -#include "mpeg2.h" -#include "mpeg2convert.h" -#include "convert_internal.h" - -static int matrix_coefficients = 6; - -static const int Inverse_Table_6_9[8][4] = { - {117504, 138453, 13954, 34903}, /* no sequence_display_extension */ - {117504, 138453, 13954, 34903}, /* ITU-R Rec. 709 (1990) */ - {104597, 132201, 25675, 53279}, /* unspecified */ - {104597, 132201, 25675, 53279}, /* reserved */ - {104448, 132798, 24759, 53109}, /* FCC */ - {104597, 132201, 25675, 53279}, /* ITU-R Rec. 624-4 System B, G */ - {104597, 132201, 25675, 53279}, /* SMPTE 170M */ - {117579, 136230, 16907, 35559} /* SMPTE 240M (1987) */ -}; - -static const uint8_t dither[] ATTR_ALIGN(32) = { - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35, - 3, 9, 27, 63, 1, 4, 25, 59, 5, 12, 28, 67, 3, 7, 26, 62, - 3, 9, 27, 63, 1, 4, 25, 59, 5, 12, 28, 67, 3, 7, 26, 62, - 3, 9, 27, 63, 1, 4, 25, 59, 5, 12, 28, 67, 3, 7, 26, 62, - 3, 9, 27, 63, 1, 4, 25, 59, 5, 12, 28, 67, 3, 7, 26, 62, - 19, 45, 11, 27, 17, 41, 9, 22, 21, 49, 13, 30, 19, 44, 11, 26, - 19, 45, 11, 27, 17, 41, 9, 22, 21, 49, 13, 30, 19, 44, 11, 26, - 19, 45, 11, 27, 17, 41, 9, 22, 21, 49, 13, 30, 19, 44, 11, 26, - 19, 45, 11, 27, 17, 41, 9, 22, 21, 49, 13, 30, 19, 44, 11, 26, - 0, 2, 24, 57, 6, 15, 30, 70, 0, 1, 23, 55, 6, 14, 29, 69, - 0, 2, 24, 57, 6, 15, 30, 70, 0, 1, 23, 55, 6, 14, 29, 69, - 0, 2, 24, 57, 6, 15, 30, 70, 0, 1, 23, 55, 6, 14, 29, 69, - 0, 2, 24, 57, 6, 15, 30, 70, 0, 1, 23, 55, 6, 14, 29, 69, - 16, 38, 8, 20, 22, 52, 14, 34, 16, 37, 8, 19, 21, 51, 14, 33, - 16, 38, 8, 20, 22, 52, 14, 34, 16, 37, 8, 19, 21, 51, 14, 33, - 16, 38, 8, 20, 22, 52, 14, 34, 16, 37, 8, 19, 21, 51, 14, 33, - 16, 38, 8, 20, 22, 52, 14, 34, 16, 37, 8, 19, 21, 51, 14, 33, - 4, 11, 28, 66, 2, 6, 26, 61, 4, 10, 27, 65, 2, 5, 25, 60, - 4, 11, 28, 66, 2, 6, 26, 61, 4, 10, 27, 65, 2, 5, 25, 60, - 4, 11, 28, 66, 2, 6, 26, 61, 4, 10, 27, 65, 2, 5, 25, 60, - 4, 11, 28, 66, 2, 6, 26, 61, 4, 10, 27, 65, 2, 5, 25, 60, - 20, 47, 12, 29, 18, 43, 10, 25, 20, 46, 12, 28, 18, 42, 10, 23, - 20, 47, 12, 29, 18, 43, 10, 25, 20, 46, 12, 28, 18, 42, 10, 23, - 20, 47, 12, 29, 18, 43, 10, 25, 20, 46, 12, 28, 18, 42, 10, 23, - 20, 47, 12, 29, 18, 43, 10, 25, 20, 46, 12, 28, 18, 42, 10, 23, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 0, 0, 23, 54, 5, 13, 29, 68, 1, 3, 24, 58, 7, 17, 30, 71, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35, - 15, 36, 7, 18, 21, 50, 13, 31, 17, 39, 9, 21, 22, 53, 15, 35 -}; - -static const uint8_t dither_temporal[64] = { - 0x00, 0x20, 0x21, 0x01, 0x40, 0x60, 0x61, 0x41, - 0x42, 0x62, 0x63, 0x43, 0x02, 0x22, 0x23, 0x03, - 0x80, 0xa0, 0xa1, 0x81, 0xc0, 0xe0, 0xe1, 0xc1, - 0xc2, 0xe2, 0xe3, 0xc3, 0x82, 0xa2, 0xa3, 0x83, - 0x84, 0xa4, 0xa5, 0x85, 0xc4, 0xe4, 0xe5, 0xc5, - 0xc6, 0xe6, 0xe7, 0xc7, 0x86, 0xa6, 0xa7, 0x87, - 0x04, 0x24, 0x25, 0x05, 0x44, 0x64, 0x65, 0x45, - 0x46, 0x66, 0x67, 0x47, 0x06, 0x26, 0x27, 0x07 -}; - -typedef struct { - convert_rgb_t base; - void * table_rV[256]; - void * table_gU[256]; - int table_gV[256]; - void * table_bU[256]; -} convert_rgb_c_t; - -#define RGB(type,i) \ - U = pu[i]; \ - V = pv[i]; \ - r = (type *) id->table_rV[V]; \ - g = (type *) (((uint8_t *)id->table_gU[U]) + id->table_gV[V]); \ - b = (type *) id->table_bU[U]; - -#define DST(py,dst,i,j) \ - Y = py[i]; \ - dst[i] = r[Y] + g[Y] + b[Y]; - -#define DSTRGB(py,dst,i,j) \ - Y = py[i]; \ - dst[3*i] = r[Y]; dst[3*i+1] = g[Y]; dst[3*i+2] = b[Y]; - -#define DSTBGR(py,dst,i,j) \ - Y = py[i]; \ - dst[3*i] = b[Y]; dst[3*i+1] = g[Y]; dst[3*i+2] = r[Y]; - -#define DSTDITHER(py,dst,i,j) \ - Y = py[i]; \ - dst[i] = r[Y+pd[2*i+96*j]] + g[Y-pd[2*i+96*j]] + b[Y+pd[2*i+1+96*j]]; - -#define DO(x) x -#define SKIP(x) - -#define DECLARE_420(func,type,num,DST,DITHER) \ -static void func (void * _id, uint8_t * const * src, \ - unsigned int v_offset) \ -{ \ - const convert_rgb_c_t * const id = (convert_rgb_c_t *) _id; \ - type * dst_1; \ - const uint8_t * py_1, * pu, * pv; \ - int i; \ - DITHER(uint8_t dithpos = id->base.dither_offset;) \ - \ - dst_1 = (type *)(id->base.rgb_ptr + id->base.rgb_stride * v_offset);\ - py_1 = src[0]; pu = src[1]; pv = src[2]; \ - \ - i = 8; \ - do { \ - const uint8_t * py_2; \ - int j, U, V, Y; \ - const type * r, * g, * b; \ - type * dst_2; \ - DITHER(const uint8_t * const pd = dither + 2 * dithpos;) \ - \ - dst_2 = (type *)((char *)dst_1 + id->base.rgb_stride); \ - py_2 = py_1 + id->base.y_stride; \ - j = id->base.width; \ - do { \ - RGB (type, 0) \ - DST (py_1, dst_1, 0, 0) \ - DST (py_1, dst_1, 1, 0) \ - DST (py_2, dst_2, 0, 1) \ - DST (py_2, dst_2, 1, 1) \ - \ - RGB (type, 1) \ - DST (py_2, dst_2, 2, 1) \ - DST (py_2, dst_2, 3, 1) \ - DST (py_1, dst_1, 2, 0) \ - DST (py_1, dst_1, 3, 0) \ - \ - RGB (type, 2) \ - DST (py_1, dst_1, 4, 0) \ - DST (py_1, dst_1, 5, 0) \ - DST (py_2, dst_2, 4, 1) \ - DST (py_2, dst_2, 5, 1) \ - \ - RGB (type, 3) \ - DST (py_2, dst_2, 6, 1) \ - DST (py_2, dst_2, 7, 1) \ - DST (py_1, dst_1, 6, 0) \ - DST (py_1, dst_1, 7, 0) \ - \ - pu += 4; \ - pv += 4; \ - py_1 += 8; \ - py_2 += 8; \ - dst_1 += 8 * num; \ - dst_2 += 8 * num; \ - } while (--j); \ - py_1 += id->base.y_increm; \ - pu += id->base.uv_increm; \ - pv += id->base.uv_increm; \ - dst_1 = (type *)((char *)dst_1 + id->base.rgb_increm); \ - DITHER(dithpos += id->base.dither_stride;) \ - } while (--i); \ -} - -DECLARE_420 (rgb_c_32_420, uint32_t, 1, DST, SKIP) -DECLARE_420 (rgb_c_24_rgb_420, uint8_t, 3, DSTRGB, SKIP) -DECLARE_420 (rgb_c_24_bgr_420, uint8_t, 3, DSTBGR, SKIP) -DECLARE_420 (rgb_c_16_420, uint16_t, 1, DST, SKIP) -DECLARE_420 (rgb_c_8_420, uint8_t, 1, DSTDITHER, DO) - -#define DECLARE_422(func,type,num,DST,DITHER) \ -static void func (void * _id, uint8_t * const * src, \ - unsigned int v_offset) \ -{ \ - const convert_rgb_c_t * const id = (convert_rgb_c_t *) _id; \ - type * dst; \ - const uint8_t * py, * pu, * pv; \ - int i; \ - DITHER(uint8_t dithpos = id->base.dither_offset;) \ - \ - dst = (type *)(id->base.rgb_ptr + id->base.rgb_stride * v_offset); \ - py = src[0]; pu = src[1]; pv = src[2]; \ - \ - i = 16; \ - do { \ - int j, U, V, Y; \ - const type * r, * g, * b; \ - DITHER(const uint8_t * const pd = dither + 2 * dithpos;) \ - \ - j = id->base.width; \ - do { \ - RGB (type, 0) \ - DST (py, dst, 0, 0) \ - DST (py, dst, 1, 0) \ - \ - RGB (type, 1) \ - DST (py, dst, 2, 0) \ - DST (py, dst, 3, 0) \ - \ - RGB (type, 2) \ - DST (py, dst, 4, 0) \ - DST (py, dst, 5, 0) \ - \ - RGB (type, 3) \ - DST (py, dst, 6, 0) \ - DST (py, dst, 7, 0) \ - \ - pu += 4; \ - pv += 4; \ - py += 8; \ - dst += 8 * num; \ - } while (--j); \ - py += id->base.y_increm; \ - pu += id->base.uv_increm; \ - pv += id->base.uv_increm; \ - dst = (type *)((char *)dst + id->base.rgb_increm); \ - DITHER(dithpos += id->base.dither_stride;) \ - } while (--i); \ -} - -DECLARE_422 (rgb_c_32_422, uint32_t, 1, DST, SKIP) -DECLARE_422 (rgb_c_24_rgb_422, uint8_t, 3, DSTRGB, SKIP) -DECLARE_422 (rgb_c_24_bgr_422, uint8_t, 3, DSTBGR, SKIP) -DECLARE_422 (rgb_c_16_422, uint16_t, 1, DST, SKIP) -DECLARE_422 (rgb_c_8_422, uint8_t, 1, DSTDITHER, DO) - -#define DECLARE_444(func,type,num,DST,DITHER) \ -static void func (void * _id, uint8_t * const * src, \ - unsigned int v_offset) \ -{ \ - const convert_rgb_c_t * const id = (convert_rgb_c_t *) _id; \ - type * dst; \ - const uint8_t * py, * pu, * pv; \ - int i; \ - DITHER(uint8_t dithpos = id->base.dither_offset;) \ - \ - dst = (type *)(id->base.rgb_ptr + id->base.rgb_stride * v_offset); \ - py = src[0]; pu = src[1]; pv = src[2]; \ - \ - i = 16; \ - do { \ - int j, U, V, Y; \ - const type * r, * g, * b; \ - DITHER(const uint8_t * const pd = dither + 2 * dithpos;) \ - \ - j = id->base.width; \ - do { \ - RGB (type, 0) \ - DST (py, dst, 0, 0) \ - RGB (type, 1) \ - DST (py, dst, 1, 0) \ - RGB (type, 2) \ - DST (py, dst, 2, 0) \ - RGB (type, 3) \ - DST (py, dst, 3, 0) \ - RGB (type, 4) \ - DST (py, dst, 4, 0) \ - RGB (type, 5) \ - DST (py, dst, 5, 0) \ - RGB (type, 6) \ - DST (py, dst, 6, 0) \ - RGB (type, 7) \ - DST (py, dst, 7, 0) \ - \ - pu += 8; \ - pv += 8; \ - py += 8; \ - dst += 8 * num; \ - } while (--j); \ - py += id->base.y_increm; \ - pu += id->base.y_increm; \ - pv += id->base.y_increm; \ - dst = (type *)((char *)dst + id->base.rgb_increm); \ - DITHER(dithpos += id->base.dither_stride;) \ - } while (--i); \ -} - -DECLARE_444 (rgb_c_32_444, uint32_t, 1, DST, SKIP) -DECLARE_444 (rgb_c_24_rgb_444, uint8_t, 3, DSTRGB, SKIP) -DECLARE_444 (rgb_c_24_bgr_444, uint8_t, 3, DSTBGR, SKIP) -DECLARE_444 (rgb_c_16_444, uint16_t, 1, DST, SKIP) -DECLARE_444 (rgb_c_8_444, uint8_t, 1, DSTDITHER, DO) - -static void rgb_start (void * _id, const mpeg2_fbuf_t * fbuf, - const mpeg2_picture_t * picture, - const mpeg2_gop_t * gop) -{ - convert_rgb_t * id = (convert_rgb_t *) _id; - int uv_stride = id->uv_stride_frame; - id->y_stride = id->y_stride_frame; - id->rgb_ptr = fbuf->buf[0]; - id->rgb_stride = id->rgb_stride_frame; - id->dither_stride = 32; - id->dither_offset = dither_temporal[picture->temporal_reference & 63]; - if (picture->nb_fields == 1) { - uv_stride <<= 1; - id->y_stride <<= 1; - id->rgb_stride <<= 1; - id->dither_stride <<= 1; - id->dither_offset += 16; - if (!(picture->flags & PIC_FLAG_TOP_FIELD_FIRST)) { - id->rgb_ptr += id->rgb_stride_frame; - id->dither_offset += 32; - } - } - id->y_increm = (id->y_stride << id->convert420) - id->y_stride_frame; - id->uv_increm = uv_stride - id->uv_stride_frame; - id->rgb_increm = (id->rgb_stride << id->convert420) - id->rgb_stride_min; - id->dither_stride <<= id->convert420; -} - -static inline int div_round (int dividend, int divisor) -{ - if (dividend > 0) - return (dividend + (divisor>>1)) / divisor; - else - return -((-dividend + (divisor>>1)) / divisor); -} - -static unsigned int rgb_c_init (convert_rgb_c_t * id, - mpeg2convert_rgb_order_t order, - unsigned int bpp) -{ - int i; - uint8_t table_Y[1024]; - uint32_t * table_32 = 0; - uint16_t * table_16 = 0; - uint8_t * table_8 = 0; - uint8_t * table_332 = 0; - int entry_size = 0; - void * table_r = 0; - void * table_g = 0; - void * table_b = 0; - - int crv = Inverse_Table_6_9[matrix_coefficients][0]; - int cbu = Inverse_Table_6_9[matrix_coefficients][1]; - int cgu = -Inverse_Table_6_9[matrix_coefficients][2]; - int cgv = -Inverse_Table_6_9[matrix_coefficients][3]; - - for (i = 0; i < 1024; i++) { - int j; - - j = (76309 * (i - 384 - 16) + 32768) >> 16; - table_Y[i] = (j < 0) ? 0 : ((j > 255) ? 255 : j); - } - - switch (bpp) { - case 32: - if (!id) - return (197 + 2*682 + 256 + 132) * sizeof (uint32_t); - table_32 = (uint32_t *) (id + 1); - entry_size = sizeof (uint32_t); - table_r = table_32 + 197; - table_b = table_32 + 197 + 685; - table_g = table_32 + 197 + 2*682; - - for (i = -197; i < 256+197; i++) - ((uint32_t *) table_r)[i] = - table_Y[i+384] << ((order == MPEG2CONVERT_RGB) ? 16 : 0); - for (i = -132; i < 256+132; i++) - ((uint32_t *) table_g)[i] = table_Y[i+384] << 8; - for (i = -232; i < 256+232; i++) - ((uint32_t *) table_b)[i] = - table_Y[i+384] << ((order == MPEG2CONVERT_RGB) ? 0 : 16); - break; - - case 24: - if (!id) - return (256 + 2*232) * sizeof (uint8_t); - table_8 = (uint8_t *) (id + 1); - entry_size = sizeof (uint8_t); - table_r = table_g = table_b = table_8 + 232; - - for (i = -232; i < 256+232; i++) - ((uint8_t * )table_b)[i] = table_Y[i+384]; - break; - - case 15: - case 16: - if (!id) - return (197 + 2*682 + 256 + 132) * sizeof (uint16_t); - table_16 = (uint16_t *) (id + 1); - entry_size = sizeof (uint16_t); - table_r = table_16 + 197; - table_b = table_16 + 197 + 685; - table_g = table_16 + 197 + 2*682; - - for (i = -197; i < 256+197; i++) { - int j = table_Y[i+384] >> 3; - - if (order == MPEG2CONVERT_RGB) - j <<= ((bpp==16) ? 11 : 10); - - ((uint16_t *)table_r)[i] = j; - } - for (i = -132; i < 256+132; i++) { - int j = table_Y[i+384] >> ((bpp==16) ? 2 : 3); - - ((uint16_t *)table_g)[i] = j << 5; - } - for (i = -232; i < 256+232; i++) { - int j = table_Y[i+384] >> 3; - - if (order == MPEG2CONVERT_BGR) - j <<= ((bpp==16) ? 11 : 10); - - ((uint16_t *)table_b)[i] = j; - } - break; - - case 8: - if (!id) - return (197 + 2*682 + 256 + 232 + 71) * sizeof (uint8_t); - table_332 = (uint8_t *) (id + 1); - entry_size = sizeof (uint8_t); - table_r = table_332 + 197; - table_g = table_332 + 197 + 682 + 30; - table_b = table_332 + 197 + 2*682; - - for (i = -197; i < 256+197+30; i++) - ((uint8_t *)table_r)[i] = ((table_Y[i+384] * 7 / 255) << - (order == MPEG2CONVERT_RGB ? 5 : 0)); - for (i = -132; i < 256+132+30; i++) - ((uint8_t *)table_g)[i-30] = ((table_Y[i+384] * 7 / 255) << - (order == MPEG2CONVERT_RGB ? 2 : 3)); - for (i = -232; i < 256+232+71; i++) - ((uint8_t *)table_b)[i] = ((table_Y[i+384] / 85) << - (order == MPEG2CONVERT_RGB ? 0 : 6)); - break; - } - - for (i = 0; i < 256; i++) { - id->table_rV[i] = (((uint8_t *)table_r) + - entry_size * div_round (crv * (i-128), 76309)); - id->table_gU[i] = (((uint8_t *)table_g) + - entry_size * div_round (cgu * (i-128), 76309)); - id->table_gV[i] = entry_size * div_round (cgv * (i-128), 76309); - id->table_bU[i] = (((uint8_t *)table_b) + - entry_size * div_round (cbu * (i-128), 76309)); - } - - return 0; -} - -static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp, - int stage, void * _id, const mpeg2_sequence_t * seq, - int stride, uint32_t accel, void * arg, - mpeg2_convert_init_t * result) -{ - convert_rgb_t * id = (convert_rgb_t *) _id; - mpeg2convert_copy_t * copy = (mpeg2convert_copy_t *) 0; - unsigned int id_size = sizeof (convert_rgb_t); - int chroma420 = (seq->chroma_height < seq->height); - int convert420 = 0; - int rgb_stride_min = ((bpp + 7) >> 3) * seq->width; - -#ifdef ARCH_X86 - if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) { - convert420 = 0; - copy = mpeg2convert_rgb_mmxext (order, bpp, seq); - } - if (!copy && (accel & MPEG2_ACCEL_X86_MMX)) { - convert420 = 0; - copy = mpeg2convert_rgb_mmx (order, bpp, seq); - } -#endif -#ifdef ARCH_SPARC - if (!copy && (accel & MPEG2_ACCEL_SPARC_VIS)) { - convert420 = chroma420; - copy = mpeg2convert_rgb_vis (order, bpp, seq); - } -#endif - if (!copy) { - int src, dest; - static void (* rgb_c[3][5]) (void *, uint8_t * const *, - unsigned int) = - {{rgb_c_24_bgr_420, rgb_c_8_420, rgb_c_16_420, - rgb_c_24_rgb_420, rgb_c_32_420}, - {rgb_c_24_bgr_422, rgb_c_8_422, rgb_c_16_422, - rgb_c_24_rgb_422, rgb_c_32_422}, - {rgb_c_24_bgr_444, rgb_c_8_444, rgb_c_16_444, - rgb_c_24_rgb_444, rgb_c_32_444}}; - - convert420 = chroma420; - id_size = (sizeof (convert_rgb_c_t) + - rgb_c_init ((convert_rgb_c_t *) id, order, bpp)); - src = ((seq->chroma_width == seq->width) + - (seq->chroma_height == seq->height)); - dest = ((bpp == 24 && order == MPEG2CONVERT_BGR) ? 0 : (bpp + 7) >> 3); - copy = rgb_c[src][dest]; - } - - result->id_size = id_size; - - if (stride < rgb_stride_min) - stride = rgb_stride_min; - - if (stage == MPEG2_CONVERT_STRIDE) - return stride; - else if (stage == MPEG2_CONVERT_START) { - id->width = seq->width >> 3; - id->y_stride_frame = seq->width; - id->uv_stride_frame = seq->chroma_width; - id->rgb_stride_frame = stride; - id->rgb_stride_min = rgb_stride_min; - id->chroma420 = chroma420; - id->convert420 = convert420; - result->buf_size[0] = stride * seq->height; - result->buf_size[1] = result->buf_size[2] = 0; - result->start = rgb_start; - result->copy = copy; - } - return 0; -} - -#define DECLARE(func,order,bpp) \ -int func (int stage, void * id, \ - const mpeg2_sequence_t * sequence, int stride, \ - uint32_t accel, void * arg, mpeg2_convert_init_t * result) \ -{ \ - return rgb_internal (order, bpp, stage, id, sequence, stride, \ - accel, arg, result); \ -} - -DECLARE (mpeg2convert_rgb32, MPEG2CONVERT_RGB, 32) -DECLARE (mpeg2convert_rgb24, MPEG2CONVERT_RGB, 24) -DECLARE (mpeg2convert_rgb16, MPEG2CONVERT_RGB, 16) -DECLARE (mpeg2convert_rgb15, MPEG2CONVERT_RGB, 15) -DECLARE (mpeg2convert_rgb8, MPEG2CONVERT_RGB, 8) -DECLARE (mpeg2convert_bgr32, MPEG2CONVERT_BGR, 32) -DECLARE (mpeg2convert_bgr24, MPEG2CONVERT_BGR, 24) -DECLARE (mpeg2convert_bgr16, MPEG2CONVERT_BGR, 16) -DECLARE (mpeg2convert_bgr15, MPEG2CONVERT_BGR, 15) -DECLARE (mpeg2convert_bgr8, MPEG2CONVERT_BGR, 8) - -mpeg2_convert_t * mpeg2convert_rgb (mpeg2convert_rgb_order_t order, - unsigned int bpp) -{ - static mpeg2_convert_t * table[5][2] = - {{mpeg2convert_rgb15, mpeg2convert_bgr15}, - {mpeg2convert_rgb8, mpeg2convert_bgr8}, - {mpeg2convert_rgb16, mpeg2convert_bgr16}, - {mpeg2convert_rgb24, mpeg2convert_bgr24}, - {mpeg2convert_rgb32, mpeg2convert_bgr32}}; - - if (order == MPEG2CONVERT_RGB || order == MPEG2CONVERT_BGR) { - if (bpp == 15) - return table[0][order == MPEG2CONVERT_BGR]; - else if (bpp >= 8 && bpp <= 32 && (bpp & 7) == 0) - return table[bpp >> 3][order == MPEG2CONVERT_BGR]; - } - return (mpeg2_convert_t *) 0; -} diff -Nru k9copy-2.1.0/src/mpeg2/rgb_mmx.cpp k9copy-2.2.0/src/mpeg2/rgb_mmx.cpp --- k9copy-2.1.0/src/mpeg2/rgb_mmx.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/rgb_mmx.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,310 +0,0 @@ -/* - * rgb_mmx.c - * Copyright (C) 2000-2003 Silicon Integrated System Corp. - * All Rights Reserved. - * - * Author: Olie Lho - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_X86 -#include "k9common.h" -#include -#include - -#include "mpeg2.h" -#include "mpeg2convert.h" -#include "convert_internal.h" -#include "attributes.h" -#include "mmx.h" - -#define CPU_MMXEXT 0 -#define CPU_MMX 1 - -/* CPU_MMXEXT/CPU_MMX adaptation layer */ - -#define movntq(src,dest) \ -do { \ - if (cpu == CPU_MMXEXT) \ - movntq_r2m (src, dest); \ - else \ - movq_r2m (src, dest); \ -} while (0) - -static inline void mmx_yuv2rgb (uint8_t * py, uint8_t * pu, uint8_t * pv) -{ - static mmx_t mmx_80w = {0x0080008000800080LL}; - static mmx_t mmx_U_green = {0xf37df37df37df37dLL}; - static mmx_t mmx_U_blue = {0x4093409340934093LL}; - static mmx_t mmx_V_red = {0x3312331233123312LL}; - static mmx_t mmx_V_green = {0xe5fce5fce5fce5fcLL}; - static mmx_t mmx_10w = {0x1010101010101010LL}; - static mmx_t mmx_00ffw = {0x00ff00ff00ff00ffLL}; - static mmx_t mmx_Y_coeff = {0x253f253f253f253fLL}; - - movd_m2r (*pu, mm0); /* mm0 = 00 00 00 00 u3 u2 u1 u0 */ - movd_m2r (*pv, mm1); /* mm1 = 00 00 00 00 v3 v2 v1 v0 */ - movq_m2r (*py, mm6); /* mm6 = Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ - pxor_r2r (mm4, mm4); /* mm4 = 0 */ - /* XXX might do cache preload for image here */ - - /* - * Do the multiply part of the conversion for even and odd pixels - * register usage: - * mm0 -> Cblue, mm1 -> Cred, mm2 -> Cgreen even pixels - * mm3 -> Cblue, mm4 -> Cred, mm5 -> Cgreen odd pixels - * mm6 -> Y even, mm7 -> Y odd - */ - - punpcklbw_r2r (mm4, mm0); /* mm0 = u3 u2 u1 u0 */ - punpcklbw_r2r (mm4, mm1); /* mm1 = v3 v2 v1 v0 */ - psubsw_m2r (mmx_80w, mm0); /* u -= 128 */ - psubsw_m2r (mmx_80w, mm1); /* v -= 128 */ - psllw_i2r (3, mm0); /* promote precision */ - psllw_i2r (3, mm1); /* promote precision */ - movq_r2r (mm0, mm2); /* mm2 = u3 u2 u1 u0 */ - movq_r2r (mm1, mm3); /* mm3 = v3 v2 v1 v0 */ - pmulhw_m2r (mmx_U_green, mm2); /* mm2 = u * u_green */ - pmulhw_m2r (mmx_V_green, mm3); /* mm3 = v * v_green */ - pmulhw_m2r (mmx_U_blue, mm0); /* mm0 = chroma_b */ - pmulhw_m2r (mmx_V_red, mm1); /* mm1 = chroma_r */ - paddsw_r2r (mm3, mm2); /* mm2 = chroma_g */ - - psubusb_m2r (mmx_10w, mm6); /* Y -= 16 */ - movq_r2r (mm6, mm7); /* mm7 = Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ - pand_m2r (mmx_00ffw, mm6); /* mm6 = Y6 Y4 Y2 Y0 */ - psrlw_i2r (8, mm7); /* mm7 = Y7 Y5 Y3 Y1 */ - psllw_i2r (3, mm6); /* promote precision */ - psllw_i2r (3, mm7); /* promote precision */ - pmulhw_m2r (mmx_Y_coeff, mm6); /* mm6 = luma_rgb even */ - pmulhw_m2r (mmx_Y_coeff, mm7); /* mm7 = luma_rgb odd */ - - /* - * Do the addition part of the conversion for even and odd pixels - * register usage: - * mm0 -> Cblue, mm1 -> Cred, mm2 -> Cgreen even pixels - * mm3 -> Cblue, mm4 -> Cred, mm5 -> Cgreen odd pixels - * mm6 -> Y even, mm7 -> Y odd - */ - - movq_r2r (mm0, mm3); /* mm3 = chroma_b */ - movq_r2r (mm1, mm4); /* mm4 = chroma_r */ - movq_r2r (mm2, mm5); /* mm5 = chroma_g */ - paddsw_r2r (mm6, mm0); /* mm0 = B6 B4 B2 B0 */ - paddsw_r2r (mm7, mm3); /* mm3 = B7 B5 B3 B1 */ - paddsw_r2r (mm6, mm1); /* mm1 = R6 R4 R2 R0 */ - paddsw_r2r (mm7, mm4); /* mm4 = R7 R5 R3 R1 */ - paddsw_r2r (mm6, mm2); /* mm2 = G6 G4 G2 G0 */ - paddsw_r2r (mm7, mm5); /* mm5 = G7 G5 G3 G1 */ - packuswb_r2r (mm0, mm0); /* saturate to 0-255 */ - packuswb_r2r (mm1, mm1); /* saturate to 0-255 */ - packuswb_r2r (mm2, mm2); /* saturate to 0-255 */ - packuswb_r2r (mm3, mm3); /* saturate to 0-255 */ - packuswb_r2r (mm4, mm4); /* saturate to 0-255 */ - packuswb_r2r (mm5, mm5); /* saturate to 0-255 */ - punpcklbw_r2r (mm3, mm0); /* mm0 = B7 B6 B5 B4 B3 B2 B1 B0 */ - punpcklbw_r2r (mm4, mm1); /* mm1 = R7 R6 R5 R4 R3 R2 R1 R0 */ - punpcklbw_r2r (mm5, mm2); /* mm2 = G7 G6 G5 G4 G3 G2 G1 G0 */ -} - -static inline void mmx_unpack_16rgb (uint8_t * image, const int cpu) -{ - static mmx_t mmx_bluemask = {0xf8f8f8f8f8f8f8f8LL}; - static mmx_t mmx_greenmask = {0xfcfcfcfcfcfcfcfcLL}; - static mmx_t mmx_redmask = {0xf8f8f8f8f8f8f8f8LL}; - - /* - * convert RGB plane to RGB 16 bits - * mm0 -> B, mm1 -> R, mm2 -> G - * mm4 -> GB, mm5 -> AR pixel 4-7 - * mm6 -> GB, mm7 -> AR pixel 0-3 - */ - - pand_m2r (mmx_bluemask, mm0); /* mm0 = b7b6b5b4b3______ */ - pand_m2r (mmx_greenmask, mm2); /* mm2 = g7g6g5g4g3g2____ */ - pand_m2r (mmx_redmask, mm1); /* mm1 = r7r6r5r4r3______ */ - psrlq_i2r (3, mm0); /* mm0 = ______b7b6b5b4b3 */ - pxor_r2r (mm4, mm4); /* mm4 = 0 */ - movq_r2r (mm0, mm5); /* mm5 = ______b7b6b5b4b3 */ - movq_r2r (mm2, mm7); /* mm7 = g7g6g5g4g3g2____ */ - - punpcklbw_r2r (mm4, mm2); - punpcklbw_r2r (mm1, mm0); - psllq_i2r (3, mm2); - por_r2r (mm2, mm0); - movntq (mm0, *image); - - punpckhbw_r2r (mm4, mm7); - punpckhbw_r2r (mm1, mm5); - psllq_i2r (3, mm7); - por_r2r (mm7, mm5); - movntq (mm5, *(image+8)); -} - -static inline void mmx_unpack_32rgb (uint8_t * image, const int cpu) -{ - /* - * convert RGB plane to RGB packed format, - * mm0 -> B, mm1 -> R, mm2 -> G, mm3 -> 0, - * mm4 -> GB, mm5 -> AR pixel 4-7, - * mm6 -> GB, mm7 -> AR pixel 0-3 - */ - - pxor_r2r (mm3, mm3); - movq_r2r (mm0, mm6); - movq_r2r (mm1, mm7); - movq_r2r (mm0, mm4); - movq_r2r (mm1, mm5); - punpcklbw_r2r (mm2, mm6); - punpcklbw_r2r (mm3, mm7); - punpcklwd_r2r (mm7, mm6); - movntq (mm6, *image); - movq_r2r (mm0, mm6); - punpcklbw_r2r (mm2, mm6); - punpckhwd_r2r (mm7, mm6); - movntq (mm6, *(image+8)); - punpckhbw_r2r (mm2, mm4); - punpckhbw_r2r (mm3, mm5); - punpcklwd_r2r (mm5, mm4); - movntq (mm4, *(image+16)); - movq_r2r (mm0, mm4); - punpckhbw_r2r (mm2, mm4); - punpckhwd_r2r (mm5, mm4); - movntq (mm4, *(image+24)); -} - -static inline void rgb16 (void * const _id, uint8_t * const * src, - const unsigned int v_offset, const int cpu) -{ - convert_rgb_t * const id = (convert_rgb_t *) _id; - uint8_t * dst; - uint8_t * py, * pu, * pv; - int i, j; - - dst = id->rgb_ptr + id->rgb_stride * v_offset; - py = src[0]; pu = src[1]; pv = src[2]; - - i = 16; - do { - j = id->width; - do { - mmx_yuv2rgb (py, pu, pv); - mmx_unpack_16rgb (dst, cpu); - py += 8; - pu += 4; - pv += 4; - dst += 16; - } while (--j); - - dst += id->rgb_increm; - py += id->y_increm; - if (! (--i & id->chroma420)) { - pu += id->uv_increm; - pv += id->uv_increm; - } else { - pu -= id->uv_stride_frame; - pv -= id->uv_stride_frame; - } - } while (i); -} - -static inline void argb32 (void * const _id, uint8_t * const * src, - const unsigned int v_offset, const int cpu) -{ - convert_rgb_t * const id = (convert_rgb_t *) _id; - uint8_t * dst; - uint8_t * py, * pu, * pv; - int i, j; - - dst = id->rgb_ptr + id->rgb_stride * v_offset; - py = src[0]; pu = src[1]; pv = src[2]; - - i = 16; - do { - j = id->width; - do { - mmx_yuv2rgb (py, pu, pv); - mmx_unpack_32rgb (dst, cpu); - py += 8; - pu += 4; - pv += 4; - dst += 32; - } while (--j); - - dst += id->rgb_increm; - py += id->y_increm; - if (! (--i & id->chroma420)) { - pu += id->uv_increm; - pv += id->uv_increm; - } else { - pu -= id->uv_stride_frame; - pv -= id->uv_stride_frame; - } - } while (i); -} - -static void mmxext_rgb16 (void * id, uint8_t * const * src, - unsigned int v_offset) -{ - rgb16 (id, src, v_offset, CPU_MMXEXT); -} - -static void mmxext_argb32 (void * id, uint8_t * const * src, - unsigned int v_offset) -{ - argb32 (id, src, v_offset, CPU_MMXEXT); -} - -static void mmx_rgb16 (void * id, uint8_t * const * src, unsigned int v_offset) -{ - rgb16 (id, src, v_offset, CPU_MMX); -} - -static void mmx_argb32 (void * id, uint8_t * const * src, - unsigned int v_offset) -{ - argb32 (id, src, v_offset, CPU_MMX); -} - -mpeg2convert_copy_t * mpeg2convert_rgb_mmxext (int order, int bpp, - const mpeg2_sequence_t * seq) -{ - if (order == MPEG2CONVERT_RGB && seq->chroma_width < seq->width) { - if (bpp == 16) - return mmxext_rgb16; - else if (bpp == 32) - return mmxext_argb32; - } - return NULL; /* Fallback to C */ -} - -mpeg2convert_copy_t * mpeg2convert_rgb_mmx (int order, int bpp, - const mpeg2_sequence_t * seq) -{ - if (order == MPEG2CONVERT_RGB && seq->chroma_width < seq->width) { - if (bpp == 16) - return mmx_rgb16; - else if (bpp == 32) - return mmx_argb32; - } - return NULL; /* Fallback to C */ -} -#endif diff -Nru k9copy-2.1.0/src/mpeg2/rgb_vis.cpp k9copy-2.2.0/src/mpeg2/rgb_vis.cpp --- k9copy-2.1.0/src/mpeg2/rgb_vis.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/rgb_vis.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,384 +0,0 @@ -/* - * rgb_vis.c - * Copyright (C) 2003 David S. Miller - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef ARCH_SPARC - -#include "k9common.h" -#include - -#include "mpeg2.h" -#include "mpeg2convert.h" -#include "convert_internal.h" -#include "attributes.h" -#include "vis.h" - -/* Based partially upon the MMX yuv2rgb code, see there for credits. - * - * The difference here is that since we have enough registers we - * process both even and odd scanlines in one pass. - */ - -static const uint16_t const_2048[] ATTR_ALIGN(8) = {2048, 2048, 2048, 2048}; -static const uint16_t const_1024[] ATTR_ALIGN(8) = {1024, 1024, 1024, 1024}; -static const uint16_t const_128[] ATTR_ALIGN(8) = {128, 128, 128, 128}; -static const uint8_t const_Ugreen[] ATTR_ALIGN(8) = - {0xf3, 0x00, 0xf3, 0x00, 0xf3, 0x00, 0xf3, 0x00}; -static const uint8_t const_Vgreen[] ATTR_ALIGN(8) = - {0xe6, 0x00, 0xe6, 0x00, 0xe6, 0x00, 0xe6, 0x00}; -static const uint8_t const_Ublue_Vred[] ATTR_ALIGN(8) = - {0x41, 0x41, 0x41, 0x41, 0x33, 0x33, 0x33, 0x33}; -static const uint8_t const_Ycoeff[] ATTR_ALIGN(4) = {0x25, 0x25, 0x25, 0x25}; - -#define TMP0 0 -#define TMP1 1 -#define TMP2 2 -#define TMP3 3 -#define TMP4 4 -#define TMP5 5 -#define TMP6 6 -#define TMP7 7 -#define TMP8 8 -#define TMP9 9 -#define TMP10 10 -#define TMP11 11 -#define TMP12 12 -#define TMP13 13 - -#define CONST_UBLUE 14 -#define CONST_VRED 15 -#define CONST_2048 16 - -#define BLUE8_EVEN 18 -#define BLUE8_ODD 19 -#define RED8_EVEN 20 -#define RED8_ODD 21 -#define GREEN8_EVEN 22 -#define GREEN8_ODD 23 - -#define BLUE8_2_EVEN 24 -#define BLUE8_2_ODD 25 -#define RED8_2_EVEN 26 -#define RED8_2_ODD 27 -#define GREEN8_2_EVEN 28 -#define GREEN8_2_ODD 29 - -#define CONST_YCOEFF 30 -#define ZEROS 31 - -#define PU_0 32 -#define PU_2 34 -#define PV_0 36 -#define PV_2 38 -#define PY_0 40 -#define PY_2 42 -#define PY_4 44 -#define PY_6 46 - -#define CONST_128 56 -#define CONST_1024 58 -#define CONST_VGREEN 60 -#define CONST_UGREEN 62 - -static inline void vis_init_consts(void) -{ - vis_set_gsr(7 << VIS_GSR_SCALEFACT_SHIFT); - - vis_ld64(const_2048[0], CONST_2048); - vis_ld64(const_1024[0], CONST_1024); - vis_ld64(const_Ugreen[0], CONST_UGREEN); - vis_ld64(const_Vgreen[0], CONST_VGREEN); - vis_fzeros(ZEROS); - vis_ld64(const_Ublue_Vred[0], CONST_UBLUE); - vis_ld32(const_Ycoeff[0], CONST_YCOEFF); - vis_ld64(const_128[0], CONST_128); -} - -static inline void vis_yuv2rgb(uint8_t *py, uint8_t *pu, uint8_t *pv, - int y_stride) -{ - vis_ld32(pu[0], TMP0); - - vis_ld32(pv[0], TMP2); - - vis_ld64(py[0], TMP4); - vis_mul8x16au(TMP0, CONST_2048, PU_0); - - vis_ld64_2(py, y_stride, TMP8); - vis_mul8x16au(TMP2, CONST_2048, PV_0); - - vis_pmerge(TMP4, TMP5, TMP6); - - vis_pmerge(TMP6, TMP7, TMP4); - - vis_pmerge(TMP8, TMP9, TMP10); - - vis_pmerge(TMP10, TMP11, TMP8); - vis_mul8x16au(TMP4, CONST_2048, PY_0); - - vis_psub16(PU_0, CONST_1024, PU_0); - vis_mul8x16au(TMP5, CONST_2048, PY_2); - - vis_psub16(PV_0, CONST_1024, PV_0); - vis_mul8x16au(TMP8, CONST_2048, PY_4); - - vis_psub16(PY_0, CONST_128, PY_0); - vis_mul8x16au(TMP9, CONST_2048, PY_6); - - vis_psub16(PY_2, CONST_128, PY_2); - vis_mul8x16(CONST_YCOEFF, PY_0, PY_0); - - vis_psub16(PY_4, CONST_128, PY_4); - vis_mul8x16(CONST_YCOEFF, PY_2, PY_2); - - vis_psub16(PY_6, CONST_128, PY_6); - vis_mul8x16(CONST_YCOEFF, PY_4, PY_4); - - vis_mul8x16(CONST_YCOEFF, PY_6, PY_6); - - vis_mul8sux16(CONST_UGREEN, PU_0, TMP0); - - vis_mul8sux16(CONST_VGREEN, PV_0, TMP2); - - vis_mul8x16(CONST_UBLUE, PU_0, TMP4); - - vis_mul8x16(CONST_VRED, PV_0, TMP6); - vis_padd16(TMP0, TMP2, TMP10); - - vis_padd16(PY_0, TMP4, TMP0); - - vis_padd16(PY_2, TMP4, TMP2); - vis_pack16(TMP0, BLUE8_EVEN); - - vis_padd16(PY_4, TMP4, TMP0); - vis_pack16(TMP2, BLUE8_ODD); - - vis_padd16(PY_6, TMP4, TMP2); - vis_pack16(TMP0, BLUE8_2_EVEN); - - vis_padd16(PY_0, TMP6, TMP0); - vis_pack16(TMP2, BLUE8_2_ODD); - - vis_padd16(PY_2, TMP6, TMP2); - vis_pack16(TMP0, RED8_EVEN); - - vis_padd16(PY_4, TMP6, TMP0); - vis_pack16(TMP2, RED8_ODD); - - vis_padd16(PY_6, TMP6, TMP2); - vis_pack16(TMP0, RED8_2_EVEN); - - vis_padd16(PY_0, TMP10, TMP0); - vis_pack16(TMP2, RED8_2_ODD); - - vis_padd16(PY_2, TMP10, TMP2); - vis_pack16(TMP0, GREEN8_EVEN); - - vis_padd16(PY_4, TMP10, TMP0); - vis_pack16(TMP2, GREEN8_ODD); - - vis_padd16(PY_6, TMP10, TMP2); - vis_pack16(TMP0, GREEN8_2_EVEN); - - vis_pack16(TMP2, GREEN8_2_ODD); - vis_pmerge(BLUE8_EVEN, BLUE8_ODD, BLUE8_EVEN); - - vis_pmerge(BLUE8_2_EVEN, BLUE8_2_ODD, BLUE8_2_EVEN); - - vis_pmerge(RED8_EVEN, RED8_ODD, RED8_EVEN); - - vis_pmerge(RED8_2_EVEN, RED8_2_ODD, RED8_2_EVEN); - - vis_pmerge(GREEN8_EVEN, GREEN8_ODD, GREEN8_EVEN); - - vis_pmerge(GREEN8_2_EVEN, GREEN8_2_ODD, GREEN8_2_EVEN); -} - -static inline void vis_unpack_32rgb(uint8_t *image, int stride) -{ - vis_pmerge(ZEROS, GREEN8_EVEN, TMP0); - vis_pmerge(RED8_EVEN, BLUE8_EVEN, TMP2); - - vis_pmerge(TMP0, TMP2, TMP4); - vis_st64(TMP4, image[0]); - - vis_pmerge(TMP1, TMP3, TMP6); - vis_st64_2(TMP6, image, 8); - - vis_pmerge(ZEROS, GREEN8_ODD, TMP8); - vis_pmerge(RED8_ODD, BLUE8_ODD, TMP10); - - vis_pmerge(TMP8, TMP10, TMP0); - vis_st64_2(TMP0, image, 16); - - vis_pmerge(TMP9, TMP11, TMP2); - vis_st64_2(TMP2, image, 24); - - image += stride; - - vis_pmerge(ZEROS, GREEN8_2_EVEN, TMP0); - vis_pmerge(RED8_2_EVEN, BLUE8_2_EVEN, TMP2); - - vis_pmerge(TMP0, TMP2, TMP4); - vis_st64(TMP4, image[0]); - - vis_pmerge(TMP1, TMP3, TMP6); - vis_st64_2(TMP6, image, 8); - - vis_pmerge(ZEROS, GREEN8_2_ODD, TMP8); - vis_pmerge(RED8_2_ODD, BLUE8_2_ODD, TMP10); - - vis_pmerge(TMP8, TMP10, TMP0); - vis_st64_2(TMP0, image, 16); - - vis_pmerge(TMP9, TMP11, TMP2); - vis_st64_2(TMP2, image, 24); -} - -static inline void vis_unpack_32bgr(uint8_t *image, int stride) -{ - vis_pmerge(ZEROS, GREEN8_EVEN, TMP0); - vis_pmerge(BLUE8_EVEN, RED8_EVEN, TMP2); - - vis_pmerge(TMP0, TMP2, TMP4); - vis_st64(TMP4, image[0]); - - vis_pmerge(TMP1, TMP3, TMP6); - vis_st64_2(TMP6, image, 8); - - vis_pmerge(ZEROS, GREEN8_ODD, TMP8); - vis_pmerge(BLUE8_ODD, RED8_ODD, TMP10); - - vis_pmerge(TMP8, TMP10, TMP0); - vis_st64_2(TMP0, image, 16); - - vis_pmerge(TMP9, TMP11, TMP2); - vis_st64_2(TMP2, image, 24); - - image += stride; - - vis_pmerge(ZEROS, GREEN8_2_EVEN, TMP0); - vis_pmerge(BLUE8_2_EVEN, RED8_2_EVEN, TMP2); - - vis_pmerge(TMP0, TMP2, TMP4); - vis_st64(TMP4, image[0]); - - vis_pmerge(TMP1, TMP3, TMP6); - vis_st64_2(TMP6, image, 8); - - vis_pmerge(ZEROS, GREEN8_2_ODD, TMP8); - vis_pmerge(BLUE8_2_ODD, RED8_2_ODD, TMP10); - - vis_pmerge(TMP8, TMP10, TMP0); - vis_st64_2(TMP0, image, 16); - - vis_pmerge(TMP9, TMP11, TMP2); - vis_st64_2(TMP2, image, 24); -} - -static inline void vis_yuv420_argb32(uint8_t *image, - uint8_t *py, uint8_t *pu, uint8_t *pv, - int width, int height, int rgb_stride, - int y_stride, int uv_stride) -{ - height >>= 1; - uv_stride -= width >> 1; - do { - int i = width >> 3; - do { - vis_yuv2rgb(py, pu, pv, y_stride); - vis_unpack_32rgb(image, rgb_stride); - py += 8; - pu += 4; - pv += 4; - image += 32; - } while (--i); - - py += (y_stride << 1) - width; - image += (rgb_stride << 1) - 4 * width; - pu += uv_stride; - pv += uv_stride; - } while (--height); -} - -static inline void vis_yuv420_abgr32(uint8_t *image, - uint8_t *py, uint8_t *pu, uint8_t *pv, - int width, int height, int rgb_stride, - int y_stride, int uv_stride) -{ - height >>= 1; - uv_stride -= width >> 1; - do { - int i = width >> 3; - do { - vis_yuv2rgb(py, pu, pv, y_stride); - vis_unpack_32bgr(image, rgb_stride); - py += 8; - pu += 4; - pv += 4; - image += 32; - } while (--i); - - py += (y_stride << 1) - width; - image += (rgb_stride << 1) - 4 * width; - pu += uv_stride; - pv += uv_stride; - } while (--height); -} - -static void vis_argb32(void *_id, uint8_t * const *src, - unsigned int v_offset) -{ - convert_rgb_t *id = (convert_rgb_t *) _id; - - vis_init_consts(); - vis_yuv420_argb32(id->rgb_ptr + id->rgb_stride * v_offset, - src[0], src[1], src[2], id->width, 16, - id->rgb_stride, id->y_stride, id->y_stride >> 1); -} - -static void vis_abgr32(void *_id, uint8_t * const *src, - unsigned int v_offset) -{ - convert_rgb_t *id = (convert_rgb_t *) _id; - - vis_init_consts(); - vis_yuv420_abgr32(id->rgb_ptr + id->rgb_stride * v_offset, - src[0], src[1], src[2], id->width, 16, - id->rgb_stride, id->y_stride, id->y_stride >> 1); -} - -mpeg2convert_copy_t *mpeg2convert_rgb_vis(int order, int bpp, - const mpeg2_sequence_t * seq) -{ - if (bpp == 32 && seq->chroma_height < seq->height) { - if (order == MPEG2CONVERT_RGB) - return vis_argb32; - if (order == MPEG2CONVERT_BGR) - return vis_abgr32; - } - - return NULL; /* Fallback to C */ -} - -#endif /* ARCH_SPARC */ diff -Nru k9copy-2.1.0/src/mpeg2/slice.cpp k9copy-2.2.0/src/mpeg2/slice.cpp --- k9copy-2.1.0/src/mpeg2/slice.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/slice.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,2058 +0,0 @@ -/* - * slice.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 2003 Peter Gubanov - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include "k9common.h" - -#include "mpeg2.h" -#include "attributes.h" -#include "mpeg2_internal.h" - -extern mpeg2_mc_t mpeg2_mc; -extern void (* mpeg2_idct_copy) (int16_t * block, uint8_t * dest, int stride); -extern void (* mpeg2_idct_add) (int last, int16_t * block, - uint8_t * dest, int stride); -extern void (* mpeg2_cpu_state_save) (cpu_state_t * state); -extern void (* mpeg2_cpu_state_restore) (cpu_state_t * state); - -#include "vlc.h" - -static inline int get_macroblock_modes (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - int macroblock_modes; - const MBtab * tab; - - switch (decoder->coding_type) { - case I_TYPE: - - tab = MB_I + UBITS (bit_buf, 1); - DUMPBITS (bit_buf, bits, tab->len); - macroblock_modes = tab->modes; - - if ((! (decoder->frame_pred_frame_dct)) && - (decoder->picture_structure == FRAME_PICTURE)) { - macroblock_modes |= UBITS (bit_buf, 1) * DCT_TYPE_INTERLACED; - DUMPBITS (bit_buf, bits, 1); - } - - return macroblock_modes; - - case P_TYPE: - - tab = MB_P + UBITS (bit_buf, 5); - DUMPBITS (bit_buf, bits, tab->len); - macroblock_modes = tab->modes; - - if (decoder->picture_structure != FRAME_PICTURE) { - if (macroblock_modes & MACROBLOCK_MOTION_FORWARD) { - macroblock_modes |= UBITS (bit_buf, 2) << MOTION_TYPE_SHIFT; - DUMPBITS (bit_buf, bits, 2); - } - return macroblock_modes | MACROBLOCK_MOTION_FORWARD; - } else if (decoder->frame_pred_frame_dct) { - if (macroblock_modes & MACROBLOCK_MOTION_FORWARD) - macroblock_modes |= MC_FRAME << MOTION_TYPE_SHIFT; - return macroblock_modes | MACROBLOCK_MOTION_FORWARD; - } else { - if (macroblock_modes & MACROBLOCK_MOTION_FORWARD) { - macroblock_modes |= UBITS (bit_buf, 2) << MOTION_TYPE_SHIFT; - DUMPBITS (bit_buf, bits, 2); - } - if (macroblock_modes & (MACROBLOCK_INTRA | MACROBLOCK_PATTERN)) { - macroblock_modes |= UBITS (bit_buf, 1) * DCT_TYPE_INTERLACED; - DUMPBITS (bit_buf, bits, 1); - } - return macroblock_modes | MACROBLOCK_MOTION_FORWARD; - } - - case B_TYPE: - - tab = MB_B + UBITS (bit_buf, 6); - DUMPBITS (bit_buf, bits, tab->len); - macroblock_modes = tab->modes; - - if (decoder->picture_structure != FRAME_PICTURE) { - if (! (macroblock_modes & MACROBLOCK_INTRA)) { - macroblock_modes |= UBITS (bit_buf, 2) << MOTION_TYPE_SHIFT; - DUMPBITS (bit_buf, bits, 2); - } - return macroblock_modes; - } else if (decoder->frame_pred_frame_dct) { - /* if (! (macroblock_modes & MACROBLOCK_INTRA)) */ - macroblock_modes |= MC_FRAME << MOTION_TYPE_SHIFT; - return macroblock_modes; - } else { - if (macroblock_modes & MACROBLOCK_INTRA) - goto intra; - macroblock_modes |= UBITS (bit_buf, 2) << MOTION_TYPE_SHIFT; - DUMPBITS (bit_buf, bits, 2); - if (macroblock_modes & (MACROBLOCK_INTRA | MACROBLOCK_PATTERN)) { - intra: - macroblock_modes |= UBITS (bit_buf, 1) * DCT_TYPE_INTERLACED; - DUMPBITS (bit_buf, bits, 1); - } - return macroblock_modes; - } - - case D_TYPE: - - DUMPBITS (bit_buf, bits, 1); - return MACROBLOCK_INTRA; - - default: - return 0; - } -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline void get_quantizer_scale (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - - int quantizer_scale_code; - - quantizer_scale_code = UBITS (bit_buf, 5); - DUMPBITS (bit_buf, bits, 5); - - decoder->quantizer_matrix[0] = - decoder->quantizer_prescale[0][quantizer_scale_code]; - decoder->quantizer_matrix[1] = - decoder->quantizer_prescale[1][quantizer_scale_code]; - decoder->quantizer_matrix[2] = - decoder->chroma_quantizer[0][quantizer_scale_code]; - decoder->quantizer_matrix[3] = - decoder->chroma_quantizer[1][quantizer_scale_code]; -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline int get_motion_delta (mpeg2_decoder_t * const decoder, - const int f_code) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - - int delta; - int sign; - const MVtab * tab; - - if (bit_buf & 0x80000000) { - DUMPBITS (bit_buf, bits, 1); - return 0; - } else if (bit_buf >= 0x0c000000) { - - tab = MV_4 + UBITS (bit_buf, 4); - delta = (tab->delta << f_code) + 1; - bits += tab->len + f_code + 1; - bit_buf <<= tab->len; - - sign = SBITS (bit_buf, 1); - bit_buf <<= 1; - - if (f_code) - delta += UBITS (bit_buf, f_code); - bit_buf <<= f_code; - - return (delta ^ sign) - sign; - - } else { - - tab = MV_10 + UBITS (bit_buf, 10); - delta = (tab->delta << f_code) + 1; - bits += tab->len + 1; - bit_buf <<= tab->len; - - sign = SBITS (bit_buf, 1); - bit_buf <<= 1; - - if (f_code) { - NEEDBITS (bit_buf, bits, bit_ptr); - delta += UBITS (bit_buf, f_code); - DUMPBITS (bit_buf, bits, f_code); - } - - return (delta ^ sign) - sign; - - } -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline int bound_motion_vector (const int vector, const int f_code) -{ - return ((int32_t)vector << (27 - f_code)) >> (27 - f_code); -} - -static inline int get_dmv (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - - const DMVtab * tab; - - tab = DMV_2 + UBITS (bit_buf, 2); - DUMPBITS (bit_buf, bits, tab->len); - return tab->dmv; -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline int get_coded_block_pattern (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - - const CBPtab * tab; - - NEEDBITS (bit_buf, bits, bit_ptr); - - if (bit_buf >= 0x20000000) { - - tab = CBP_7 + (UBITS (bit_buf, 7) - 16); - DUMPBITS (bit_buf, bits, tab->len); - return tab->cbp; - - } else { - - tab = CBP_9 + UBITS (bit_buf, 9); - DUMPBITS (bit_buf, bits, tab->len); - return tab->cbp; - } - -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline int get_luma_dc_dct_diff (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - const DCtab * tab; - int size; - int dc_diff; - - if (bit_buf < 0xf8000000) { - tab = DC_lum_5 + UBITS (bit_buf, 5); - size = tab->size; - if (size) { - bits += tab->len + size; - bit_buf <<= tab->len; - dc_diff = - UBITS (bit_buf, size) - UBITS (SBITS (~bit_buf, 1), size); - bit_buf <<= size; - return dc_diff << decoder->intra_dc_precision; - } else { - DUMPBITS (bit_buf, bits, 3); - return 0; - } - } else { - tab = DC_long + (UBITS (bit_buf, 9) - 0x1e0); - size = tab->size; - DUMPBITS (bit_buf, bits, tab->len); - NEEDBITS (bit_buf, bits, bit_ptr); - dc_diff = UBITS (bit_buf, size) - UBITS (SBITS (~bit_buf, 1), size); - DUMPBITS (bit_buf, bits, size); - return dc_diff << decoder->intra_dc_precision; - } -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline int get_chroma_dc_dct_diff (mpeg2_decoder_t * const decoder) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - const DCtab * tab; - int size; - int dc_diff; - - if (bit_buf < 0xf8000000) { - tab = DC_chrom_5 + UBITS (bit_buf, 5); - size = tab->size; - if (size) { - bits += tab->len + size; - bit_buf <<= tab->len; - dc_diff = - UBITS (bit_buf, size) - UBITS (SBITS (~bit_buf, 1), size); - bit_buf <<= size; - return dc_diff << decoder->intra_dc_precision; - } else { - DUMPBITS (bit_buf, bits, 2); - return 0; - } - } else { - tab = DC_long + (UBITS (bit_buf, 10) - 0x3e0); - size = tab->size; - DUMPBITS (bit_buf, bits, tab->len + 1); - NEEDBITS (bit_buf, bits, bit_ptr); - dc_diff = UBITS (bit_buf, size) - UBITS (SBITS (~bit_buf, 1), size); - DUMPBITS (bit_buf, bits, size); - return dc_diff << decoder->intra_dc_precision; - } -#undef bit_buf -#undef bits -#undef bit_ptr -} - -#define SATURATE(val) \ -do { \ - val <<= 4; \ - if (unlikely (val != (int16_t) val)) \ - val = (SBITS (val, 1) ^ 2047) << 4; \ -} while (0) - -static void get_intra_block_B14 (mpeg2_decoder_t * const decoder, - const uint16_t * const quant_matrix) -{ - int i; - int j; - int val; - const uint8_t * const scan = decoder->scan; - int mismatch; - const DCTtab * tab; - uint32_t bit_buf; - int bits; - const uint8_t * bit_ptr; - int16_t * const dest = decoder->DCTblock; - - i = 0; - mismatch = ~dest[0]; - - bit_buf = decoder->bitstream_buf; - bits = decoder->bitstream_bits; - bit_ptr = decoder->bitstream_ptr; - - NEEDBITS (bit_buf, bits, bit_ptr); - - while (1) { - if (bit_buf >= 0x28000000) { - - tab = DCT_B14AC_5 + (UBITS (bit_buf, 5) - 5); - - i += tab->run; - if (i >= 64) - break; /* end of block */ - - normal_code: - j = scan[i]; - bit_buf <<= tab->len; - bits += tab->len + 1; - val = (tab->level * quant_matrix[j]) >> 4; - - /* if (bitstream_get (1)) val = -val; */ - val = (val ^ SBITS (bit_buf, 1)) - SBITS (bit_buf, 1); - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - bit_buf <<= 1; - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x04000000) { - - tab = DCT_B14_8 + (UBITS (bit_buf, 8) - 4); - - i += tab->run; - if (i < 64) - goto normal_code; - - /* escape code */ - - i += UBITS (bit_buf << 6, 6) - 64; - if (i >= 64) - break; /* illegal, check needed to avoid buffer overflow */ - - j = scan[i]; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - val = (SBITS (bit_buf, 12) * quant_matrix[j]) / 16; - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x02000000) { - tab = DCT_B14_10 + (UBITS (bit_buf, 10) - 8); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00800000) { - tab = DCT_13 + (UBITS (bit_buf, 13) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00200000) { - tab = DCT_15 + (UBITS (bit_buf, 15) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else { - tab = DCT_16 + UBITS (bit_buf, 16); - bit_buf <<= 16; - GETWORD (bit_buf, bits + 16, bit_ptr); - i += tab->run; - if (i < 64) - goto normal_code; - } - break; /* illegal, check needed to avoid buffer overflow */ - } - dest[63] ^= mismatch & 16; - DUMPBITS (bit_buf, bits, 2); /* dump end of block code */ - decoder->bitstream_buf = bit_buf; - decoder->bitstream_bits = bits; - decoder->bitstream_ptr = bit_ptr; -} - -static void get_intra_block_B15 (mpeg2_decoder_t * const decoder, - const uint16_t * const quant_matrix) -{ - int i; - int j; - int val; - const uint8_t * const scan = decoder->scan; - int mismatch; - const DCTtab * tab; - uint32_t bit_buf; - int bits; - const uint8_t * bit_ptr; - int16_t * const dest = decoder->DCTblock; - - i = 0; - mismatch = ~dest[0]; - - bit_buf = decoder->bitstream_buf; - bits = decoder->bitstream_bits; - bit_ptr = decoder->bitstream_ptr; - - NEEDBITS (bit_buf, bits, bit_ptr); - - while (1) { - if (bit_buf >= 0x04000000) { - - tab = DCT_B15_8 + (UBITS (bit_buf, 8) - 4); - - i += tab->run; - if (i < 64) { - - normal_code: - j = scan[i]; - bit_buf <<= tab->len; - bits += tab->len + 1; - val = (tab->level * quant_matrix[j]) >> 4; - - /* if (bitstream_get (1)) val = -val; */ - val = (val ^ SBITS (bit_buf, 1)) - SBITS (bit_buf, 1); - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - bit_buf <<= 1; - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else { - - /* end of block. I commented out this code because if we */ - /* dont exit here we will still exit at the later test :) */ - - /* if (i >= 128) break; */ /* end of block */ - - /* escape code */ - - i += UBITS (bit_buf << 6, 6) - 64; - if (i >= 64) - break; /* illegal, check against buffer overflow */ - - j = scan[i]; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - val = (SBITS (bit_buf, 12) * quant_matrix[j]) / 16; - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } - } else if (bit_buf >= 0x02000000) { - tab = DCT_B15_10 + (UBITS (bit_buf, 10) - 8); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00800000) { - tab = DCT_13 + (UBITS (bit_buf, 13) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00200000) { - tab = DCT_15 + (UBITS (bit_buf, 15) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else { - tab = DCT_16 + UBITS (bit_buf, 16); - bit_buf <<= 16; - GETWORD (bit_buf, bits + 16, bit_ptr); - i += tab->run; - if (i < 64) - goto normal_code; - } - break; /* illegal, check needed to avoid buffer overflow */ - } - dest[63] ^= mismatch & 16; - DUMPBITS (bit_buf, bits, 4); /* dump end of block code */ - decoder->bitstream_buf = bit_buf; - decoder->bitstream_bits = bits; - decoder->bitstream_ptr = bit_ptr; -} - -static int get_non_intra_block (mpeg2_decoder_t * const decoder, - const uint16_t * const quant_matrix) -{ - int i; - int j; - int val; - const uint8_t * const scan = decoder->scan; - int mismatch; - const DCTtab * tab; - uint32_t bit_buf; - int bits; - const uint8_t * bit_ptr; - int16_t * const dest = decoder->DCTblock; - - i = -1; - mismatch = -1; - - bit_buf = decoder->bitstream_buf; - bits = decoder->bitstream_bits; - bit_ptr = decoder->bitstream_ptr; - - NEEDBITS (bit_buf, bits, bit_ptr); - if (bit_buf >= 0x28000000) { - tab = DCT_B14DC_5 + (UBITS (bit_buf, 5) - 5); - goto entry_1; - } else - goto entry_2; - - while (1) { - if (bit_buf >= 0x28000000) { - - tab = DCT_B14AC_5 + (UBITS (bit_buf, 5) - 5); - - entry_1: - i += tab->run; - if (i >= 64) - break; /* end of block */ - - normal_code: - j = scan[i]; - bit_buf <<= tab->len; - bits += tab->len + 1; - val = ((2 * tab->level + 1) * quant_matrix[j]) >> 5; - - /* if (bitstream_get (1)) val = -val; */ - val = (val ^ SBITS (bit_buf, 1)) - SBITS (bit_buf, 1); - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - bit_buf <<= 1; - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } - - entry_2: - if (bit_buf >= 0x04000000) { - - tab = DCT_B14_8 + (UBITS (bit_buf, 8) - 4); - - i += tab->run; - if (i < 64) - goto normal_code; - - /* escape code */ - - i += UBITS (bit_buf << 6, 6) - 64; - if (i >= 64) - break; /* illegal, check needed to avoid buffer overflow */ - - j = scan[i]; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - val = 2 * (SBITS (bit_buf, 12) + SBITS (bit_buf, 1)) + 1; - val = (val * quant_matrix[j]) / 32; - - SATURATE (val); - dest[j] = val; - mismatch ^= val; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x02000000) { - tab = DCT_B14_10 + (UBITS (bit_buf, 10) - 8); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00800000) { - tab = DCT_13 + (UBITS (bit_buf, 13) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00200000) { - tab = DCT_15 + (UBITS (bit_buf, 15) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else { - tab = DCT_16 + UBITS (bit_buf, 16); - bit_buf <<= 16; - GETWORD (bit_buf, bits + 16, bit_ptr); - i += tab->run; - if (i < 64) - goto normal_code; - } - break; /* illegal, check needed to avoid buffer overflow */ - } - dest[63] ^= mismatch & 16; - DUMPBITS (bit_buf, bits, 2); /* dump end of block code */ - decoder->bitstream_buf = bit_buf; - decoder->bitstream_bits = bits; - decoder->bitstream_ptr = bit_ptr; - return i; -} - -static void get_mpeg1_intra_block (mpeg2_decoder_t * const decoder) -{ - int i; - int j; - int val; - const uint8_t * const scan = decoder->scan; - const uint16_t * const quant_matrix = decoder->quantizer_matrix[0]; - const DCTtab * tab; - uint32_t bit_buf; - int bits; - const uint8_t * bit_ptr; - int16_t * const dest = decoder->DCTblock; - - i = 0; - - bit_buf = decoder->bitstream_buf; - bits = decoder->bitstream_bits; - bit_ptr = decoder->bitstream_ptr; - - NEEDBITS (bit_buf, bits, bit_ptr); - - while (1) { - if (bit_buf >= 0x28000000) { - - tab = DCT_B14AC_5 + (UBITS (bit_buf, 5) - 5); - - i += tab->run; - if (i >= 64) - break; /* end of block */ - - normal_code: - j = scan[i]; - bit_buf <<= tab->len; - bits += tab->len + 1; - val = (tab->level * quant_matrix[j]) >> 4; - - /* oddification */ - val = (val - 1) | 1; - - /* if (bitstream_get (1)) val = -val; */ - val = (val ^ SBITS (bit_buf, 1)) - SBITS (bit_buf, 1); - - SATURATE (val); - dest[j] = val; - - bit_buf <<= 1; - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x04000000) { - - tab = DCT_B14_8 + (UBITS (bit_buf, 8) - 4); - - i += tab->run; - if (i < 64) - goto normal_code; - - /* escape code */ - - i += UBITS (bit_buf << 6, 6) - 64; - if (i >= 64) - break; /* illegal, check needed to avoid buffer overflow */ - - j = scan[i]; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - val = SBITS (bit_buf, 8); - if (! (val & 0x7f)) { - DUMPBITS (bit_buf, bits, 8); - val = UBITS (bit_buf, 8) + 2 * val; - } - val = (val * quant_matrix[j]) / 16; - - /* oddification */ - val = (val + ~SBITS (val, 1)) | 1; - - SATURATE (val); - dest[j] = val; - - DUMPBITS (bit_buf, bits, 8); - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x02000000) { - tab = DCT_B14_10 + (UBITS (bit_buf, 10) - 8); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00800000) { - tab = DCT_13 + (UBITS (bit_buf, 13) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00200000) { - tab = DCT_15 + (UBITS (bit_buf, 15) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else { - tab = DCT_16 + UBITS (bit_buf, 16); - bit_buf <<= 16; - GETWORD (bit_buf, bits + 16, bit_ptr); - i += tab->run; - if (i < 64) - goto normal_code; - } - break; /* illegal, check needed to avoid buffer overflow */ - } - DUMPBITS (bit_buf, bits, 2); /* dump end of block code */ - decoder->bitstream_buf = bit_buf; - decoder->bitstream_bits = bits; - decoder->bitstream_ptr = bit_ptr; -} - -static int get_mpeg1_non_intra_block (mpeg2_decoder_t * const decoder) -{ - int i; - int j; - int val; - const uint8_t * const scan = decoder->scan; - const uint16_t * const quant_matrix = decoder->quantizer_matrix[1]; - const DCTtab * tab; - uint32_t bit_buf; - int bits; - const uint8_t * bit_ptr; - int16_t * const dest = decoder->DCTblock; - - i = -1; - - bit_buf = decoder->bitstream_buf; - bits = decoder->bitstream_bits; - bit_ptr = decoder->bitstream_ptr; - - NEEDBITS (bit_buf, bits, bit_ptr); - if (bit_buf >= 0x28000000) { - tab = DCT_B14DC_5 + (UBITS (bit_buf, 5) - 5); - goto entry_1; - } else - goto entry_2; - - while (1) { - if (bit_buf >= 0x28000000) { - - tab = DCT_B14AC_5 + (UBITS (bit_buf, 5) - 5); - - entry_1: - i += tab->run; - if (i >= 64) - break; /* end of block */ - - normal_code: - j = scan[i]; - bit_buf <<= tab->len; - bits += tab->len + 1; - val = ((2 * tab->level + 1) * quant_matrix[j]) >> 5; - - /* oddification */ - val = (val - 1) | 1; - - /* if (bitstream_get (1)) val = -val; */ - val = (val ^ SBITS (bit_buf, 1)) - SBITS (bit_buf, 1); - - SATURATE (val); - dest[j] = val; - - bit_buf <<= 1; - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } - - entry_2: - if (bit_buf >= 0x04000000) { - - tab = DCT_B14_8 + (UBITS (bit_buf, 8) - 4); - - i += tab->run; - if (i < 64) - goto normal_code; - - /* escape code */ - - i += UBITS (bit_buf << 6, 6) - 64; - if (i >= 64) - break; /* illegal, check needed to avoid buffer overflow */ - - j = scan[i]; - - DUMPBITS (bit_buf, bits, 12); - NEEDBITS (bit_buf, bits, bit_ptr); - val = SBITS (bit_buf, 8); - if (! (val & 0x7f)) { - DUMPBITS (bit_buf, bits, 8); - val = UBITS (bit_buf, 8) + 2 * val; - } - val = 2 * (val + SBITS (val, 1)) + 1; - val = (val * quant_matrix[j]) / 32; - - /* oddification */ - val = (val + ~SBITS (val, 1)) | 1; - - SATURATE (val); - dest[j] = val; - - DUMPBITS (bit_buf, bits, 8); - NEEDBITS (bit_buf, bits, bit_ptr); - - continue; - - } else if (bit_buf >= 0x02000000) { - tab = DCT_B14_10 + (UBITS (bit_buf, 10) - 8); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00800000) { - tab = DCT_13 + (UBITS (bit_buf, 13) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else if (bit_buf >= 0x00200000) { - tab = DCT_15 + (UBITS (bit_buf, 15) - 16); - i += tab->run; - if (i < 64) - goto normal_code; - } else { - tab = DCT_16 + UBITS (bit_buf, 16); - bit_buf <<= 16; - GETWORD (bit_buf, bits + 16, bit_ptr); - i += tab->run; - if (i < 64) - goto normal_code; - } - break; /* illegal, check needed to avoid buffer overflow */ - } - DUMPBITS (bit_buf, bits, 2); /* dump end of block code */ - decoder->bitstream_buf = bit_buf; - decoder->bitstream_bits = bits; - decoder->bitstream_ptr = bit_ptr; - return i; -} - -static inline void slice_intra_DCT (mpeg2_decoder_t * const decoder, - const int cc, - uint8_t * const dest, const int stride) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - NEEDBITS (bit_buf, bits, bit_ptr); - /* Get the intra DC coefficient and inverse quantize it */ - if (cc == 0) - decoder->DCTblock[0] = - decoder->dc_dct_pred[0] += get_luma_dc_dct_diff (decoder); - else - decoder->DCTblock[0] = - decoder->dc_dct_pred[cc] += get_chroma_dc_dct_diff (decoder); - - if (decoder->mpeg1) { - if (decoder->coding_type != D_TYPE) - get_mpeg1_intra_block (decoder); - } else if (decoder->intra_vlc_format) - get_intra_block_B15 (decoder, decoder->quantizer_matrix[cc ? 2 : 0]); - else - get_intra_block_B14 (decoder, decoder->quantizer_matrix[cc ? 2 : 0]); - mpeg2_idct_copy (decoder->DCTblock, dest, stride); -#undef bit_buf -#undef bits -#undef bit_ptr -} - -static inline void slice_non_intra_DCT (mpeg2_decoder_t * const decoder, - const int cc, - uint8_t * const dest, const int stride) -{ - int last; - - if (decoder->mpeg1) - last = get_mpeg1_non_intra_block (decoder); - else - last = get_non_intra_block (decoder, - decoder->quantizer_matrix[cc ? 3 : 1]); - mpeg2_idct_add (last, decoder->DCTblock, dest, stride); -} - -#define MOTION_420(table,ref,motion_x,motion_y,size,y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y_ ## size)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \ - motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \ - ref[0] + (pos_x >> 1) + (pos_y >> 1) * decoder->stride, \ - decoder->stride, size); \ - motion_x /= 2; motion_y /= 2; \ - xy_half = ((motion_y & 1) << 1) | (motion_x & 1); \ - offset = (((decoder->offset + motion_x) >> 1) + \ - ((((decoder->v_offset + motion_y) >> 1) + y/2) * \ - decoder->uv_stride)); \ - table[4+xy_half] (decoder->dest[1] + y/2 * decoder->uv_stride + \ - (decoder->offset >> 1), ref[1] + offset, \ - decoder->uv_stride, size/2); \ - table[4+xy_half] (decoder->dest[2] + y/2 * decoder->uv_stride + \ - (decoder->offset >> 1), ref[2] + offset, \ - decoder->uv_stride, size/2) - -#define MOTION_FIELD_420(table,ref,motion_x,motion_y,dest_field,op,src_field) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \ - decoder->offset, \ - (ref[0] + (pos_x >> 1) + \ - ((pos_y op) + src_field) * decoder->stride), \ - 2 * decoder->stride, 8); \ - motion_x /= 2; motion_y /= 2; \ - xy_half = ((motion_y & 1) << 1) | (motion_x & 1); \ - offset = (((decoder->offset + motion_x) >> 1) + \ - (((decoder->v_offset >> 1) + (motion_y op) + src_field) * \ - decoder->uv_stride)); \ - table[4+xy_half] (decoder->dest[1] + dest_field * decoder->uv_stride + \ - (decoder->offset >> 1), ref[1] + offset, \ - 2 * decoder->uv_stride, 4); \ - table[4+xy_half] (decoder->dest[2] + dest_field * decoder->uv_stride + \ - (decoder->offset >> 1), ref[2] + offset, \ - 2 * decoder->uv_stride, 4) - -#define MOTION_DMV_420(table,ref,motion_x,motion_y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + (pos_y & ~1) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + decoder->offset, \ - ref[0] + offset, 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[0] + decoder->stride + decoder->offset, \ - ref[0] + decoder->stride + offset, \ - 2 * decoder->stride, 8); \ - motion_x /= 2; motion_y /= 2; \ - xy_half = ((motion_y & 1) << 1) | (motion_x & 1); \ - offset = (((decoder->offset + motion_x) >> 1) + \ - (((decoder->v_offset >> 1) + (motion_y & ~1)) * \ - decoder->uv_stride)); \ - table[4+xy_half] (decoder->dest[1] + (decoder->offset >> 1), \ - ref[1] + offset, 2 * decoder->uv_stride, 4); \ - table[4+xy_half] (decoder->dest[1] + decoder->uv_stride + \ - (decoder->offset >> 1), \ - ref[1] + decoder->uv_stride + offset, \ - 2 * decoder->uv_stride, 4); \ - table[4+xy_half] (decoder->dest[2] + (decoder->offset >> 1), \ - ref[2] + offset, 2 * decoder->uv_stride, 4); \ - table[4+xy_half] (decoder->dest[2] + decoder->uv_stride + \ - (decoder->offset >> 1), \ - ref[2] + decoder->uv_stride + offset, \ - 2 * decoder->uv_stride, 4) - -#define MOTION_ZERO_420(table,ref) \ - table[0] (decoder->dest[0] + decoder->offset, \ - (ref[0] + decoder->offset + \ - decoder->v_offset * decoder->stride), decoder->stride, 16); \ - offset = ((decoder->offset >> 1) + \ - (decoder->v_offset >> 1) * decoder->uv_stride); \ - table[4] (decoder->dest[1] + (decoder->offset >> 1), \ - ref[1] + offset, decoder->uv_stride, 8); \ - table[4] (decoder->dest[2] + (decoder->offset >> 1), \ - ref[2] + offset, decoder->uv_stride, 8) - -#define MOTION_422(table,ref,motion_x,motion_y,size,y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y_ ## size)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \ - motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + (pos_y >> 1) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \ - ref[0] + offset, decoder->stride, size); \ - offset = (offset + (motion_x & (motion_x < 0))) >> 1; \ - motion_x /= 2; \ - xy_half = ((pos_y & 1) << 1) | (motion_x & 1); \ - table[4+xy_half] (decoder->dest[1] + y * decoder->uv_stride + \ - (decoder->offset >> 1), ref[1] + offset, \ - decoder->uv_stride, size); \ - table[4+xy_half] (decoder->dest[2] + y * decoder->uv_stride + \ - (decoder->offset >> 1), ref[2] + offset, \ - decoder->uv_stride, size) - -#define MOTION_FIELD_422(table,ref,motion_x,motion_y,dest_field,op,src_field) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + ((pos_y op) + src_field) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \ - decoder->offset, ref[0] + offset, \ - 2 * decoder->stride, 8); \ - offset = (offset + (motion_x & (motion_x < 0))) >> 1; \ - motion_x /= 2; \ - xy_half = ((pos_y & 1) << 1) | (motion_x & 1); \ - table[4+xy_half] (decoder->dest[1] + dest_field * decoder->uv_stride + \ - (decoder->offset >> 1), ref[1] + offset, \ - 2 * decoder->uv_stride, 8); \ - table[4+xy_half] (decoder->dest[2] + dest_field * decoder->uv_stride + \ - (decoder->offset >> 1), ref[2] + offset, \ - 2 * decoder->uv_stride, 8) - -#define MOTION_DMV_422(table,ref,motion_x,motion_y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + (pos_y & ~1) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + decoder->offset, \ - ref[0] + offset, 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[0] + decoder->stride + decoder->offset, \ - ref[0] + decoder->stride + offset, \ - 2 * decoder->stride, 8); \ - offset = (offset + (motion_x & (motion_x < 0))) >> 1; \ - motion_x /= 2; \ - xy_half = ((pos_y & 1) << 1) | (motion_x & 1); \ - table[4+xy_half] (decoder->dest[1] + (decoder->offset >> 1), \ - ref[1] + offset, 2 * decoder->uv_stride, 8); \ - table[4+xy_half] (decoder->dest[1] + decoder->uv_stride + \ - (decoder->offset >> 1), \ - ref[1] + decoder->uv_stride + offset, \ - 2 * decoder->uv_stride, 8); \ - table[4+xy_half] (decoder->dest[2] + (decoder->offset >> 1), \ - ref[2] + offset, 2 * decoder->uv_stride, 8); \ - table[4+xy_half] (decoder->dest[2] + decoder->uv_stride + \ - (decoder->offset >> 1), \ - ref[2] + decoder->uv_stride + offset, \ - 2 * decoder->uv_stride, 8) - -#define MOTION_ZERO_422(table,ref) \ - offset = decoder->offset + decoder->v_offset * decoder->stride; \ - table[0] (decoder->dest[0] + decoder->offset, \ - ref[0] + offset, decoder->stride, 16); \ - offset >>= 1; \ - table[4] (decoder->dest[1] + (decoder->offset >> 1), \ - ref[1] + offset, decoder->uv_stride, 16); \ - table[4] (decoder->dest[2] + (decoder->offset >> 1), \ - ref[2] + offset, decoder->uv_stride, 16) - -#define MOTION_444(table,ref,motion_x,motion_y,size,y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y_ ## size)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \ - motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + (pos_y >> 1) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \ - ref[0] + offset, decoder->stride, size); \ - table[xy_half] (decoder->dest[1] + y * decoder->stride + decoder->offset, \ - ref[1] + offset, decoder->stride, size); \ - table[xy_half] (decoder->dest[2] + y * decoder->stride + decoder->offset, \ - ref[2] + offset, decoder->stride, size) - -#define MOTION_FIELD_444(table,ref,motion_x,motion_y,dest_field,op,src_field) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + ((pos_y op) + src_field) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \ - decoder->offset, ref[0] + offset, \ - 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[1] + dest_field * decoder->stride + \ - decoder->offset, ref[1] + offset, \ - 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[2] + dest_field * decoder->stride + \ - decoder->offset, ref[2] + offset, \ - 2 * decoder->stride, 8) - -#define MOTION_DMV_444(table,ref,motion_x,motion_y) \ - pos_x = 2 * decoder->offset + motion_x; \ - pos_y = decoder->v_offset + motion_y; \ - if (unlikely (pos_x > decoder->limit_x)) { \ - pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \ - motion_x = pos_x - 2 * decoder->offset; \ - } \ - if (unlikely (pos_y > decoder->limit_y)) { \ - pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \ - motion_y = pos_y - decoder->v_offset; \ - } \ - xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \ - offset = (pos_x >> 1) + (pos_y & ~1) * decoder->stride; \ - table[xy_half] (decoder->dest[0] + decoder->offset, \ - ref[0] + offset, 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[0] + decoder->stride + decoder->offset, \ - ref[0] + decoder->stride + offset, \ - 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[1] + decoder->offset, \ - ref[1] + offset, 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[1] + decoder->stride + decoder->offset, \ - ref[1] + decoder->stride + offset, \ - 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[2] + decoder->offset, \ - ref[2] + offset, 2 * decoder->stride, 8); \ - table[xy_half] (decoder->dest[2] + decoder->stride + decoder->offset, \ - ref[2] + decoder->stride + offset, \ - 2 * decoder->stride, 8) - -#define MOTION_ZERO_444(table,ref) \ - offset = decoder->offset + decoder->v_offset * decoder->stride; \ - table[0] (decoder->dest[0] + decoder->offset, \ - ref[0] + offset, decoder->stride, 16); \ - table[4] (decoder->dest[1] + decoder->offset, \ - ref[1] + offset, decoder->stride, 16); \ - table[4] (decoder->dest[2] + (decoder->offset >> 1), \ - ref[2] + offset, decoder->stride, 16) - -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - -static void motion_mp1 (mpeg2_decoder_t * const decoder, - motion_t * const motion, - mpeg2_mc_fct * const * const table) -{ - int motion_x, motion_y; - unsigned int pos_x, pos_y, xy_half, offset; - - NEEDBITS (bit_buf, bits, bit_ptr); - motion_x = (motion->pmv[0][0] + - (get_motion_delta (decoder, - motion->f_code[0]) << motion->f_code[1])); - motion_x = bound_motion_vector (motion_x, - motion->f_code[0] + motion->f_code[1]); - motion->pmv[0][0] = motion_x; - - NEEDBITS (bit_buf, bits, bit_ptr); - motion_y = (motion->pmv[0][1] + - (get_motion_delta (decoder, - motion->f_code[0]) << motion->f_code[1])); - motion_y = bound_motion_vector (motion_y, - motion->f_code[0] + motion->f_code[1]); - motion->pmv[0][1] = motion_y; - - MOTION_420 (table, motion->ref[0], motion_x, motion_y, 16, 0); -} - -#define MOTION_FUNCTIONS(FORMAT,MOTION,MOTION_FIELD,MOTION_DMV,MOTION_ZERO) \ - \ -static void motion_fr_frame_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion->pmv[0][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = motion->pmv[0][1] + get_motion_delta (decoder, \ - motion->f_code[1]); \ - motion_y = bound_motion_vector (motion_y, motion->f_code[1]); \ - motion->pmv[1][1] = motion->pmv[0][1] = motion_y; \ - \ - MOTION (table, motion->ref[0], motion_x, motion_y, 16, 0); \ -} \ - \ -static void motion_fr_field_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y, field; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - field = UBITS (bit_buf, 1); \ - DUMPBITS (bit_buf, bits, 1); \ - \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[0][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = ((motion->pmv[0][1] >> 1) + \ - get_motion_delta (decoder, motion->f_code[1])); \ - /* motion_y = bound_motion_vector (motion_y, motion->f_code[1]); */ \ - motion->pmv[0][1] = motion_y << 1; \ - \ - MOTION_FIELD (table, motion->ref[0], motion_x, motion_y, 0, & ~1, field); \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - field = UBITS (bit_buf, 1); \ - DUMPBITS (bit_buf, bits, 1); \ - \ - motion_x = motion->pmv[1][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = ((motion->pmv[1][1] >> 1) + \ - get_motion_delta (decoder, motion->f_code[1])); \ - /* motion_y = bound_motion_vector (motion_y, motion->f_code[1]); */ \ - motion->pmv[1][1] = motion_y << 1; \ - \ - MOTION_FIELD (table, motion->ref[0], motion_x, motion_y, 1, & ~1, field); \ -} \ - \ -static void motion_fr_dmv_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y, dmv_x, dmv_y, m, other_x, other_y; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion->pmv[0][0] = motion_x; \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - dmv_x = get_dmv (decoder); \ - \ - motion_y = ((motion->pmv[0][1] >> 1) + \ - get_motion_delta (decoder, motion->f_code[1])); \ - /* motion_y = bound_motion_vector (motion_y, motion->f_code[1]); */ \ - motion->pmv[1][1] = motion->pmv[0][1] = motion_y << 1; \ - dmv_y = get_dmv (decoder); \ - \ - m = decoder->top_field_first ? 1 : 3; \ - other_x = ((motion_x * m + (motion_x > 0)) >> 1) + dmv_x; \ - other_y = ((motion_y * m + (motion_y > 0)) >> 1) + dmv_y - 1; \ - MOTION_FIELD (mpeg2_mc.put, motion->ref[0], other_x, other_y, 0, | 1, 0); \ - \ - m = decoder->top_field_first ? 3 : 1; \ - other_x = ((motion_x * m + (motion_x > 0)) >> 1) + dmv_x; \ - other_y = ((motion_y * m + (motion_y > 0)) >> 1) + dmv_y + 1; \ - MOTION_FIELD (mpeg2_mc.put, motion->ref[0], other_x, other_y, 1, & ~1, 0);\ - \ - MOTION_DMV (mpeg2_mc.avg, motion->ref[0], motion_x, motion_y); \ -} \ - \ -static void motion_reuse_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - motion_x = motion->pmv[0][0]; \ - motion_y = motion->pmv[0][1]; \ - \ - MOTION (table, motion->ref[0], motion_x, motion_y, 16, 0); \ -} \ - \ -static void motion_zero_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - unsigned int offset; \ - \ - motion->pmv[0][0] = motion->pmv[0][1] = 0; \ - motion->pmv[1][0] = motion->pmv[1][1] = 0; \ - \ - MOTION_ZERO (table, motion->ref[0]); \ -} \ - \ -static void motion_fi_field_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y; \ - uint8_t ** ref_field; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - ref_field = motion->ref2[UBITS (bit_buf, 1)]; \ - DUMPBITS (bit_buf, bits, 1); \ - \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion->pmv[0][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = motion->pmv[0][1] + get_motion_delta (decoder, \ - motion->f_code[1]); \ - motion_y = bound_motion_vector (motion_y, motion->f_code[1]); \ - motion->pmv[1][1] = motion->pmv[0][1] = motion_y; \ - \ - MOTION (table, ref_field, motion_x, motion_y, 16, 0); \ -} \ - \ -static void motion_fi_16x8_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y; \ - uint8_t ** ref_field; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - ref_field = motion->ref2[UBITS (bit_buf, 1)]; \ - DUMPBITS (bit_buf, bits, 1); \ - \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[0][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = motion->pmv[0][1] + get_motion_delta (decoder, \ - motion->f_code[1]); \ - motion_y = bound_motion_vector (motion_y, motion->f_code[1]); \ - motion->pmv[0][1] = motion_y; \ - \ - MOTION (table, ref_field, motion_x, motion_y, 8, 0); \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - ref_field = motion->ref2[UBITS (bit_buf, 1)]; \ - DUMPBITS (bit_buf, bits, 1); \ - \ - motion_x = motion->pmv[1][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion_x; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_y = motion->pmv[1][1] + get_motion_delta (decoder, \ - motion->f_code[1]); \ - motion_y = bound_motion_vector (motion_y, motion->f_code[1]); \ - motion->pmv[1][1] = motion_y; \ - \ - MOTION (table, ref_field, motion_x, motion_y, 8, 8); \ -} \ - \ -static void motion_fi_dmv_##FORMAT (mpeg2_decoder_t * const decoder, \ - motion_t * const motion, \ - mpeg2_mc_fct * const * const table) \ -{ \ - int motion_x, motion_y, other_x, other_y; \ - unsigned int pos_x, pos_y, xy_half, offset; \ - \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - motion_x = motion->pmv[0][0] + get_motion_delta (decoder, \ - motion->f_code[0]); \ - motion_x = bound_motion_vector (motion_x, motion->f_code[0]); \ - motion->pmv[1][0] = motion->pmv[0][0] = motion_x; \ - NEEDBITS (bit_buf, bits, bit_ptr); \ - other_x = ((motion_x + (motion_x > 0)) >> 1) + get_dmv (decoder); \ - \ - motion_y = motion->pmv[0][1] + get_motion_delta (decoder, \ - motion->f_code[1]); \ - motion_y = bound_motion_vector (motion_y, motion->f_code[1]); \ - motion->pmv[1][1] = motion->pmv[0][1] = motion_y; \ - other_y = (((motion_y + (motion_y > 0)) >> 1) + get_dmv (decoder) + \ - decoder->dmv_offset); \ - \ - MOTION (mpeg2_mc.put, motion->ref[0], motion_x, motion_y, 16, 0); \ - MOTION (mpeg2_mc.avg, motion->ref[1], other_x, other_y, 16, 0); \ -} \ - -MOTION_FUNCTIONS (420, MOTION_420, MOTION_FIELD_420, MOTION_DMV_420, - MOTION_ZERO_420) -MOTION_FUNCTIONS (422, MOTION_422, MOTION_FIELD_422, MOTION_DMV_422, - MOTION_ZERO_422) -MOTION_FUNCTIONS (444, MOTION_444, MOTION_FIELD_444, MOTION_DMV_444, - MOTION_ZERO_444) - -/* like motion_frame, but parsing without actual motion compensation */ -static void motion_fr_conceal (mpeg2_decoder_t * const decoder) -{ - int tmp; - - NEEDBITS (bit_buf, bits, bit_ptr); - tmp = (decoder->f_motion.pmv[0][0] + - get_motion_delta (decoder, decoder->f_motion.f_code[0])); - tmp = bound_motion_vector (tmp, decoder->f_motion.f_code[0]); - decoder->f_motion.pmv[1][0] = decoder->f_motion.pmv[0][0] = tmp; - - NEEDBITS (bit_buf, bits, bit_ptr); - tmp = (decoder->f_motion.pmv[0][1] + - get_motion_delta (decoder, decoder->f_motion.f_code[1])); - tmp = bound_motion_vector (tmp, decoder->f_motion.f_code[1]); - decoder->f_motion.pmv[1][1] = decoder->f_motion.pmv[0][1] = tmp; - - DUMPBITS (bit_buf, bits, 1); /* remove marker_bit */ -} - -static void motion_fi_conceal (mpeg2_decoder_t * const decoder) -{ - int tmp; - - NEEDBITS (bit_buf, bits, bit_ptr); - DUMPBITS (bit_buf, bits, 1); /* remove field_select */ - - tmp = (decoder->f_motion.pmv[0][0] + - get_motion_delta (decoder, decoder->f_motion.f_code[0])); - tmp = bound_motion_vector (tmp, decoder->f_motion.f_code[0]); - decoder->f_motion.pmv[1][0] = decoder->f_motion.pmv[0][0] = tmp; - - NEEDBITS (bit_buf, bits, bit_ptr); - tmp = (decoder->f_motion.pmv[0][1] + - get_motion_delta (decoder, decoder->f_motion.f_code[1])); - tmp = bound_motion_vector (tmp, decoder->f_motion.f_code[1]); - decoder->f_motion.pmv[1][1] = decoder->f_motion.pmv[0][1] = tmp; - - DUMPBITS (bit_buf, bits, 1); /* remove marker_bit */ -} - -#undef bit_buf -#undef bits -#undef bit_ptr - -#define MOTION_CALL(routine,direction) \ -do { \ - if ((direction) & MACROBLOCK_MOTION_FORWARD) \ - routine (decoder, &(decoder->f_motion), mpeg2_mc.put); \ - if ((direction) & MACROBLOCK_MOTION_BACKWARD) \ - routine (decoder, &(decoder->b_motion), \ - ((direction) & MACROBLOCK_MOTION_FORWARD ? \ - mpeg2_mc.avg : mpeg2_mc.put)); \ -} while (0) - -#define NEXT_MACROBLOCK \ -do { \ - decoder->offset += 16; \ - if (decoder->offset == decoder->width) { \ - do { /* just so we can use the break statement */ \ - if (decoder->convert) { \ - decoder->convert (decoder->convert_id, decoder->dest, \ - decoder->v_offset); \ - if (decoder->coding_type == B_TYPE) \ - break; \ - } \ - decoder->dest[0] += decoder->slice_stride; \ - decoder->dest[1] += decoder->slice_uv_stride; \ - decoder->dest[2] += decoder->slice_uv_stride; \ - } while (0); \ - decoder->v_offset += 16; \ - if (decoder->v_offset > decoder->limit_y) { \ - if (mpeg2_cpu_state_restore) \ - mpeg2_cpu_state_restore (&cpu_state); \ - return; \ - } \ - decoder->offset = 0; \ - } \ -} while (0) - -void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, uint8_t * current_fbuf[3], - uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3]) -{ - int offset, stride, height, bottom_field; - - stride = decoder->stride_frame; - bottom_field = (decoder->picture_structure == BOTTOM_FIELD); - offset = bottom_field ? stride : 0; - height = decoder->height; - - decoder->picture_dest[0] = current_fbuf[0] + offset; - decoder->picture_dest[1] = current_fbuf[1] + (offset >> 1); - decoder->picture_dest[2] = current_fbuf[2] + (offset >> 1); - - decoder->f_motion.ref[0][0] = forward_fbuf[0] + offset; - decoder->f_motion.ref[0][1] = forward_fbuf[1] + (offset >> 1); - decoder->f_motion.ref[0][2] = forward_fbuf[2] + (offset >> 1); - - decoder->b_motion.ref[0][0] = backward_fbuf[0] + offset; - decoder->b_motion.ref[0][1] = backward_fbuf[1] + (offset >> 1); - decoder->b_motion.ref[0][2] = backward_fbuf[2] + (offset >> 1); - - if (decoder->picture_structure != FRAME_PICTURE) { - decoder->dmv_offset = bottom_field ? 1 : -1; - decoder->f_motion.ref2[0] = decoder->f_motion.ref[bottom_field]; - decoder->f_motion.ref2[1] = decoder->f_motion.ref[!bottom_field]; - decoder->b_motion.ref2[0] = decoder->b_motion.ref[bottom_field]; - decoder->b_motion.ref2[1] = decoder->b_motion.ref[!bottom_field]; - offset = stride - offset; - - if (decoder->second_field && (decoder->coding_type != B_TYPE)) - forward_fbuf = current_fbuf; - - decoder->f_motion.ref[1][0] = forward_fbuf[0] + offset; - decoder->f_motion.ref[1][1] = forward_fbuf[1] + (offset >> 1); - decoder->f_motion.ref[1][2] = forward_fbuf[2] + (offset >> 1); - - decoder->b_motion.ref[1][0] = backward_fbuf[0] + offset; - decoder->b_motion.ref[1][1] = backward_fbuf[1] + (offset >> 1); - decoder->b_motion.ref[1][2] = backward_fbuf[2] + (offset >> 1); - - stride <<= 1; - height >>= 1; - } - - decoder->stride = stride; - decoder->uv_stride = stride >> 1; - decoder->slice_stride = 16 * stride; - decoder->slice_uv_stride = - decoder->slice_stride >> (2 - decoder->chroma_format); - decoder->limit_x = 2 * decoder->width - 32; - decoder->limit_y_16 = 2 * height - 32; - decoder->limit_y_8 = 2 * height - 16; - decoder->limit_y = height - 16; - - if (decoder->mpeg1) { - decoder->motion_parser[0] = motion_zero_420; - decoder->motion_parser[MC_FRAME] = motion_mp1; - decoder->motion_parser[4] = motion_reuse_420; - } else if (decoder->picture_structure == FRAME_PICTURE) { - if (decoder->chroma_format == 0) { - decoder->motion_parser[0] = motion_zero_420; - decoder->motion_parser[MC_FIELD] = motion_fr_field_420; - decoder->motion_parser[MC_FRAME] = motion_fr_frame_420; - decoder->motion_parser[MC_DMV] = motion_fr_dmv_420; - decoder->motion_parser[4] = motion_reuse_420; - } else if (decoder->chroma_format == 1) { - decoder->motion_parser[0] = motion_zero_422; - decoder->motion_parser[MC_FIELD] = motion_fr_field_422; - decoder->motion_parser[MC_FRAME] = motion_fr_frame_422; - decoder->motion_parser[MC_DMV] = motion_fr_dmv_422; - decoder->motion_parser[4] = motion_reuse_422; - } else { - decoder->motion_parser[0] = motion_zero_444; - decoder->motion_parser[MC_FIELD] = motion_fr_field_444; - decoder->motion_parser[MC_FRAME] = motion_fr_frame_444; - decoder->motion_parser[MC_DMV] = motion_fr_dmv_444; - decoder->motion_parser[4] = motion_reuse_444; - } - } else { - if (decoder->chroma_format == 0) { - decoder->motion_parser[0] = motion_zero_420; - decoder->motion_parser[MC_FIELD] = motion_fi_field_420; - decoder->motion_parser[MC_16X8] = motion_fi_16x8_420; - decoder->motion_parser[MC_DMV] = motion_fi_dmv_420; - decoder->motion_parser[4] = motion_reuse_420; - } else if (decoder->chroma_format == 1) { - decoder->motion_parser[0] = motion_zero_422; - decoder->motion_parser[MC_FIELD] = motion_fi_field_422; - decoder->motion_parser[MC_16X8] = motion_fi_16x8_422; - decoder->motion_parser[MC_DMV] = motion_fi_dmv_422; - decoder->motion_parser[4] = motion_reuse_422; - } else { - decoder->motion_parser[0] = motion_zero_444; - decoder->motion_parser[MC_FIELD] = motion_fi_field_444; - decoder->motion_parser[MC_16X8] = motion_fi_16x8_444; - decoder->motion_parser[MC_DMV] = motion_fi_dmv_444; - decoder->motion_parser[4] = motion_reuse_444; - } - } -} - -static inline int slice_init (mpeg2_decoder_t * const decoder, int code) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - int offset; - const MBAtab * mba; - - decoder->dc_dct_pred[0] = decoder->dc_dct_pred[1] = - decoder->dc_dct_pred[2] = 16384; - - decoder->f_motion.pmv[0][0] = decoder->f_motion.pmv[0][1] = 0; - decoder->f_motion.pmv[1][0] = decoder->f_motion.pmv[1][1] = 0; - decoder->b_motion.pmv[0][0] = decoder->b_motion.pmv[0][1] = 0; - decoder->b_motion.pmv[1][0] = decoder->b_motion.pmv[1][1] = 0; - - if (decoder->vertical_position_extension) { - code += UBITS (bit_buf, 3) << 7; - DUMPBITS (bit_buf, bits, 3); - } - decoder->v_offset = (code - 1) * 16; - offset = 0; - if (!(decoder->convert) || decoder->coding_type != B_TYPE) - offset = (code - 1) * decoder->slice_stride; - - decoder->dest[0] = decoder->picture_dest[0] + offset; - offset >>= (2 - decoder->chroma_format); - decoder->dest[1] = decoder->picture_dest[1] + offset; - decoder->dest[2] = decoder->picture_dest[2] + offset; - - get_quantizer_scale (decoder); - - /* ignore intra_slice and all the extra data */ - while (bit_buf & 0x80000000) { - DUMPBITS (bit_buf, bits, 9); - NEEDBITS (bit_buf, bits, bit_ptr); - } - - /* decode initial macroblock address increment */ - offset = 0; - while (1) { - if (bit_buf >= 0x08000000) { - mba = MBA_5 + (UBITS (bit_buf, 6) - 2); - break; - } else if (bit_buf >= 0x01800000) { - mba = MBA_11 + (UBITS (bit_buf, 12) - 24); - break; - } else switch (UBITS (bit_buf, 12)) { - case 8: /* macroblock_escape */ - offset += 33; - DUMPBITS (bit_buf, bits, 11); - NEEDBITS (bit_buf, bits, bit_ptr); - continue; - case 15: /* macroblock_stuffing (MPEG1 only) */ - bit_buf &= 0xfffff; - DUMPBITS (bit_buf, bits, 11); - NEEDBITS (bit_buf, bits, bit_ptr); - continue; - default: /* error */ - return 1; - } - } - DUMPBITS (bit_buf, bits, mba->len + 1); - decoder->offset = (offset + mba->mba) << 4; - - while (decoder->offset - decoder->width >= 0) { - decoder->offset -= decoder->width; - if (!(decoder->convert) || decoder->coding_type != B_TYPE) { - decoder->dest[0] += decoder->slice_stride; - decoder->dest[1] += decoder->slice_uv_stride; - decoder->dest[2] += decoder->slice_uv_stride; - } - decoder->v_offset += 16; - } - if (decoder->v_offset > decoder->limit_y) - return 1; - - return 0; -#undef bit_buf -#undef bits -#undef bit_ptr -} - -void mpeg2_slice (mpeg2_decoder_t * const decoder, const int code, - const uint8_t * const buffer) -{ -#define bit_buf (decoder->bitstream_buf) -#define bits (decoder->bitstream_bits) -#define bit_ptr (decoder->bitstream_ptr) - cpu_state_t cpu_state; - - bitstream_init (decoder, buffer); - - if (slice_init (decoder, code)) - return; - - if (mpeg2_cpu_state_save) - mpeg2_cpu_state_save (&cpu_state); - - while (1) { - int macroblock_modes; - int mba_inc; - const MBAtab * mba; - - NEEDBITS (bit_buf, bits, bit_ptr); - - macroblock_modes = get_macroblock_modes (decoder); - - /* maybe integrate MACROBLOCK_QUANT test into get_macroblock_modes ? */ - if (macroblock_modes & MACROBLOCK_QUANT) - get_quantizer_scale (decoder); - - if (macroblock_modes & MACROBLOCK_INTRA) { - - int DCT_offset, DCT_stride; - int offset; - uint8_t * dest_y; - - if (decoder->concealment_motion_vectors) { - if (decoder->picture_structure == FRAME_PICTURE) - motion_fr_conceal (decoder); - else - motion_fi_conceal (decoder); - } else { - decoder->f_motion.pmv[0][0] = decoder->f_motion.pmv[0][1] = 0; - decoder->f_motion.pmv[1][0] = decoder->f_motion.pmv[1][1] = 0; - decoder->b_motion.pmv[0][0] = decoder->b_motion.pmv[0][1] = 0; - decoder->b_motion.pmv[1][0] = decoder->b_motion.pmv[1][1] = 0; - } - - if (macroblock_modes & DCT_TYPE_INTERLACED) { - DCT_offset = decoder->stride; - DCT_stride = decoder->stride * 2; - } else { - DCT_offset = decoder->stride * 8; - DCT_stride = decoder->stride; - } - - offset = decoder->offset; - dest_y = decoder->dest[0] + offset; - slice_intra_DCT (decoder, 0, dest_y, DCT_stride); - slice_intra_DCT (decoder, 0, dest_y + 8, DCT_stride); - slice_intra_DCT (decoder, 0, dest_y + DCT_offset, DCT_stride); - slice_intra_DCT (decoder, 0, dest_y + DCT_offset + 8, DCT_stride); - if (likely (decoder->chroma_format == 0)) { - slice_intra_DCT (decoder, 1, decoder->dest[1] + (offset >> 1), - decoder->uv_stride); - slice_intra_DCT (decoder, 2, decoder->dest[2] + (offset >> 1), - decoder->uv_stride); - if (decoder->coding_type == D_TYPE) { - NEEDBITS (bit_buf, bits, bit_ptr); - DUMPBITS (bit_buf, bits, 1); - } - } else if (likely (decoder->chroma_format == 1)) { - uint8_t * dest_u = decoder->dest[1] + (offset >> 1); - uint8_t * dest_v = decoder->dest[2] + (offset >> 1); - DCT_stride >>= 1; - DCT_offset >>= 1; - slice_intra_DCT (decoder, 1, dest_u, DCT_stride); - slice_intra_DCT (decoder, 2, dest_v, DCT_stride); - slice_intra_DCT (decoder, 1, dest_u + DCT_offset, DCT_stride); - slice_intra_DCT (decoder, 2, dest_v + DCT_offset, DCT_stride); - } else { - uint8_t * dest_u = decoder->dest[1] + offset; - uint8_t * dest_v = decoder->dest[2] + offset; - slice_intra_DCT (decoder, 1, dest_u, DCT_stride); - slice_intra_DCT (decoder, 2, dest_v, DCT_stride); - slice_intra_DCT (decoder, 1, dest_u + DCT_offset, DCT_stride); - slice_intra_DCT (decoder, 2, dest_v + DCT_offset, DCT_stride); - slice_intra_DCT (decoder, 1, dest_u + 8, DCT_stride); - slice_intra_DCT (decoder, 2, dest_v + 8, DCT_stride); - slice_intra_DCT (decoder, 1, dest_u + DCT_offset + 8, - DCT_stride); - slice_intra_DCT (decoder, 2, dest_v + DCT_offset + 8, - DCT_stride); - } - } else { - - motion_parser_t * parser; - - parser = - decoder->motion_parser[macroblock_modes >> MOTION_TYPE_SHIFT]; - MOTION_CALL (parser, macroblock_modes); - - if (macroblock_modes & MACROBLOCK_PATTERN) { - int coded_block_pattern; - int DCT_offset, DCT_stride; - - if (macroblock_modes & DCT_TYPE_INTERLACED) { - DCT_offset = decoder->stride; - DCT_stride = decoder->stride * 2; - } else { - DCT_offset = decoder->stride * 8; - DCT_stride = decoder->stride; - } - - coded_block_pattern = get_coded_block_pattern (decoder); - - if (likely (decoder->chroma_format == 0)) { - int offset = decoder->offset; - uint8_t * dest_y = decoder->dest[0] + offset; - if (coded_block_pattern & 1) - slice_non_intra_DCT (decoder, 0, dest_y, DCT_stride); - if (coded_block_pattern & 2) - slice_non_intra_DCT (decoder, 0, dest_y + 8, - DCT_stride); - if (coded_block_pattern & 4) - slice_non_intra_DCT (decoder, 0, dest_y + DCT_offset, - DCT_stride); - if (coded_block_pattern & 8) - slice_non_intra_DCT (decoder, 0, - dest_y + DCT_offset + 8, - DCT_stride); - if (coded_block_pattern & 16) - slice_non_intra_DCT (decoder, 1, - decoder->dest[1] + (offset >> 1), - decoder->uv_stride); - if (coded_block_pattern & 32) - slice_non_intra_DCT (decoder, 2, - decoder->dest[2] + (offset >> 1), - decoder->uv_stride); - } else if (likely (decoder->chroma_format == 1)) { - int offset; - uint8_t * dest_y; - - coded_block_pattern |= bit_buf & (3 << 30); - DUMPBITS (bit_buf, bits, 2); - - offset = decoder->offset; - dest_y = decoder->dest[0] + offset; - if (coded_block_pattern & 1) - slice_non_intra_DCT (decoder, 0, dest_y, DCT_stride); - if (coded_block_pattern & 2) - slice_non_intra_DCT (decoder, 0, dest_y + 8, - DCT_stride); - if (coded_block_pattern & 4) - slice_non_intra_DCT (decoder, 0, dest_y + DCT_offset, - DCT_stride); - if (coded_block_pattern & 8) - slice_non_intra_DCT (decoder, 0, - dest_y + DCT_offset + 8, - DCT_stride); - - DCT_stride >>= 1; - DCT_offset = (DCT_offset + offset) >> 1; - if (coded_block_pattern & 16) - slice_non_intra_DCT (decoder, 1, - decoder->dest[1] + (offset >> 1), - DCT_stride); - if (coded_block_pattern & 32) - slice_non_intra_DCT (decoder, 2, - decoder->dest[2] + (offset >> 1), - DCT_stride); - if (coded_block_pattern & (2 << 30)) - slice_non_intra_DCT (decoder, 1, - decoder->dest[1] + DCT_offset, - DCT_stride); - if (coded_block_pattern & (1 << 30)) - slice_non_intra_DCT (decoder, 2, - decoder->dest[2] + DCT_offset, - DCT_stride); - } else { - int offset; - uint8_t * dest_y, * dest_u, * dest_v; - - coded_block_pattern |= bit_buf & (63 << 26); - DUMPBITS (bit_buf, bits, 6); - - offset = decoder->offset; - dest_y = decoder->dest[0] + offset; - dest_u = decoder->dest[1] + offset; - dest_v = decoder->dest[2] + offset; - - if (coded_block_pattern & 1) - slice_non_intra_DCT (decoder, 0, dest_y, DCT_stride); - if (coded_block_pattern & 2) - slice_non_intra_DCT (decoder, 0, dest_y + 8, - DCT_stride); - if (coded_block_pattern & 4) - slice_non_intra_DCT (decoder, 0, dest_y + DCT_offset, - DCT_stride); - if (coded_block_pattern & 8) - slice_non_intra_DCT (decoder, 0, - dest_y + DCT_offset + 8, - DCT_stride); - - if (coded_block_pattern & 16) - slice_non_intra_DCT (decoder, 1, dest_u, DCT_stride); - if (coded_block_pattern & 32) - slice_non_intra_DCT (decoder, 2, dest_v, DCT_stride); - if (coded_block_pattern & (32 << 26)) - slice_non_intra_DCT (decoder, 1, dest_u + DCT_offset, - DCT_stride); - if (coded_block_pattern & (16 << 26)) - slice_non_intra_DCT (decoder, 2, dest_v + DCT_offset, - DCT_stride); - if (coded_block_pattern & (8 << 26)) - slice_non_intra_DCT (decoder, 1, dest_u + 8, - DCT_stride); - if (coded_block_pattern & (4 << 26)) - slice_non_intra_DCT (decoder, 2, dest_v + 8, - DCT_stride); - if (coded_block_pattern & (2 << 26)) - slice_non_intra_DCT (decoder, 1, - dest_u + DCT_offset + 8, - DCT_stride); - if (coded_block_pattern & (1 << 26)) - slice_non_intra_DCT (decoder, 2, - dest_v + DCT_offset + 8, - DCT_stride); - } - } - - decoder->dc_dct_pred[0] = decoder->dc_dct_pred[1] = - decoder->dc_dct_pred[2] = 16384; - } - - NEXT_MACROBLOCK; - - NEEDBITS (bit_buf, bits, bit_ptr); - mba_inc = 0; - while (1) { - if (bit_buf >= 0x10000000) { - mba = MBA_5 + (UBITS (bit_buf, 5) - 2); - break; - } else if (bit_buf >= 0x03000000) { - mba = MBA_11 + (UBITS (bit_buf, 11) - 24); - break; - } else switch (UBITS (bit_buf, 11)) { - case 8: /* macroblock_escape */ - mba_inc += 33; - /* pass through */ - case 15: /* macroblock_stuffing (MPEG1 only) */ - DUMPBITS (bit_buf, bits, 11); - NEEDBITS (bit_buf, bits, bit_ptr); - continue; - default: /* end of slice, or error */ - if (mpeg2_cpu_state_restore) - mpeg2_cpu_state_restore (&cpu_state); - return; - } - } - DUMPBITS (bit_buf, bits, mba->len); - mba_inc += mba->mba; - - if (mba_inc) { - decoder->dc_dct_pred[0] = decoder->dc_dct_pred[1] = - decoder->dc_dct_pred[2] = 16384; - - if (decoder->coding_type == P_TYPE) { - do { - MOTION_CALL (decoder->motion_parser[0], - MACROBLOCK_MOTION_FORWARD); - NEXT_MACROBLOCK; - } while (--mba_inc); - } else { - do { - MOTION_CALL (decoder->motion_parser[4], macroblock_modes); - NEXT_MACROBLOCK; - } while (--mba_inc); - } - } - } -#undef bit_buf -#undef bits -#undef bit_ptr -} diff -Nru k9copy-2.1.0/src/mpeg2/tendra.h k9copy-2.2.0/src/mpeg2/tendra.h --- k9copy-2.1.0/src/mpeg2/tendra.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/tendra.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -/* - * tendra.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#pragma TenDRA begin -#pragma TenDRA longlong type warning - -#ifdef TenDRA_check - -#pragma TenDRA conversion analysis (pointer-int explicit) off -#pragma TenDRA implicit function declaration off - -/* avoid the "No declarations in translation unit" problem */ -int TenDRA; - -#endif /* TenDRA_check */ diff -Nru k9copy-2.1.0/src/mpeg2/uyvy.cpp k9copy-2.2.0/src/mpeg2/uyvy.cpp --- k9copy-2.1.0/src/mpeg2/uyvy.cpp 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/uyvy.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,127 +0,0 @@ -/* - * uyvy.c - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 2003 Regis Duchesne - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include "k9common.h" - -#include "mpeg2.h" -#include "mpeg2convert.h" - -typedef struct { - int width; - int stride; - int chroma420; - uint8_t * out; -} convert_uyvy_t; - -static void uyvy_start (void * _id, const mpeg2_fbuf_t * fbuf, - const mpeg2_picture_t * picture, - const mpeg2_gop_t * gop) -{ - convert_uyvy_t * instance = (convert_uyvy_t *) _id; - - instance->out = fbuf->buf[0]; - instance->stride = instance->width; - if (picture->nb_fields == 1) { - if (! (picture->flags & PIC_FLAG_TOP_FIELD_FIRST)) - instance->out += 2 * instance->stride; - instance->stride <<= 1; - } -} - -#ifdef WORDS_BIGENDIAN -#define PACK(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) -#else -#define PACK(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) -#endif - -static void uyvy_line (uint8_t * py, uint8_t * pu, uint8_t * pv, void * _dst, - int width) -{ - uint32_t * dst = (uint32_t *) _dst; - - width >>= 4; - do { - dst[0] = PACK (pu[0], py[0], pv[0], py[1]); - dst[1] = PACK (pu[1], py[2], pv[1], py[3]); - dst[2] = PACK (pu[2], py[4], pv[2], py[5]); - dst[3] = PACK (pu[3], py[6], pv[3], py[7]); - dst[4] = PACK (pu[4], py[8], pv[4], py[9]); - dst[5] = PACK (pu[5], py[10], pv[5], py[11]); - dst[6] = PACK (pu[6], py[12], pv[6], py[13]); - dst[7] = PACK (pu[7], py[14], pv[7], py[15]); - py += 16; - pu += 8; - pv += 8; - dst += 8; - } while (--width); -} - -static void uyvy_copy (void * id, uint8_t * const * src, unsigned int v_offset) -{ - const convert_uyvy_t * instance = (convert_uyvy_t *) id; - uint8_t * py; - uint8_t * pu; - uint8_t * pv; - uint8_t * dst; - int height; - - dst = instance->out + 2 * instance->stride * v_offset; - py = src[0]; pu = src[1]; pv = src[2]; - - height = 16; - do { - uyvy_line (py, pu, pv, dst, instance->width); - dst += 2 * instance->stride; - py += instance->stride; - if (! (--height & instance->chroma420)) { - pu += instance->stride >> 1; - pv += instance->stride >> 1; - } - } while (height); -} - -int mpeg2convert_uyvy (int stage, void * _id, const mpeg2_sequence_t * seq, - int stride, uint32_t accel, void * arg, - mpeg2_convert_init_t * result) -{ - convert_uyvy_t * instance = (convert_uyvy_t *) _id; - - if (seq->chroma_width == seq->width) - return 1; - - if (instance) { - instance->width = seq->width; - instance->chroma420 = (seq->chroma_height < seq->height); - result->buf_size[0] = seq->width * seq->height * 2; - result->buf_size[1] = result->buf_size[2] = 0; - result->start = uyvy_start; - result->copy = uyvy_copy; - } else { - result->id_size = sizeof (convert_uyvy_t); - } - - return 0; -} diff -Nru k9copy-2.1.0/src/mpeg2/video_out.h k9copy-2.2.0/src/mpeg2/video_out.h --- k9copy-2.1.0/src/mpeg2/video_out.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/video_out.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ -/* - * video_out.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -struct mpeg2_sequence_s; -struct mpeg2_convert_init_s; -typedef struct { - int (* convert) (int stage, void * id, - const struct mpeg2_sequence_s * sequence, - int stride, uint32_t accel, void * arg, - struct mpeg2_convert_init_s * result); -} vo_setup_result_t; - -typedef struct vo_instance_s vo_instance_t; -struct vo_instance_s { - int (* setup) (vo_instance_t * instance, unsigned int width, - unsigned int height, unsigned int chroma_width, - unsigned int chroma_height, vo_setup_result_t * result); - void (* setup_fbuf) (vo_instance_t * instance, uint8_t ** buf, void ** id); - void (* set_fbuf) (vo_instance_t * instance, uint8_t ** buf, void ** id); - void (* start_fbuf) (vo_instance_t * instance, - uint8_t * const * buf, void * id); - void (* draw) (vo_instance_t * instance, uint8_t * const * buf, void * id); - void (* discard) (vo_instance_t * instance, - uint8_t * const * buf, void * id); - void (* close) (vo_instance_t * instance); -}; - -typedef vo_instance_t * vo_open_t (void); - -typedef struct { - char * name; - vo_open_t * open; -} vo_driver_t; - -void vo_accel (uint32_t accel); - -/* return NULL terminated array of all drivers */ -vo_driver_t const * vo_drivers (void); diff -Nru k9copy-2.1.0/src/mpeg2/vis.h k9copy-2.2.0/src/mpeg2/vis.h --- k9copy-2.1.0/src/mpeg2/vis.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/vis.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,328 +0,0 @@ -/* - * vis.h - * Copyright (C) 2003 David S. Miller - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* You may be asking why I hard-code the instruction opcodes and don't - * use the normal VIS assembler mnenomics for the VIS instructions. - * - * The reason is that Sun, in their infinite wisdom, decided that a binary - * using a VIS instruction will cause it to be marked (in the ELF headers) - * as doing so, and this prevents the OS from loading such binaries if the - * current cpu doesn't have VIS. There is no way to easily override this - * behavior of the assembler that I am aware of. - * - * This totally defeats what libmpeg2 is trying to do which is allow a - * single binary to be created, and then detect the availability of VIS - * at runtime. - * - * I'm not saying that tainting the binary by default is bad, rather I'm - * saying that not providing a way to override this easily unnecessarily - * ties people's hands. - * - * Thus, we do the opcode encoding by hand and output 32-bit words in - * the assembler to keep the binary from becoming tainted. - */ - -#define vis_opc_base ((0x1 << 31) | (0x36 << 19)) -#define vis_opf(X) ((X) << 5) -#define vis_sreg(X) (X) -#define vis_dreg(X) (((X)&0x1f)|((X)>>5)) -#define vis_rs1_s(X) (vis_sreg(X) << 14) -#define vis_rs1_d(X) (vis_dreg(X) << 14) -#define vis_rs2_s(X) (vis_sreg(X) << 0) -#define vis_rs2_d(X) (vis_dreg(X) << 0) -#define vis_rd_s(X) (vis_sreg(X) << 25) -#define vis_rd_d(X) (vis_dreg(X) << 25) - -#define vis_ss2s(opf,rs1,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_s(rs1) | \ - vis_rs2_s(rs2) | \ - vis_rd_s(rd))) - -#define vis_dd2d(opf,rs1,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_d(rs1) | \ - vis_rs2_d(rs2) | \ - vis_rd_d(rd))) - -#define vis_ss2d(opf,rs1,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_s(rs1) | \ - vis_rs2_s(rs2) | \ - vis_rd_d(rd))) - -#define vis_sd2d(opf,rs1,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_s(rs1) | \ - vis_rs2_d(rs2) | \ - vis_rd_d(rd))) - -#define vis_d2s(opf,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs2_d(rs2) | \ - vis_rd_s(rd))) - -#define vis_s2d(opf,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs2_s(rs2) | \ - vis_rd_d(rd))) - -#define vis_d12d(opf,rs1,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_d(rs1) | \ - vis_rd_d(rd))) - -#define vis_d22d(opf,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs2_d(rs2) | \ - vis_rd_d(rd))) - -#define vis_s12s(opf,rs1,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs1_s(rs1) | \ - vis_rd_s(rd))) - -#define vis_s22s(opf,rs2,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rs2_s(rs2) | \ - vis_rd_s(rd))) - -#define vis_s(opf,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rd_s(rd))) - -#define vis_d(opf,rd) \ - __asm__ __volatile__ (".word %0" \ - : : "i" (vis_opc_base | vis_opf(opf) | \ - vis_rd_d(rd))) - -#define vis_r2m(op,rd,mem) \ - __asm__ __volatile__ (#op "\t%%f" #rd ", [%0]" : : "r" (&(mem)) ) - -#define vis_r2m_2(op,rd,mem1,mem2) \ - __asm__ __volatile__ (#op "\t%%f" #rd ", [%0 + %1]" : : "r" (mem1), "r" (mem2) ) - -#define vis_m2r(op,mem,rd) \ - __asm__ __volatile__ (#op "\t[%0], %%f" #rd : : "r" (&(mem)) ) - -#define vis_m2r_2(op,mem1,mem2,rd) \ - __asm__ __volatile__ (#op "\t[%0 + %1], %%f" #rd : : "r" (mem1), "r" (mem2) ) - -static inline void vis_set_gsr(unsigned int _val) -{ - register unsigned int val asm("g1"); - - val = _val; - __asm__ __volatile__(".word 0xa7804000" - : : "r" (val)); -} - -#define VIS_GSR_ALIGNADDR_MASK 0x0000007 -#define VIS_GSR_ALIGNADDR_SHIFT 0 -#define VIS_GSR_SCALEFACT_MASK 0x0000078 -#define VIS_GSR_SCALEFACT_SHIFT 3 - -#define vis_ld32(mem,rs1) vis_m2r(ld, mem, rs1) -#define vis_ld32_2(mem1,mem2,rs1) vis_m2r_2(ld, mem1, mem2, rs1) -#define vis_st32(rs1,mem) vis_r2m(st, rs1, mem) -#define vis_st32_2(rs1,mem1,mem2) vis_r2m_2(st, rs1, mem1, mem2) -#define vis_ld64(mem,rs1) vis_m2r(ldd, mem, rs1) -#define vis_ld64_2(mem1,mem2,rs1) vis_m2r_2(ldd, mem1, mem2, rs1) -#define vis_st64(rs1,mem) vis_r2m(std, rs1, mem) -#define vis_st64_2(rs1,mem1,mem2) vis_r2m_2(std, rs1, mem1, mem2) - -#define vis_ldblk(mem, rd) \ -do { register void *__mem asm("g1"); \ - __mem = &(mem); \ - __asm__ __volatile__(".word 0xc1985e00 | %1" \ - : \ - : "r" (__mem), \ - "i" (vis_rd_d(rd)) \ - : "memory"); \ -} while (0) - -#define vis_stblk(rd, mem) \ -do { register void *__mem asm("g1"); \ - __mem = &(mem); \ - __asm__ __volatile__(".word 0xc1b85e00 | %1" \ - : \ - : "r" (__mem), \ - "i" (vis_rd_d(rd)) \ - : "memory"); \ -} while (0) - -#define vis_membar_storestore() \ - __asm__ __volatile__(".word 0x8143e008" : : : "memory") - -#define vis_membar_sync() \ - __asm__ __volatile__(".word 0x8143e040" : : : "memory") - -/* 16 and 32 bit partitioned addition and subtraction. The normal - * versions perform 4 16-bit or 2 32-bit additions or subtractions. - * The 's' versions perform 2 16-bit or 2 32-bit additions or - * subtractions. - */ - -#define vis_padd16(rs1,rs2,rd) vis_dd2d(0x50, rs1, rs2, rd) -#define vis_padd16s(rs1,rs2,rd) vis_ss2s(0x51, rs1, rs2, rd) -#define vis_padd32(rs1,rs2,rd) vis_dd2d(0x52, rs1, rs2, rd) -#define vis_padd32s(rs1,rs2,rd) vis_ss2s(0x53, rs1, rs2, rd) -#define vis_psub16(rs1,rs2,rd) vis_dd2d(0x54, rs1, rs2, rd) -#define vis_psub16s(rs1,rs2,rd) vis_ss2s(0x55, rs1, rs2, rd) -#define vis_psub32(rs1,rs2,rd) vis_dd2d(0x56, rs1, rs2, rd) -#define vis_psub32s(rs1,rs2,rd) vis_ss2s(0x57, rs1, rs2, rd) - -/* Pixel formatting instructions. */ - -#define vis_pack16(rs2,rd) vis_d2s( 0x3b, rs2, rd) -#define vis_pack32(rs1,rs2,rd) vis_dd2d(0x3a, rs1, rs2, rd) -#define vis_packfix(rs2,rd) vis_d2s( 0x3d, rs2, rd) -#define vis_expand(rs2,rd) vis_s2d( 0x4d, rs2, rd) -#define vis_pmerge(rs1,rs2,rd) vis_ss2d(0x4b, rs1, rs2, rd) - -/* Partitioned multiply instructions. */ - -#define vis_mul8x16(rs1,rs2,rd) vis_sd2d(0x31, rs1, rs2, rd) -#define vis_mul8x16au(rs1,rs2,rd) vis_ss2d(0x33, rs1, rs2, rd) -#define vis_mul8x16al(rs1,rs2,rd) vis_ss2d(0x35, rs1, rs2, rd) -#define vis_mul8sux16(rs1,rs2,rd) vis_dd2d(0x36, rs1, rs2, rd) -#define vis_mul8ulx16(rs1,rs2,rd) vis_dd2d(0x37, rs1, rs2, rd) -#define vis_muld8sux16(rs1,rs2,rd) vis_ss2d(0x38, rs1, rs2, rd) -#define vis_muld8ulx16(rs1,rs2,rd) vis_ss2d(0x39, rs1, rs2, rd) - -/* Alignment instructions. */ - -static inline void *vis_alignaddr(void *_ptr) -{ - register void *ptr asm("g1"); - - ptr = _ptr; - - __asm__ __volatile__(".word %2" - : "=&r" (ptr) - : "0" (ptr), - "i" (vis_opc_base | vis_opf(0x18) | - vis_rs1_s(1) | - vis_rs2_s(0) | - vis_rd_s(1))); - - return ptr; -} - -static inline void vis_alignaddr_g0(void *_ptr) -{ - register void *ptr asm("g1"); - - ptr = _ptr; - - __asm__ __volatile__(".word %2" - : "=&r" (ptr) - : "0" (ptr), - "i" (vis_opc_base | vis_opf(0x18) | - vis_rs1_s(1) | - vis_rs2_s(0) | - vis_rd_s(0))); -} - -static inline void *vis_alignaddrl(void *_ptr) -{ - register void *ptr asm("g1"); - - ptr = _ptr; - - __asm__ __volatile__(".word %2" - : "=&r" (ptr) - : "0" (ptr), - "i" (vis_opc_base | vis_opf(0x19) | - vis_rs1_s(1) | - vis_rs2_s(0) | - vis_rd_s(1))); - - return ptr; -} - -static inline void vis_alignaddrl_g0(void *_ptr) -{ - register void *ptr asm("g1"); - - ptr = _ptr; - - __asm__ __volatile__(".word %2" - : "=&r" (ptr) - : "0" (ptr), - "i" (vis_opc_base | vis_opf(0x19) | - vis_rs1_s(1) | - vis_rs2_s(0) | - vis_rd_s(0))); -} - -#define vis_faligndata(rs1,rs2,rd) vis_dd2d(0x48, rs1, rs2, rd) - -/* Logical operate instructions. */ - -#define vis_fzero(rd) vis_d( 0x60, rd) -#define vis_fzeros(rd) vis_s( 0x61, rd) -#define vis_fone(rd) vis_d( 0x7e, rd) -#define vis_fones(rd) vis_s( 0x7f, rd) -#define vis_src1(rs1,rd) vis_d12d(0x74, rs1, rd) -#define vis_src1s(rs1,rd) vis_s12s(0x75, rs1, rd) -#define vis_src2(rs2,rd) vis_d22d(0x78, rs2, rd) -#define vis_src2s(rs2,rd) vis_s22s(0x79, rs2, rd) -#define vis_not1(rs1,rd) vis_d12d(0x6a, rs1, rd) -#define vis_not1s(rs1,rd) vis_s12s(0x6b, rs1, rd) -#define vis_not2(rs2,rd) vis_d22d(0x66, rs2, rd) -#define vis_not2s(rs2,rd) vis_s22s(0x67, rs2, rd) -#define vis_or(rs1,rs2,rd) vis_dd2d(0x7c, rs1, rs2, rd) -#define vis_ors(rs1,rs2,rd) vis_ss2s(0x7d, rs1, rs2, rd) -#define vis_nor(rs1,rs2,rd) vis_dd2d(0x62, rs1, rs2, rd) -#define vis_nors(rs1,rs2,rd) vis_ss2s(0x63, rs1, rs2, rd) -#define vis_and(rs1,rs2,rd) vis_dd2d(0x70, rs1, rs2, rd) -#define vis_ands(rs1,rs2,rd) vis_ss2s(0x71, rs1, rs2, rd) -#define vis_nand(rs1,rs2,rd) vis_dd2d(0x6e, rs1, rs2, rd) -#define vis_nands(rs1,rs2,rd) vis_ss2s(0x6f, rs1, rs2, rd) -#define vis_xor(rs1,rs2,rd) vis_dd2d(0x6c, rs1, rs2, rd) -#define vis_xors(rs1,rs2,rd) vis_ss2s(0x6d, rs1, rs2, rd) -#define vis_xnor(rs1,rs2,rd) vis_dd2d(0x72, rs1, rs2, rd) -#define vis_xnors(rs1,rs2,rd) vis_ss2s(0x73, rs1, rs2, rd) -#define vis_ornot1(rs1,rs2,rd) vis_dd2d(0x7a, rs1, rs2, rd) -#define vis_ornot1s(rs1,rs2,rd) vis_ss2s(0x7b, rs1, rs2, rd) -#define vis_ornot2(rs1,rs2,rd) vis_dd2d(0x76, rs1, rs2, rd) -#define vis_ornot2s(rs1,rs2,rd) vis_ss2s(0x77, rs1, rs2, rd) -#define vis_andnot1(rs1,rs2,rd) vis_dd2d(0x68, rs1, rs2, rd) -#define vis_andnot1s(rs1,rs2,rd) vis_ss2s(0x69, rs1, rs2, rd) -#define vis_andnot2(rs1,rs2,rd) vis_dd2d(0x64, rs1, rs2, rd) -#define vis_andnot2s(rs1,rs2,rd) vis_ss2s(0x65, rs1, rs2, rd) - -/* Pixel component distance. */ - -#define vis_pdist(rs1,rs2,rd) vis_dd2d(0x3e, rs1, rs2, rd) diff -Nru k9copy-2.1.0/src/mpeg2/vlc.h k9copy-2.2.0/src/mpeg2/vlc.h --- k9copy-2.1.0/src/mpeg2/vlc.h 2008-10-27 18:33:04.000000000 +0100 +++ k9copy-2.2.0/src/mpeg2/vlc.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,429 +0,0 @@ -/* - * vlc.h - * Copyright (C) 2000-2003 Michel Lespinasse - * Copyright (C) 1999-2000 Aaron Holtzman - * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * See http://libmpeg2.sourceforge.net/ for updates. - * - * mpeg2dec is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpeg2dec is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define GETWORD(bit_buf,shift,bit_ptr) \ -do { \ - bit_buf |= ((bit_ptr[0] << 8) | bit_ptr[1]) << (shift); \ - bit_ptr += 2; \ -} while (0) - -static inline void bitstream_init (mpeg2_decoder_t * decoder, - const uint8_t * start) -{ - decoder->bitstream_buf = - (start[0] << 24) | (start[1] << 16) | (start[2] << 8) | start[3]; - decoder->bitstream_ptr = start + 4; - decoder->bitstream_bits = -16; -} - -/* make sure that there are at least 16 valid bits in bit_buf */ -#define NEEDBITS(bit_buf,bits,bit_ptr) \ -do { \ - if (unlikely (bits > 0)) { \ - GETWORD (bit_buf, bits, bit_ptr); \ - bits -= 16; \ - } \ -} while (0) - -/* remove num valid bits from bit_buf */ -#define DUMPBITS(bit_buf,bits,num) \ -do { \ - bit_buf <<= (num); \ - bits += (num); \ -} while (0) - -/* take num bits from the high part of bit_buf and zero extend them */ -#define UBITS(bit_buf,num) (((uint32_t)(bit_buf)) >> (32 - (num))) - -/* take num bits from the high part of bit_buf and sign extend them */ -#define SBITS(bit_buf,num) (((int32_t)(bit_buf)) >> (32 - (num))) - -typedef struct { - uint8_t modes; - uint8_t len; -} MBtab; - -typedef struct { - uint8_t delta; - uint8_t len; -} MVtab; - -typedef struct { - int8_t dmv; - uint8_t len; -} DMVtab; - -typedef struct { - uint8_t cbp; - uint8_t len; -} CBPtab; - -typedef struct { - uint8_t size; - uint8_t len; -} DCtab; - -typedef struct { - uint8_t run; - uint8_t level; - uint8_t len; -} DCTtab; - -typedef struct { - uint8_t mba; - uint8_t len; -} MBAtab; - - -#define INTRA MACROBLOCK_INTRA -#define QUANT MACROBLOCK_QUANT - -static const MBtab MB_I [] = { - {INTRA|QUANT, 2}, {INTRA, 1} -}; - -#define MC MACROBLOCK_MOTION_FORWARD -#define CODED MACROBLOCK_PATTERN - -static const MBtab MB_P [] = { - {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5}, - {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3}, - {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, - {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2}, - {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, - {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, - {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, - {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1} -}; - -#define FWD MACROBLOCK_MOTION_FORWARD -#define BWD MACROBLOCK_MOTION_BACKWARD -#define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD - -static const MBtab MB_B [] = { - {0, 0}, {INTRA|QUANT, 6}, - {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6}, - {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5}, - {INTRA, 5}, {INTRA, 5}, - {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4}, - {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, - {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, - {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3}, - {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, - {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, - {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2}, - {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2}, - {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2}, - {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2}, - {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, - {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, - {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, - {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2} -}; - -#undef INTRA -#undef QUANT -#undef MC -#undef CODED -#undef FWD -#undef BWD -#undef INTER - - -static const MVtab MV_4 [] = { - { 3, 6}, { 2, 4}, { 1, 3}, { 1, 3}, { 0, 2}, { 0, 2}, { 0, 2}, { 0, 2} -}; - -static const MVtab MV_10 [] = { - { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, - { 0,10}, { 0,10}, { 0,10}, { 0,10}, {15,10}, {14,10}, {13,10}, {12,10}, - {11,10}, {10,10}, { 9, 9}, { 9, 9}, { 8, 9}, { 8, 9}, { 7, 9}, { 7, 9}, - { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, - { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, - { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7} -}; - - -static const DMVtab DMV_2 [] = { - { 0, 1}, { 0, 1}, { 1, 2}, {-1, 2} -}; - - -static const CBPtab CBP_7 [] = { - {0x11, 7}, {0x12, 7}, {0x14, 7}, {0x18, 7}, - {0x21, 7}, {0x22, 7}, {0x24, 7}, {0x28, 7}, - {0x3f, 6}, {0x3f, 6}, {0x30, 6}, {0x30, 6}, - {0x09, 6}, {0x09, 6}, {0x06, 6}, {0x06, 6}, - {0x1f, 5}, {0x1f, 5}, {0x1f, 5}, {0x1f, 5}, - {0x10, 5}, {0x10, 5}, {0x10, 5}, {0x10, 5}, - {0x2f, 5}, {0x2f, 5}, {0x2f, 5}, {0x2f, 5}, - {0x20, 5}, {0x20, 5}, {0x20, 5}, {0x20, 5}, - {0x07, 5}, {0x07, 5}, {0x07, 5}, {0x07, 5}, - {0x0b, 5}, {0x0b, 5}, {0x0b, 5}, {0x0b, 5}, - {0x0d, 5}, {0x0d, 5}, {0x0d, 5}, {0x0d, 5}, - {0x0e, 5}, {0x0e, 5}, {0x0e, 5}, {0x0e, 5}, - {0x05, 5}, {0x05, 5}, {0x05, 5}, {0x05, 5}, - {0x0a, 5}, {0x0a, 5}, {0x0a, 5}, {0x0a, 5}, - {0x03, 5}, {0x03, 5}, {0x03, 5}, {0x03, 5}, - {0x0c, 5}, {0x0c, 5}, {0x0c, 5}, {0x0c, 5}, - {0x01, 4}, {0x01, 4}, {0x01, 4}, {0x01, 4}, - {0x01, 4}, {0x01, 4}, {0x01, 4}, {0x01, 4}, - {0x02, 4}, {0x02, 4}, {0x02, 4}, {0x02, 4}, - {0x02, 4}, {0x02, 4}, {0x02, 4}, {0x02, 4}, - {0x04, 4}, {0x04, 4}, {0x04, 4}, {0x04, 4}, - {0x04, 4}, {0x04, 4}, {0x04, 4}, {0x04, 4}, - {0x08, 4}, {0x08, 4}, {0x08, 4}, {0x08, 4}, - {0x08, 4}, {0x08, 4}, {0x08, 4}, {0x08, 4}, - {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, - {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, - {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, - {0x0f, 3}, {0x0f, 3}, {0x0f, 3}, {0x0f, 3} -}; - -static const CBPtab CBP_9 [] = { - {0, 0}, {0x00, 9}, {0x39, 9}, {0x36, 9}, - {0x37, 9}, {0x3b, 9}, {0x3d, 9}, {0x3e, 9}, - {0x17, 8}, {0x17, 8}, {0x1b, 8}, {0x1b, 8}, - {0x1d, 8}, {0x1d, 8}, {0x1e, 8}, {0x1e, 8}, - {0x27, 8}, {0x27, 8}, {0x2b, 8}, {0x2b, 8}, - {0x2d, 8}, {0x2d, 8}, {0x2e, 8}, {0x2e, 8}, - {0x19, 8}, {0x19, 8}, {0x16, 8}, {0x16, 8}, - {0x29, 8}, {0x29, 8}, {0x26, 8}, {0x26, 8}, - {0x35, 8}, {0x35, 8}, {0x3a, 8}, {0x3a, 8}, - {0x33, 8}, {0x33, 8}, {0x3c, 8}, {0x3c, 8}, - {0x15, 8}, {0x15, 8}, {0x1a, 8}, {0x1a, 8}, - {0x13, 8}, {0x13, 8}, {0x1c, 8}, {0x1c, 8}, - {0x25, 8}, {0x25, 8}, {0x2a, 8}, {0x2a, 8}, - {0x23, 8}, {0x23, 8}, {0x2c, 8}, {0x2c, 8}, - {0x31, 8}, {0x31, 8}, {0x32, 8}, {0x32, 8}, - {0x34, 8}, {0x34, 8}, {0x38, 8}, {0x38, 8} -}; - - -static const DCtab DC_lum_5 [] = { - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {0, 3}, {0, 3}, {0, 3}, {0, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}, - {4, 3}, {4, 3}, {4, 3}, {4, 3}, {5, 4}, {5, 4}, {6, 5} -}; - -static const DCtab DC_chrom_5 [] = { - {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, - {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, - {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, - {3, 3}, {3, 3}, {3, 3}, {3, 3}, {4, 4}, {4, 4}, {5, 5} -}; - -static const DCtab DC_long [] = { - {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5}, - {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5}, - {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, { 7, 6}, { 7, 6}, - {8, 7}, {8, 7}, {8, 7}, {8, 7}, {9, 8}, {9, 8}, {10, 9}, {11, 9} -}; - - -static const DCTtab DCT_16 [] = { - {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, - {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, - {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, - {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, - { 2,18, 0}, { 2,17, 0}, { 2,16, 0}, { 2,15, 0}, - { 7, 3, 0}, { 17, 2, 0}, { 16, 2, 0}, { 15, 2, 0}, - { 14, 2, 0}, { 13, 2, 0}, { 12, 2, 0}, { 32, 1, 0}, - { 31, 1, 0}, { 30, 1, 0}, { 29, 1, 0}, { 28, 1, 0} -}; - -static const DCTtab DCT_15 [] = { - { 1,40,15}, { 1,39,15}, { 1,38,15}, { 1,37,15}, - { 1,36,15}, { 1,35,15}, { 1,34,15}, { 1,33,15}, - { 1,32,15}, { 2,14,15}, { 2,13,15}, { 2,12,15}, - { 2,11,15}, { 2,10,15}, { 2, 9,15}, { 2, 8,15}, - { 1,31,14}, { 1,31,14}, { 1,30,14}, { 1,30,14}, - { 1,29,14}, { 1,29,14}, { 1,28,14}, { 1,28,14}, - { 1,27,14}, { 1,27,14}, { 1,26,14}, { 1,26,14}, - { 1,25,14}, { 1,25,14}, { 1,24,14}, { 1,24,14}, - { 1,23,14}, { 1,23,14}, { 1,22,14}, { 1,22,14}, - { 1,21,14}, { 1,21,14}, { 1,20,14}, { 1,20,14}, - { 1,19,14}, { 1,19,14}, { 1,18,14}, { 1,18,14}, - { 1,17,14}, { 1,17,14}, { 1,16,14}, { 1,16,14} -}; - -static const DCTtab DCT_13 [] = { - { 11, 2,13}, { 10, 2,13}, { 6, 3,13}, { 4, 4,13}, - { 3, 5,13}, { 2, 7,13}, { 2, 6,13}, { 1,15,13}, - { 1,14,13}, { 1,13,13}, { 1,12,13}, { 27, 1,13}, - { 26, 1,13}, { 25, 1,13}, { 24, 1,13}, { 23, 1,13}, - { 1,11,12}, { 1,11,12}, { 9, 2,12}, { 9, 2,12}, - { 5, 3,12}, { 5, 3,12}, { 1,10,12}, { 1,10,12}, - { 3, 4,12}, { 3, 4,12}, { 8, 2,12}, { 8, 2,12}, - { 22, 1,12}, { 22, 1,12}, { 21, 1,12}, { 21, 1,12}, - { 1, 9,12}, { 1, 9,12}, { 20, 1,12}, { 20, 1,12}, - { 19, 1,12}, { 19, 1,12}, { 2, 5,12}, { 2, 5,12}, - { 4, 3,12}, { 4, 3,12}, { 1, 8,12}, { 1, 8,12}, - { 7, 2,12}, { 7, 2,12}, { 18, 1,12}, { 18, 1,12} -}; - -static const DCTtab DCT_B14_10 [] = { - { 17, 1,10}, { 6, 2,10}, { 1, 7,10}, { 3, 3,10}, - { 2, 4,10}, { 16, 1,10}, { 15, 1,10}, { 5, 2,10} -}; - -static const DCTtab DCT_B14_8 [] = { - { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, - { 3, 2, 7}, { 3, 2, 7}, { 10, 1, 7}, { 10, 1, 7}, - { 1, 4, 7}, { 1, 4, 7}, { 9, 1, 7}, { 9, 1, 7}, - { 8, 1, 6}, { 8, 1, 6}, { 8, 1, 6}, { 8, 1, 6}, - { 7, 1, 6}, { 7, 1, 6}, { 7, 1, 6}, { 7, 1, 6}, - { 2, 2, 6}, { 2, 2, 6}, { 2, 2, 6}, { 2, 2, 6}, - { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, - { 14, 1, 8}, { 1, 6, 8}, { 13, 1, 8}, { 12, 1, 8}, - { 4, 2, 8}, { 2, 3, 8}, { 1, 5, 8}, { 11, 1, 8} -}; - -static const DCTtab DCT_B14AC_5 [] = { - { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5}, - { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, - {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2} -}; - -static const DCTtab DCT_B14DC_5 [] = { - { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5}, - { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, - { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, - { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, - { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1} -}; - -static const DCTtab DCT_B15_10 [] = { - { 6, 2, 9}, { 6, 2, 9}, { 15, 1, 9}, { 15, 1, 9}, - { 3, 4,10}, { 17, 1,10}, { 16, 1, 9}, { 16, 1, 9} -}; - -static const DCTtab DCT_B15_8 [] = { - { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, - { 8, 1, 7}, { 8, 1, 7}, { 9, 1, 7}, { 9, 1, 7}, - { 7, 1, 7}, { 7, 1, 7}, { 3, 2, 7}, { 3, 2, 7}, - { 1, 7, 6}, { 1, 7, 6}, { 1, 7, 6}, { 1, 7, 6}, - { 1, 6, 6}, { 1, 6, 6}, { 1, 6, 6}, { 1, 6, 6}, - { 5, 1, 6}, { 5, 1, 6}, { 5, 1, 6}, { 5, 1, 6}, - { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, - { 2, 5, 8}, { 12, 1, 8}, { 1,11, 8}, { 1,10, 8}, - { 14, 1, 8}, { 13, 1, 8}, { 4, 2, 8}, { 2, 4, 8}, - { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, - { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, - { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, - { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, - { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, - { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, - {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, - {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, - {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, - {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, - { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, - { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, - { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, - { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, - { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, - { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, - { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, - { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, - { 10, 1, 7}, { 10, 1, 7}, { 2, 3, 7}, { 2, 3, 7}, - { 11, 1, 7}, { 11, 1, 7}, { 1, 8, 7}, { 1, 8, 7}, - { 1, 9, 7}, { 1, 9, 7}, { 1,12, 8}, { 1,13, 8}, - { 3, 3, 8}, { 5, 2, 8}, { 1,14, 8}, { 1,15, 8} -}; - - -static const MBAtab MBA_5 [] = { - {6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4}, - {2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3}, - {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, - {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1} -}; - -static const MBAtab MBA_11 [] = { - {32, 11}, {31, 11}, {30, 11}, {29, 11}, - {28, 11}, {27, 11}, {26, 11}, {25, 11}, - {24, 11}, {23, 11}, {22, 11}, {21, 11}, - {20, 10}, {20, 10}, {19, 10}, {19, 10}, - {18, 10}, {18, 10}, {17, 10}, {17, 10}, - {16, 10}, {16, 10}, {15, 10}, {15, 10}, - {14, 8}, {14, 8}, {14, 8}, {14, 8}, - {14, 8}, {14, 8}, {14, 8}, {14, 8}, - {13, 8}, {13, 8}, {13, 8}, {13, 8}, - {13, 8}, {13, 8}, {13, 8}, {13, 8}, - {12, 8}, {12, 8}, {12, 8}, {12, 8}, - {12, 8}, {12, 8}, {12, 8}, {12, 8}, - {11, 8}, {11, 8}, {11, 8}, {11, 8}, - {11, 8}, {11, 8}, {11, 8}, {11, 8}, - {10, 8}, {10, 8}, {10, 8}, {10, 8}, - {10, 8}, {10, 8}, {10, 8}, {10, 8}, - { 9, 8}, { 9, 8}, { 9, 8}, { 9, 8}, - { 9, 8}, { 9, 8}, { 9, 8}, { 9, 8}, - { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7}, - { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7}, - { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7}, - { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7}, - { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7}, - { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7}, - { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7}, - { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7} -}; diff -Nru k9copy-2.1.0/src/mplayer/cmake_install.cmake k9copy-2.2.0/src/mplayer/cmake_install.cmake --- k9copy-2.1.0/src/mplayer/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/mplayer/k9internalplayer.h k9copy-2.2.0/src/mplayer/k9internalplayer.h --- k9copy-2.1.0/src/mplayer/k9internalplayer.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9internalplayer.h 2009-02-19 22:30:17.000000000 +0100 @@ -16,8 +16,15 @@ class QImage; class k9InternalPlayer { public: - virtual void drawPpm(uchar *_buf,int _width,int _height,int _len){}; - virtual void drawPixmap( QImage *image){}; + virtual void drawPpm(uchar *_buf,int _width,int _height,int _len){ + Q_UNUSED(_buf); + Q_UNUSED(_width); + Q_UNUSED(_height); + Q_UNUSED(_len); + }; + virtual void drawImage( QImage *image){ + Q_UNUSED(image); + }; }; diff -Nru k9copy-2.1.0/src/mplayer/k9mplayer.cpp k9copy-2.2.0/src/mplayer/k9mplayer.cpp --- k9copy-2.1.0/src/mplayer/k9mplayer.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9mplayer.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -47,7 +47,7 @@ } -void K9Mplayer::resizeEvent ( QResizeEvent * _resizeEvent) { +void K9Mplayer::resizeEvent ( QResizeEvent * ) { int w,h; w=Ui_mplayer.Label->width(); h=Ui_mplayer.Label->width() /m_ratio; @@ -61,7 +61,7 @@ } -void K9Mplayer::wroteStdin( KProcess *_process) { +void K9Mplayer::wroteStdin( KProcess *) { m_canwrite = TRUE; } @@ -76,39 +76,8 @@ void K9Mplayer::setTitle( const QString & _numTitle,const QString &_numChapter) { - if (m_process->isRunning()) { - sendCmd("quit"); - m_process->waitForFinished( 1000); - } - k9Config config; - QString vout[]= {"x11","xv","gl2","sdl"}; - QString aout[]= {"alsa","oss","sdl"}; - QString vo=vout[config.getMplayerVout()]; - QString ao=aout[config.getMplayerAout()]; - - - m_process->clearProgram(); - - *m_process << "mplayer"; - *m_process << "-vo" << vo << "-ao" << ao << "-sws" << "0"; - *m_process << "-framedrop"; - *m_process << "-wid" << QString::number(m_container->winId()) ; - *m_process << "-slave" ; - *m_process << "-idle"; - *m_process << "-dvd-device" << m_device; - if (_numChapter !="") - *m_process << "-chapter" << _numChapter; - - *m_process << QString("dvd://%1").arg(_numTitle); - - if (!m_process->start()) { - k9Dialogs::error (i18n("Unable to run %1","mplayer") , i18n("Preview")); - } - - m_canwrite=TRUE; - - m_position=0; - Ui_mplayer.slider->setValue(m_position); + m_title=_numTitle.toInt();; + m_chapter=_numChapter.toInt(); } @@ -116,7 +85,7 @@ /*$SPECIALIZATION$*/ -void K9Mplayer::receivedStdout (KProcess *proc, char *buffer, int buflen) { +void K9Mplayer::receivedStdout (KProcess *, char *buffer, int buflen) { QString buf = QString::fromLatin1(buffer, buflen); sscanf(buf.toUtf8(),"ANS_PERCENT_POSITION=%d",&m_position); @@ -141,7 +110,7 @@ void K9Mplayer::slotLengthChanged() {} -void K9Mplayer::slotNewPosition(int _pos,const QTime & _time) { +void K9Mplayer::slotNewPosition(int _pos,const QTime & ) { Ui_mplayer.slider->setValue(_pos); } @@ -151,7 +120,7 @@ m_seeking=FALSE; } -void K9Mplayer::sliderChanged( int _value) {} +void K9Mplayer::sliderChanged( int ) {} void K9Mplayer::sliderPressed() { m_seeking=TRUE; @@ -159,7 +128,40 @@ } void K9Mplayer::bPlayClick() { - setTitle(QString::number( m_title),""); + if (m_process->isRunning()) { + sendCmd("quit"); + m_process->waitForFinished( 1000); + } + k9Config config; + QString vout[]= {"x11","xv","gl2","sdl"}; + QString aout[]= {"alsa","oss","sdl"}; + QString vo=vout[config.getMplayerVout()]; + QString ao=aout[config.getMplayerAout()]; + + + m_process->clearProgram(); + + *m_process << "mplayer"; + *m_process << "-vo" << vo << "-ao" << ao << "-sws" << "0"; + *m_process << "-framedrop"; + *m_process << "-wid" << QString::number(m_container->winId()) ; + *m_process << "-slave" ; + *m_process << "-idle"; + *m_process << "-dvd-device" << m_device; + if (m_chapter !=0) + *m_process << "-chapter" << QString::number( m_chapter); + + *m_process << QString("dvd://%1").arg(m_title); + + if (!m_process->start()) { + k9Dialogs::error (i18n("Unable to run %1","mplayer") , i18n("Preview")); + } + + m_canwrite=TRUE; + + m_position=0; + Ui_mplayer.slider->setValue(m_position); + } void K9Mplayer::bStopClick() { @@ -206,14 +208,16 @@ setDevice( _dvd->getDevice()); m_dvdTitle=_title; m_title=_title->getnumTitle(); - setTitle( QString::number(m_title),QString::number(chapter)); + m_chapter=chapter; +// setTitle( QString::number(m_title),QString::number(chapter)); if (_title->getaudioStreamCount() >0) cbAudioActivated( 0); if (_title->getsubPictureCount() >0) cbSubActivated( 0); if (!m_timer->isActive()) m_timer->start(200); - + if (m_process->isRunning()) + bPlayClick(); } void K9Mplayer::titleChanged() {} @@ -226,7 +230,11 @@ } void K9Mplayer::cbSubActivated( int _value) { - sendCmd(QString("sub_select %1").arg(_value)); + if (m_dvdTitle) { + k9DVDSubtitle *sub=m_dvdTitle->getsubtitle(_value); + sendCmd(QString("sub_select %1").arg(sub->getID().first())); + } + } diff -Nru k9copy-2.1.0/src/mplayer/k9mplayer.h k9copy-2.2.0/src/mplayer/k9mplayer.h --- k9copy-2.1.0/src/mplayer/k9mplayer.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9mplayer.h 2009-02-19 22:30:17.000000000 +0100 @@ -18,6 +18,7 @@ k9Process *m_process; bool m_seeking,m_initVol; int m_title; + int m_chapter; k9DVDTitle *m_dvdTitle; QString m_device; QTimer *m_timer; diff -Nru k9copy-2.1.0/src/mplayer/k9phonon.cpp k9copy-2.2.0/src/mplayer/k9phonon.cpp --- k9copy-2.1.0/src/mplayer/k9phonon.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9phonon.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -54,6 +54,8 @@ connect(Ui_phonon.bStop,SIGNAL(clicked()),this,SLOT(bStopClick())); connect(Ui_phonon.bPlay,SIGNAL(clicked()),this,SLOT(bPlayClick())); m_title=0; + + m_source=NULL; } void k9Phonon::bStopClick() { @@ -65,28 +67,78 @@ } void k9Phonon::stateChanged(Phonon::State newState,Phonon::State oldState) { + Q_UNUSED(oldState); if (m_title!=0 && newState==Phonon::PlayingState) { m_controller->setCurrentTitle(m_title); m_title=0; } } +void k9Phonon::cbSubtitleChanged(int _index) { + if (_index >=0) { + int i=Ui_phonon.cbSubtitle->itemData(_index).toInt(); + Phonon::SubtitleDescription sub=m_controller->availableSubtitles().at(i); + m_controller->setCurrentSubtitle(sub); + } + +} + +void k9Phonon::cbAudioChanged(int _index) { + if (_index >=0) { + int i=Ui_phonon.cbAudio->itemData(_index).toInt(); + Phonon::AudioChannelDescription au=m_controller->availableAudioChannels().at(i); + m_changing=true; + m_controller->setCurrentAudioChannel(au); + } + +} + +void k9Phonon::availableAudioChanged() { + if (m_changing) + return; + Ui_phonon.cbAudio->clear(); + for (int i=0; i< m_controller->availableAudioChannels().count();i++) { + Phonon::AudioChannelDescription aud =m_controller->availableAudioChannels().at(i); + Ui_phonon.cbAudio->addItem(aud.name(),i); + + } + +} + +void k9Phonon::availableSubtitlesChanged() { + Ui_phonon.cbSubtitle->clear(); + for (int i=0; i< m_controller->availableSubtitles().count();i++) { + Phonon::SubtitleDescription sub = m_controller->availableSubtitles().at(i); + Ui_phonon.cbSubtitle->addItem(sub.name(),i); + + } +} + void k9Phonon::open(k9DVD *_dvd,k9DVDTitle *_title,int chapter) { + Q_UNUSED(chapter); + m_changing=false; + if (m_media->state() != Phonon::PlayingState) { - setDevice(_dvd->getDevice()); - - m_source=new Phonon::MediaSource(Phonon::Dvd,m_device); - m_media->setCurrentSource(*m_source); + if (m_device != _dvd->getDevice() && m_source!=NULL) { + delete m_source; + delete m_controller; + m_source=NULL; + } + + if (m_source==NULL) { + setDevice(_dvd->getDevice()); - m_controller=new Phonon::MediaController(m_media); - m_controller->setAutoplayTitles(true); + m_controller=new Phonon::MediaController(m_media); + connect(m_controller,SIGNAL(availableSubtitlesChanged()),this,SLOT(availableSubtitlesChanged())); + connect(m_controller,SIGNAL(availableAudioChannelsChanged()),this,SLOT(availableAudioChanged())); + m_controller->setAutoplayTitles(true); + } m_title=_title->getnumTitle(); - m_media->play(); - - } else + //m_media->play(); + } else { m_controller->setCurrentTitle(_title->getnumTitle()); // m_controller->setCurrentChapter(1); - + } } void k9Phonon::setDevice(const QString & _device){ @@ -99,6 +151,8 @@ k9Phonon::~k9Phonon() { + if (m_media->state() == Phonon::PlayingState) + m_media->stop(); } diff -Nru k9copy-2.1.0/src/mplayer/k9phonon.h k9copy-2.2.0/src/mplayer/k9phonon.h --- k9copy-2.1.0/src/mplayer/k9phonon.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9phonon.h 2009-02-19 22:30:17.000000000 +0100 @@ -49,6 +49,10 @@ virtual void bPlayClick(); virtual void open(k9DVD *_dvd,k9DVDTitle *_title,int chapter); virtual void stateChanged(Phonon::State,Phonon::State); + virtual void availableSubtitlesChanged(); + virtual void availableAudioChanged(); + virtual void cbSubtitleChanged(int); + virtual void cbAudioChanged(int); private: Ui::phonon Ui_phonon; QString m_device; @@ -56,6 +60,7 @@ Phonon::MediaSource *m_source; Phonon::MediaController *m_controller; int m_title; + bool m_changing; }; #endif diff -Nru k9copy-2.1.0/src/mplayer/k9xine.cpp k9copy-2.2.0/src/mplayer/k9xine.cpp --- k9copy-2.1.0/src/mplayer/k9xine.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9xine.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -79,7 +79,7 @@ } -void k9xine::resizeEvent ( QResizeEvent * _resizeEvent) { +void k9xine::resizeEvent ( QResizeEvent * ) { int w,h; w=Ui_mplayer.Label->width(); h=Ui_mplayer.Label->height(); @@ -124,7 +124,7 @@ m_ready=true; } -void k9xine::setTitle( const QString & _numTitle,const QString &_numChapter) { +void k9xine::setTitle( const QString & _numTitle,const QString &) { if (!m_process->isRunning()) { k9Config config; QString vout[]= {"xshm","xv","opengl","sdl"}; @@ -146,15 +146,15 @@ } } - + bool running=m_iface->property("isRunning").toBool(); m_iface->call("stop"); m_iface->setProperty("device",m_device); m_iface->setProperty("mrl",QString("dvd:/%1").arg(_numTitle)); m_iface->setProperty("width",Ui_mplayer.Label->width()); m_iface->setProperty("height",Ui_mplayer.Label->height()); - m_iface->call("play"); - // m_iface->call("play"); + if (running) + m_iface->call("play"); m_position=0; Ui_mplayer.slider->setValue(m_position); } @@ -164,12 +164,12 @@ /*$SPECIALIZATION$*/ -void k9xine::receivedStdout (KProcess *proc, char *buffer, int buflen) { +void k9xine::receivedStdout (KProcess *, char *, int ) { } void k9xine::slotLengthChanged() {} -void k9xine::slotNewPosition(int _pos,const QTime & _time) { +void k9xine::slotNewPosition(int _pos,const QTime & ) { Ui_mplayer.slider->setValue(_pos); } @@ -190,6 +190,15 @@ } void k9xine::bPlayClick() { + setTitle( QString::number(m_title),QString::number(m_chapter)); + if (m_dvdTitle->getaudioStreamCount() >0) + cbAudioActivated( 0); + if (m_dvdTitle->getsubPictureCount() >0) + cbSubActivated( 0); + if (!m_timer->isActive()) + m_timer->start(200); + + if (m_process->isRunning() && m_iface) { m_iface->call("play"); } @@ -228,27 +237,24 @@ for (int i=0; i< _title->getsubPictureCount();i++) { k9DVDSubtitle *sub=_title->getsubtitle(i); - Ui_mplayer.cbSub->addItem(QString("%1-%2").arg(sub->getID().first()).arg(sub->getlanguage()),-1); + //Ui_mplayer.cbSub->addItem(QString("%1-%2").arg(sub->getID().first()).arg(sub->getlanguage()),-1); + Ui_mplayer.cbSub->addItem(QString("%1-%2").arg(i+1).arg(sub->getlanguage()),-1); } setDevice( _dvd->getDevice()); m_dvdTitle=_title; m_title=_title->getnumTitle(); - setTitle( QString::number(m_title),QString::number(chapter)); - if (_title->getaudioStreamCount() >0) - cbAudioActivated( 0); - if (_title->getsubPictureCount() >0) - cbSubActivated( 0); - if (!m_timer->isActive()) - m_timer->start(200); - + m_chapter= chapter; + if (m_iface) + if (m_iface->property("isRunning").toBool()) + bPlayClick(); } void k9xine::titleChanged() {} void k9xine::cbAudioActivated( int _value) { if (m_dvdTitle && m_iface) { - int value=m_dvdTitle->getaudioStream( _value)->getStreamId(); +// int value=m_dvdTitle->getaudioStream( _value)->getStreamId(); m_iface->call("setAudioLang",_value); // sendCmd(QString( "switch_audio %1").arg(value)); } @@ -256,7 +262,10 @@ void k9xine::cbSubActivated( int _value) { // sendCmd(QString("sub_select %1").arg(_value)); - if (m_iface) { - m_iface->call("setSubtitle",_value); + if (m_dvdTitle && m_iface) { + k9DVDSubtitle *sub=m_dvdTitle->getsubtitle(_value); + if (m_iface) { + m_iface->call("setSubtitle",sub->getID().first()); + } } } diff -Nru k9copy-2.1.0/src/mplayer/k9xine.h k9copy-2.2.0/src/mplayer/k9xine.h --- k9copy-2.1.0/src/mplayer/k9xine.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/k9xine.h 2009-02-19 22:30:17.000000000 +0100 @@ -38,6 +38,7 @@ k9Process *m_process; bool m_seeking,m_initVol; int m_title; + int m_chapter; k9DVDTitle *m_dvdTitle; QString m_device; QTimer *m_timer; diff -Nru k9copy-2.1.0/src/mplayer/phonon.ui k9copy-2.2.0/src/mplayer/phonon.ui --- k9copy-2.1.0/src/mplayer/phonon.ui 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/mplayer/phonon.ui 2009-02-19 22:30:17.000000000 +0100 @@ -13,10 +13,10 @@ Form - + - + @@ -58,8 +58,90 @@ + + + + + 0 + 0 + + + + + + + Audio + + + + + + + + + + Subtitles + + + + + + + + + + Qt::Horizontal + + + + 125 + 20 + + + + + + + - + + + cbSubtitle + currentIndexChanged(int) + phonon + cbSubtitleChanged(int) + + + 345 + 27 + + + 199 + 149 + + + + + cbAudio + currentIndexChanged(int) + phonon + cbAudioChanged(int) + + + 86 + 27 + + + 199 + 149 + + + + + + cbSubtitleChanged(int) + cbAudioChanged(int) + diff -Nru k9copy-2.1.0/src/player/k9play.cpp k9copy-2.2.0/src/player/k9play.cpp --- k9copy-2.1.0/src/player/k9play.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/player/k9play.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -1,4 +1,3 @@ - // // C++ Implementation: k9play // @@ -18,7 +17,6 @@ #include "dvdnav.h" #include "dvdread.h" -#include "k9saveimage.h" #include #include #include @@ -31,30 +29,34 @@ #include #include #include +#include "k9dvdbackupinterface.h" +#include void k9play::saveStatus(k9play_st _status) { - QFile fstatus(m_inject); - fstatus.open(QIODevice::WriteOnly); - fstatus.write((const char*)&_status,sizeof(k9play_st)); - fstatus.close(); - kdebug (QString("saving status : %1 %2 %3 %4 %5 %6 %7\n").arg(_status.title).arg(_status.chapter).arg(_status.cell).arg(_status.sector).arg(_status.bytesWritten).arg(_status.bytesRead).arg(_status.bytesSkipped)); + QFile fstatus(m_inject); + fstatus.open(QIODevice::WriteOnly); + fstatus.write((const char*)&_status,sizeof(k9play_st)); + fstatus.close(); + kdebug (QString("saving status : %1 %2 %3 %4 %5 %6 %7\n").arg(_status.title).arg(_status.chapter).arg(_status.cell).arg(_status.sector).arg(_status.bytesWritten).arg(_status.bytesRead).arg(_status.bytesSkipped)); -} +} void k9play::readStatus(k9play_st &_status) { - QFile fstatus(m_inject); - if (fstatus.open(QIODevice::ReadOnly)) { - fstatus.read((char*)&_status,sizeof(k9play_st)); - fstatus.close(); - } else memset(&_status,0,sizeof(k9play_st)); + QFile fstatus(m_inject); + if (fstatus.open(QIODevice::ReadOnly)) { + fstatus.read((char*)&_status,sizeof(k9play_st)); + fstatus.close(); + } else memset(&_status,0,sizeof(k9play_st)); - kdebug (QString("reading status : title:%1 chapter:%2 cell:%3 sector:%4 written:%5 readen:%6 skipped:%7 chapters:%8 \n").arg(_status.title).arg(_status.chapter).arg(_status.cell).arg(_status.sector).arg(_status.bytesWritten).arg(_status.bytesRead).arg(_status.bytesSkipped).arg(_status.bytesChapters)); + kdebug (QString("reading status : title:%1 chapter:%2 cell:%3 sector:%4 written:%5 readen:%6 skipped:%7 chapters:%8 \n").arg(_status.title).arg(_status.chapter).arg(_status.cell).arg(_status.sector).arg(_status.bytesWritten).arg(_status.bytesRead).arg(_status.bytesSkipped).arg(_status.bytesChapters)); } -k9play::k9play(QObject *parent): QDBusAbstractAdaptor(parent) { +k9play::k9play(QObject *parent): QThread(parent) { // m_stderr.open(stderr,QIODevice::WriteOnly); + m_mainThread=false; + m_parent=parent; m_startSector=0xFFFFFFFF; m_endSector=0xFFFFFFFF; m_vampsFactor=1; @@ -67,31 +69,46 @@ m_firstPass=false; m_useCache=false; m_aborted=false; + m_exitOnEnd=false; + m_eventLoop=NULL; + m_saveImage=new k9SaveImage(); } void k9play::abort() { m_aborted=true; - k9Dialogs::information (i18n("MPEG-4 Encoding cancelled"), i18n("MPEG-4 Encoding")); + k9Dialogs::information (i18n("MPEG-4 Encoding cancelled"), i18n("MPEG-4 Encoding")); } void k9play::kdebug(QString const & _msg) { - #ifdef debug +#ifdef debug fprintf(stderr,_msg.latin1());//,_msg.length()); - #endif +#endif +} + +k9SaveImage* k9play::getSaveImage() { + return m_saveImage; } void k9play::writeOutput(QString const & _msg) { - fprintf(stderr,_msg.toUtf8());//,_msg.length()); + //if k9play is the main class (executed from k9play), the output is written to stderr + if (m_exitOnEnd) + fprintf(stderr,_msg.toUtf8());//,_msg.length()); } k9play::~k9play() { - // m_stderr.close(); + // m_stderr.close(); + delete m_saveImage; } +void k9play::setexitOnEnd(bool _value) { + m_exitOnEnd=_value; +} + + void k9play::setstartSector(QString _value) { if (_value !="") - m_startSector=_value.toUInt(); + m_startSector=_value.toUInt(); } void k9play::setinject(QString _value) { @@ -100,12 +117,12 @@ void k9play::setendSector(QString _value) { if (_value!="") - m_endSector=_value.toUInt(); + m_endSector=_value.toUInt(); } void k9play::setaudioFilter( QString _value) { if (_value!="") - m_audioFilter=_value.split(","); + m_audioFilter=_value.split(","); } void k9play::setsubpictureFilter( QString _value) { @@ -120,181 +137,192 @@ void k9play::setvampsFactor(QString _value) { if (_value!="") - m_vampsFactor=_value.toDouble(); + m_vampsFactor=_value.toDouble(); } void k9play::setinputSize( QString _value) { if (_value!="") - m_inputSize=_value.toULongLong(); + m_inputSize=_value.toULongLong(); } void k9play::settotalSize( QString _value) { if (_value!="") - m_totalSize=_value.toULongLong(); + m_totalSize=_value.toULongLong(); } void k9play::setdvdSize( QString _value) { if (_value!="") - m_dvdSize=_value.toULongLong(); + m_dvdSize=_value.toULongLong(); } void k9play::setchapterSize( QString _value) { if (_value!="") - m_chapterSize=_value.toULongLong(); + m_chapterSize=_value.toULongLong(); } void k9play::setchapter( QString _value) { - if (_value!="") - m_chapter=_value.toUInt(); + if (_value!="") + m_chapter=_value.toUInt(); } void k9play::setcell(QString _value) { - if (_value !="") - m_cell=_value.toUInt(); + if (_value !="") + m_cell=_value.toUInt(); } void k9play::setinitStatus(bool _value) { - m_initstatus=_value; + m_initstatus=_value; } void k9play::setcontinue(bool _value) { - m_continue=_value; + m_continue=_value; } void k9play::setfirstPass(bool _value) { - m_firstPass=_value; + m_firstPass=_value; } void k9play::setforcedFactor( bool _value) { - m_forcedFactor=_value; + m_forcedFactor=_value; } void k9play::setuseCache(bool _value) { m_useCache=_value; } + + +void k9play::getPosition(uint32_t *_position,uint32_t *_length) { + *_position=m_pos; + *_length=m_length; + +} + void k9play::execute() { //playCell(); - play(); - return; + m_terminated=false; + if (m_mainThread) + play(); + else + start(); + //play(); } -void k9play::insert_nav_pack (int8_t *buf) -{ - int8_t *ptr = (int8_t*)buf; - static uint8_t nav_pack1 [] = - { - /* pack header: SCR=0, mux rate=10080000bps, stuffing length=0 */ - 0, 0, 1, 0xba, 0x44, 0x00, 0x04, 0x00, 0x04, 0x01, 0x01, 0x89, 0xc3, 0xf8, - /* system header */ - 0, 0, 1, 0xbb, 0x00, 0x12, - /* contents of system header filled in at run time (18 bytes) */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /* PES header for first private stream 2 packet */ - 0, 0, 1, 0xbf, 0x03, 0xd4 - }; - static uint8_t nav_pack2 [] = - { - /* PES header for second private stream 2 packet */ - 0, 0, 1, 0xbf, 0x03, 0xfa - }; - - memcpy (ptr, nav_pack1, sizeof (nav_pack1)); - ptr += sizeof (nav_pack1); - memset (ptr, 0, DVD_VIDEO_LB_LEN/2 - sizeof (nav_pack1)); - ptr = buf + DVD_VIDEO_LB_LEN/2; - memcpy (ptr, nav_pack2, sizeof (nav_pack2)); - ptr += sizeof (nav_pack2); - memset (ptr, 0, DVD_VIDEO_LB_LEN/2 - sizeof (nav_pack2)); -} - -void k9play::insert_dummy_pack (int8_t *buf) -{ - int8_t *ptr = buf; - static uint8_t dummy_pack [] = - { - /* pack header: SCR=0, mux rate=10080000bps, stuffing length=0 */ - 0, 0, 1, 0xba, 0x44, 0x00, 0x04, 0x00, 0x04, 0x01, 0x01, 0x89, 0xc3, 0xf8, - /* PES header for dummy video packet */ - 0, 0, 1, 0xe0, 0x07, 0xec, 0x81, 0x00, 0x00 - }; - - memcpy (ptr, dummy_pack, sizeof (dummy_pack)); - ptr += sizeof (dummy_pack); - memset (ptr, 0xff, DVD_VIDEO_LB_LEN - sizeof (dummy_pack)); +void k9play::insert_nav_pack (int8_t *buf) { + int8_t *ptr = (int8_t*)buf; + static uint8_t nav_pack1 [] = { + /* pack header: SCR=0, mux rate=10080000bps, stuffing length=0 */ + 0, 0, 1, 0xba, 0x44, 0x00, 0x04, 0x00, 0x04, 0x01, 0x01, 0x89, 0xc3, 0xf8, + /* system header */ + 0, 0, 1, 0xbb, 0x00, 0x12, + /* contents of system header filled in at run time (18 bytes) */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* PES header for first private stream 2 packet */ + 0, 0, 1, 0xbf, 0x03, 0xd4 + }; + static uint8_t nav_pack2 [] = { + /* PES header for second private stream 2 packet */ + 0, 0, 1, 0xbf, 0x03, 0xfa + }; + + memcpy (ptr, nav_pack1, sizeof (nav_pack1)); + ptr += sizeof (nav_pack1); + memset (ptr, 0, DVD_VIDEO_LB_LEN/2 - sizeof (nav_pack1)); + ptr = buf + DVD_VIDEO_LB_LEN/2; + memcpy (ptr, nav_pack2, sizeof (nav_pack2)); + ptr += sizeof (nav_pack2); + memset (ptr, 0, DVD_VIDEO_LB_LEN/2 - sizeof (nav_pack2)); +} + +void k9play::insert_dummy_pack (int8_t *buf) { + int8_t *ptr = buf; + static uint8_t dummy_pack [] = { + /* pack header: SCR=0, mux rate=10080000bps, stuffing length=0 */ + 0, 0, 1, 0xba, 0x44, 0x00, 0x04, 0x00, 0x04, 0x01, 0x01, 0x89, 0xc3, 0xf8, + /* PES header for dummy video packet */ + 0, 0, 1, 0xe0, 0x07, 0xec, 0x81, 0x00, 0x00 + }; + + memcpy (ptr, dummy_pack, sizeof (dummy_pack)); + ptr += sizeof (dummy_pack); + memset (ptr, 0xff, DVD_VIDEO_LB_LEN - sizeof (dummy_pack)); } /* which is the default language for menus/audio/subpictures? */ #define DVD_LANGUAGE "en" -#define DVD_READ_CACHE 1 +#define DVD_READ_CACHE 0 + +void k9play::run() { + play(); + +} + void k9play::play() { dvdnav_t *dvdnav; uint8_t mem[DVD_VIDEO_LB_LEN]; - int finished = 0; + bool finished = false; + m_terminated=false; bool skipped=false; int32_t tt = 0,ptt=0; uint32_t pos, lgr; uint currCell=0; - m_pos=0xFFFFFFFF; + m_pos=0; k9play_st status; if (m_initstatus) - memset(&status,0,sizeof(k9play_st)); + memset(&status,0,sizeof(k9play_st)); else { - readStatus( status); - if (m_continue) - m_startSector=status.sector; + readStatus( status); + if (m_continue) + m_startSector=status.sector; } - - - KTemporaryFile *bufferFile; - if (m_useCache) { - bufferFile=new KTemporaryFile; - bufferFile->setPrefix(KStandardDirs::locateLocal("tmp", "k9copy/k9p")); - bufferFile->open(); - m_output=bufferFile; - } else { + + + k9DVDBackupInterface *parent=NULL; + parent=dynamic_cast(m_parent); + if (!parent) { m_output=new QFile(); m_output->open(stdout,QIODevice::WriteOnly); - } - k9vamps vamps(NULL); + } else + m_output=NULL; + + k9vamps vamps(parent,m_useCache); vamps.reset(); vamps.setPreserve( false); vamps.setOutput(m_output); - k9SaveImage saveImage; - saveImage.play(); - vamps.setSaveImage(&saveImage); + m_saveImage->play(); + vamps.setSaveImage(m_saveImage); // if reading of previous cell reached end of chapter, don't seek for cell if (m_chapter !=0 && m_cell !=0) { - if (m_cell==1) { - if (status.bytesRead <=status.bytesChapters) - status.bytesSkipped = status.bytesChapters - status.bytesRead; - else - status.bytesSkipped=0; - status.bytesChapters += m_chapterSize; + if (m_cell==1) { + if (status.bytesRead <=status.bytesChapters) + status.bytesSkipped = status.bytesChapters - status.bytesRead; + else + status.bytesSkipped=0; + status.bytesChapters += m_chapterSize; + } + if (status.title == m_title && + status.chapter > m_chapter) { + skipped=true; } - if (status.title == m_title && - status.chapter > m_chapter) { - skipped=true; - } } //vamps.setVapFactor( m_vampsFactor); if (m_totalSize>0 && !m_forcedFactor) { - double factor; - factor = (double) (m_totalSize - (status.bytesRead +status.bytesSkipped)) / (double) (m_dvdSize-status.bytesWritten) ; - if (factor <1) factor =1; - kdebug(QString("shrink factor %1 totalSize:%2 (status.bytesRead +status.bytesSkipped):%3 m_dvdSize:%4 status.bytesWritten:%5").arg(factor).arg(m_totalSize).arg(status.bytesRead +status.bytesSkipped).arg(m_dvdSize).arg(status.bytesWritten) ); - vamps.setVapFactor(factor); + double factor; + factor = (double) (m_totalSize - (status.bytesRead +status.bytesSkipped)) / (double) (m_dvdSize-status.bytesWritten) ; + if (factor <1) factor =1; + kdebug(QString("shrink factor %1 totalSize:%2 (status.bytesRead +status.bytesSkipped):%3 m_dvdSize:%4 status.bytesWritten:%5").arg(factor).arg(m_totalSize).arg(status.bytesRead +status.bytesSkipped).arg(m_dvdSize).arg(status.bytesWritten) ); + vamps.setVapFactor(factor); } else { - vamps.setVapFactor(m_vampsFactor); - kdebug(QString("vamps factor %1\n").arg(m_vampsFactor)); + vamps.setVapFactor(m_vampsFactor); + kdebug(QString("vamps factor %1\n").arg(m_vampsFactor)); } @@ -310,12 +338,14 @@ /* open dvdnav handle */ if (dvdnav_open(&dvdnav, m_device.toUtf8(),NULL) != DVDNAV_STATUS_OK) { writeOutput("ERR:Error on dvdnav_open\n"); + emit sigError(i18n("Error opening the DVD")); return ; } /* set read ahead cache usage */ if (dvdnav_set_readahead_flag(dvdnav, DVD_READ_CACHE) != DVDNAV_STATUS_OK) { writeOutput( QString("ERR:Error on dvdnav_set_readahead_flag: %1\n").arg(dvdnav_err_to_string(dvdnav))); + emit sigError(i18n("Error on dvdnav_set_readahead_flag: %1",dvdnav_err_to_string(dvdnav))); return; } @@ -324,6 +354,7 @@ dvdnav_audio_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK || dvdnav_spu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK) { writeOutput( QString("ERR:Error on setting languages: %1\n").arg(dvdnav_err_to_string(dvdnav))); + emit sigError(i18n("Error on setting languages: %1",dvdnav_err_to_string(dvdnav))); return ; } @@ -331,17 +362,18 @@ * whole feature instead of just relatively to the current chapter */ if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) { writeOutput(QString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").arg(dvdnav_err_to_string(dvdnav))); + emit sigError(i18n("Error on dvdnav_set_PGC_positioning_flag: %1",dvdnav_err_to_string(dvdnav)));; return ; } int32_t parts; dvdnav_get_number_of_parts(dvdnav , m_title, &parts); - if (m_chapter ==0) - dvdnav_title_play(dvdnav , m_title); + if (m_chapter ==0) + dvdnav_title_play(dvdnav , m_title); else { - dvdnav_part_play(dvdnav, m_title, m_chapter); - ptt=m_chapter; + dvdnav_part_play(dvdnav, m_title, m_chapter); + ptt=m_chapter; } /* the read loop which regularly calls dvdnav_get_next_block * and handles the returned events */ @@ -352,7 +384,7 @@ while (!finished && !skipped && !m_aborted) { int result, event, len; uint8_t *buf = mem; - qApp->processEvents(); +// qApp->processEvents(); /* the main reading function */ #if DVD_READ_CACHE @@ -365,71 +397,76 @@ if (result == DVDNAV_STATUS_ERR) { writeOutput(QString("ERR:Error getting next block: %1\n").arg(dvdnav_err_to_string(dvdnav))); + emit sigError(i18n("Error getting next block: %1",dvdnav_err_to_string(dvdnav))); return; } switch (event) { - case DVDNAV_NAV_PACKET: - { - dvdnav_current_title_info(dvdnav, &tt, &ptt); - dvdnav_get_position(dvdnav, &pos, &lgr); - m_length=lgr; - status.title=tt; - status.chapter=ptt; - status.cell=currCell; - status.sector=pos; - - if ((m_endSector !=0xFFFFFFFF) && (((status.bytesRead+status.bytesSkipped)/2048) >m_endSector)) { - finished=1; - kdebug(QString("pos >m_endSector %1 %2").arg((status.bytesRead+status.bytesSkipped)/2048).arg(m_endSector)); - } - if ((m_chapter !=0 && ptt !=m_chapter) || (tt != m_title)) - finished=1; - if (m_cell!=0 && currCell>m_cell) - finished=1; - - if (!finished && m_chapterList.count() >0) { - if (m_chapterList.indexOf( QString::number(ptt)) == -1) { - dvdnav_part_play(dvdnav,tt, ptt+1); - kdebug( QString("skipping chapter %1").arg(ptt)); - continue; - //dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part); - } - - } - - if (m_continue) { - dvdnav_sector_search(dvdnav,m_startSector , SEEK_SET); - kdebug (QString("repositionning on %1").arg(m_startSector)); - m_continue=false; - finished=0; - bcell=true; - } else { - if ((m_cell==0 || (m_cell!=0 && currCell==m_cell)) && finished==0) { - if (!vamps.isRunning()) - vamps.start(QThread::NormalPriority); - bcopy=true; - vamps.addData( buf,len); - status.bytesRead +=len; - if (!m_useCache) - writeOutput(QString("\rINFOPOS: %1 %2").arg((status.bytesRead+status.bytesSkipped) / DVD_VIDEO_LB_LEN).arg(lgr)); - if (m_pos==0xFFFFFFFF) - m_pos=(status.bytesRead+status.bytesSkipped) / DVD_VIDEO_LB_LEN; - } + case DVDNAV_NAV_PACKET: { + dvdnav_current_title_info(dvdnav, &tt, &ptt); + dvdnav_get_position(dvdnav, &pos, &lgr); + m_length=lgr; + status.title=tt; + status.chapter=ptt; + status.cell=currCell; + status.sector=pos; + + if ((m_endSector !=0xFFFFFFFF) && (((status.bytesRead+status.bytesSkipped)/2048) >m_endSector)) { + finished=true; + kdebug(QString("pos >m_endSector %1 %2").arg((status.bytesRead+status.bytesSkipped)/2048).arg(m_endSector)); + } + if ((m_chapter !=0 && ptt !=m_chapter) || (tt != m_title)) { + finished=true; + } + if (m_cell!=0 && currCell>m_cell) + finished=true; + + if (!finished && m_chapterList.count() >0) { + if (! m_chapterList.contains( QString::number(ptt))) { + if (ptt >=parts) { + finished=true; + break; + } else { + dvdnav_part_play(dvdnav,tt, ptt+1); + kdebug( QString("skipping chapter %1").arg(ptt)); + continue; + } + //dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part); + } + + } - } + if (m_continue) { + dvdnav_sector_search(dvdnav,m_startSector , SEEK_SET); + kdebug (QString("repositionning on %1").arg(m_startSector)); + m_continue=false; + finished=false; + bcell=true; + } else { + if ((m_cell==0 || (m_cell!=0 && currCell==m_cell)) && !finished) { + if (!vamps.isRunning()) + vamps.start(QThread::NormalPriority); + bcopy=true; + vamps.addData( buf,len); + status.bytesRead +=len; + writeOutput(QString("\rINFOPOS: %1 %2").arg((status.bytesRead+status.bytesSkipped) / DVD_VIDEO_LB_LEN).arg(lgr)); + emit sigPosition((status.bytesRead+status.bytesSkipped) / DVD_VIDEO_LB_LEN,lgr); + m_pos=(status.bytesRead+status.bytesSkipped) / DVD_VIDEO_LB_LEN; + } } - break; - //removed break --> save + + } + break; + //removed break --> save case DVDNAV_BLOCK_OK: /* We have received a regular block of the currently playing MPEG stream.*/ - if (m_cell==0 || (m_cell!=0 && currCell==m_cell)) { - if (!vamps.isRunning()) - vamps.start(QThread::NormalPriority); - vamps.addData( buf,len); - status.bytesRead +=len; + if (m_cell==0 || (m_cell!=0 && currCell==m_cell)) { + if (!vamps.isRunning()) + vamps.start(QThread::NormalPriority); + vamps.addData( buf,len); + status.bytesRead +=len; bcopy=true; - } + } break; case DVDNAV_NOP: /* Nothing to do here. */ @@ -440,10 +477,10 @@ * user input to make menus and other interactive stills work. * A length of 0xff means an indefinite still which has to be skipped * indirectly by some user interaction. */ - { - dvdnav_still_skip(dvdnav); - } - break; + { + dvdnav_still_skip(dvdnav); + } + break; case DVDNAV_WAIT: /* We have reached a point in DVD playback, where timing is critical. * Player application with internal fifos can introduce state @@ -474,24 +511,15 @@ * accordingly. */ break; case DVDNAV_CELL_CHANGE: - if (bcell) { - currCell++; - dvdnav_get_position(dvdnav, &pos, &lgr); - status.title=tt; - status.chapter=ptt; - status.cell=currCell; - status.sector=pos; - - if (m_useCache) { - flush(saveImage); - delete bufferFile; - bufferFile=new KTemporaryFile; - bufferFile->setPrefix(KStandardDirs::locateLocal("tmp", "k9copy/k9p")); - bufferFile->open(); - m_output=bufferFile; - vamps.setOutput(m_output); - } - } + if (bcell) { + currCell++; + dvdnav_get_position(dvdnav, &pos, &lgr); + status.title=tt; + status.chapter=ptt; + status.cell=currCell; + status.sector=pos; + + } break; case DVDNAV_HOP_CHANNEL: /* This event is issued whenever a non-seamless operation has been executed. @@ -499,12 +527,12 @@ break; case DVDNAV_STOP: /* Playback should end here. */ - { - finished = 1; - } - break; + { + finished = true; + } + break; default: - finished = 1; + finished = true; break; } @@ -518,62 +546,46 @@ /* destroy dvdnav handle */ dvdnav_close(dvdnav); - if (! bcopy) { - int8_t buf[DVD_VIDEO_LB_LEN]; - insert_nav_pack(buf); - m_output->write((const char*)buf,DVD_VIDEO_LB_LEN); - insert_dummy_pack(buf); - m_output->write((const char*)buf,DVD_VIDEO_LB_LEN); + if (m_output) { + if (! bcopy) { + int8_t buf[DVD_VIDEO_LB_LEN]; + insert_nav_pack(buf); + m_output->write((const char*)buf,DVD_VIDEO_LB_LEN); + insert_dummy_pack(buf); + m_output->write((const char*)buf,DVD_VIDEO_LB_LEN); - } - if (m_useCache) - flush(saveImage); - else { + } m_output->close(); delete m_output; } - saveImage.stop(); + m_saveImage->stop(); status.bytesWritten +=vamps.getOutputBytes(); if (!m_firstPass) - saveStatus( status); - delete bufferFile; - qApp->exit(); -} - -void k9play::flush(k9SaveImage &_saveImage ) { - char buffer[20*DVD_VIDEO_LB_LEN]; - m_output->reset(); - QFile out; - out.open(stdout,QIODevice::WriteOnly); - while(!m_output->atEnd()) { - writeOutput(QString("\rINFOPOS: %1 %2").arg(m_pos).arg(m_length)); - m_pos+=20; - int l=m_output->read(buffer,20*DVD_VIDEO_LB_LEN); - if (l>0) { - out.write(buffer,l); - } - } - m_output->close(); - m_output->remove(); - m_pos=0xFFFFFFFF; + saveStatus( status); + m_terminated=true; + + if (m_exitOnEnd) + qApp->exit(); + if (m_eventLoop) + m_eventLoop->exit(); + } -bool k9play::readNavPack (k9DVDFile *fh, dsi_t *dsi,int sector,uchar *_buffer) -{ - int n; - /* try max_read_retries+1 times */ + +bool k9play::readNavPack (k9DVDFile *fh, dsi_t *dsi,int sector,uchar *_buffer) { + int n; + /* try max_read_retries+1 times */ n = fh->readBlocks( sector, 1,_buffer); - if (n == 1) - { - /* read Ok */ - if (k9Cell::isNavPack (_buffer)) - /* parse contained DSI pack */ - navRead_DSI (dsi, _buffer + DSI_START_BYTE); - if (sector == dsi -> dsi_gi.nv_pck_lbn) { - return true; - } + if (n == 1) { + /* read Ok */ + if (k9Cell::isNavPack (_buffer)) + /* parse contained DSI pack */ + navRead_DSI (dsi, _buffer + DSI_START_BYTE); + if (sector == dsi -> dsi_gi.nv_pck_lbn) { + return true; + } } return false; } @@ -582,3 +594,23 @@ + + +void k9play::setEventLoop(QEventLoop* theValue) { + m_eventLoop = theValue; +} + + +bool k9play::terminated() const { + return m_terminated; +} + + +void k9play::setMainThread(bool theValue) { + m_mainThread = theValue; +} + + +void k9play::setAborted(bool theValue) { + m_aborted = theValue; +} diff -Nru k9copy-2.1.0/src/player/k9play.h k9copy-2.2.0/src/player/k9play.h --- k9copy-2.1.0/src/player/k9play.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/player/k9play.h 2009-02-19 22:30:17.000000000 +0100 @@ -1,7 +1,7 @@ // // C++ Interface: k9play // -// Description: +// Description: // // // Author: Jean-Michel PETIT , (C) 2006 @@ -14,28 +14,30 @@ #include "k9common.h" #include "k9dvdtitle.h" +#include "k9saveimage.h" +#include +#include #include -#include /** @author Jean-Michel PETIT */ typedef struct { - uint title; - uint chapter; - uint cell; - uint32_t sector; - uint64_t bytesWritten; - uint64_t bytesRead; - uint64_t bytesSkipped; - uint64_t bytesChapters; + uint title; + uint chapter; + uint cell; + uint32_t sector; + uint64_t bytesWritten; + uint64_t bytesRead; + uint64_t bytesSkipped; + uint64_t bytesChapters; } k9play_st; -class k9SaveImage; -class k9play:public QDBusAbstractAdaptor{ -Q_OBJECT -Q_CLASSINFO("D-Bus Interface", "k9copy.free.fr.player") + +class k9play:public QThread { + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "k9copy.free.fr.player") private: int m_title; k9DVD *m_dvd; @@ -58,6 +60,8 @@ bool m_firstPass; bool m_forcedFactor; bool m_useCache; + QObject *m_parent; + k9SaveImage *m_saveImage; QString m_inject; QStringList m_audioFilter; QStringList m_subpictureFilter; @@ -68,8 +72,13 @@ void insert_nav_pack (int8_t *buf); void saveStatus(k9play_st _status); void readStatus(k9play_st &_status); - void flush(k9SaveImage &_saveImage); bool m_aborted; + bool m_exitOnEnd; + bool m_terminated; + bool m_mainThread; + QEventLoop *m_eventLoop; +protected: + virtual void run(void); public: k9play(QObject *parent); @@ -77,10 +86,15 @@ void play(); void writeOutput(QString const & _msg); - void setTitle(int _value) {m_title = _value;}; - void setDevice(const QString& _value) {m_device = _value;}; - + void setTitle(int _value) { + m_title = _value; + }; + + void setDevice(const QString& _value) { + m_device = _value; + }; + void setstartSector(QString _value); void setendSector(QString _value); void setaudioFilter(QString _value); @@ -99,10 +113,28 @@ void setfirstPass (bool _value); void setforcedFactor(bool _value); void setuseCache(bool _value); + void setexitOnEnd(bool _value); + k9SaveImage *getSaveImage(); + void getPosition(uint32_t *_position,uint32_t *_length); public slots: void execute(); void abort(); + void setEventLoop(QEventLoop* theValue); + + bool terminated() const; + + void setMainThread(bool theValue); + + void setAborted(bool theValue); + + + + +signals: + void sigError(const QString & message); + void sigPosition(uint position,uint len); + void sigImageReady(const QString &path); }; #endif diff -Nru k9copy-2.1.0/src/player/main.cpp k9copy-2.2.0/src/player/main.cpp --- k9copy-2.1.0/src/player/main.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/player/main.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -126,7 +126,8 @@ player.setchapterSize( chapterSizeArg); player.setforcedFactor(ffactor); player.setchapterList( chapterListArg); - + player.setexitOnEnd(true); + player.setMainThread(true); QDBusConnection::sessionBus().registerObject("/", &obj); if (!QDBusConnection::sessionBus().registerService("k9copy.free.fr.player")) { fprintf(stderr, "%s\n", diff -Nru k9copy-2.1.0/src/subtitles/k9subtitle2pgm.cpp k9copy-2.2.0/src/subtitles/k9subtitle2pgm.cpp --- k9copy-2.1.0/src/subtitles/k9subtitle2pgm.cpp 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/subtitles/k9subtitle2pgm.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,595 @@ +// +// C++ Implementation: k9subtitle2pgm +// +// Description: Extractiion of subtitles from an mp2 stream. Subtitles are extracted to vobsub files. +// This code is based on extract_ac3 (transcode) and vobsub (mplayer) +// +// +// Author: <>, (C) 2008 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include "k9subtitle2pgm.h" +#include "k9common.h" +#include "ac.h" +#include +#include "k9ifo2.h" + + +k9Subtitle2Pgm::k9Subtitle2Pgm ( QObject *parent):QThread(parent) { + m_fifo = new k9MemoryFifo(); + start_rpts=end_rpts=-1.; + m_totalLength=0.; +} + +k9Subtitle2Pgm::~k9Subtitle2Pgm() { + delete m_fifo; +} + + + +void k9Subtitle2Pgm::addData(uchar *data,uint size) { + if (!isRunning()) start(); + m_fifo->addData(data,size); +} + + + + +uint k9Subtitle2Pgm::stream_read_int16(uchar *s) { + uint a, b, result; + + a = s[0]; + b = s[1]; + + result = (a << 8) | b; + return result; +} + +int k9Subtitle2Pgm::get_pts_dts(char *buffer, ulong *pts, ulong *dts) { + uint pes_header_bytes = 0; + uint pts_dts_flags; + int pes_header_data_length; + + int has_pts_dts=0; + + uint ptr=0; + + /* drop first 8 bits */ + ++ptr; + pts_dts_flags = (buffer[ptr++] >> 6) & 0x3; + pes_header_data_length = buffer[ptr++]; + + switch (pts_dts_flags) + + { + + case 2: + + *pts = (buffer[ptr++] >> 1) & 7; //low 4 bits (7==1111) + *pts <<= 15; + *pts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + *pts <<= 15; + *pts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + + pes_header_bytes += 5; + + has_pts_dts=1; + + break; + + case 3: + + *pts = (buffer[ptr++] >> 1) & 7; //low 4 bits (7==1111) + *pts <<= 15; + *pts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + *pts <<= 15; + *pts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + + *dts = (buffer[ptr++] >> 1) & 7; + *dts <<= 15; + *dts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + *dts <<= 15; + *dts |= (stream_read_int16((uchar*)&buffer[ptr]) >> 1); + ptr+=2; + + pes_header_bytes += 10; + + has_pts_dts=1; + + break; + + default: + + has_pts_dts=0; + *dts=*pts=0; + break; + } + + return(has_pts_dts); +} + + +uint k9Subtitle2Pgm::stream_read_int32(uchar *s) { + uint a, b, c, d, result; + + a = s[0]; + b = s[1]; + c = s[2]; + d = s[3]; + + result = (a << 24) | (b << 16) | (c << 8) | d; + return result; +} + +uint k9Subtitle2Pgm::read_tc_time_stamp(char *s) { + + ulong i, j; + ulong clock_ref=0, clock_ref_ext=0; + + if (s[0] & 0x40) { + + i = stream_read_int32((uchar*)s); + j = stream_read_int16((uchar*)s+4); + + if (i & 0x40000000 || (i >> 28) == 2) { + clock_ref = ((i & 0x31000000) << 3); + clock_ref |= ((i & 0x03fff800) << 4); + clock_ref |= ((i & 0x000003ff) << 5); + clock_ref |= ((j & 0xf800) >> 11); + clock_ref_ext = (j >> 1) & 0x1ff; + } + } + + return ((uint) (clock_ref * 300 + clock_ref_ext)); +} + + + + + +#define BUFFER_SIZE 40960 + +void k9Subtitle2Pgm::pes_ac3_loop (void) { + static int mpeg1_skip_table[16] = { + 1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff, + 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff + }; + last_pts=0; + last_pts_set = 0; + + uint8_t * buf; + uint8_t buffer[BUFFER_SIZE]; + uint8_t * end; + uint8_t * tmp1=NULL; + uint8_t * tmp2=NULL; + + char pack_buf[16]; + + uint pack_lpts=0; + double pack_sub_rpts=0.0f, abs_sub_rpts=0.0f; + + ulong i_pts, i_dts; + + buf = buffer; + int track_code=m_trackCod; + + + uint index=0; + void *vobsub_h=vobsub_out_open(m_baseName.toUtf8(), m_palette,720,576,m_langCod.toAscii(), index); + + + + do { + end = buf + m_fifo->readData(buffer,BUFFER_SIZE); + buf = buffer; + + //scan buffer + while (buf + 4 <= end) { + + + // check for valid start code + if (buf[0] || buf[1] || (buf[2] != 0x01)) { + buf++; + continue; + }// check for valid start code + + + switch (buf[3]) { + + case 0xb9: /* program end code */ + return; + + //check for PTS + + + case 0xba: /* pack header */ + + tc_memcpy(pack_buf, &buf[4], 6); + pack_lpts = read_tc_time_stamp(pack_buf); + + /* skip */ + if ((buf[4] & 0xc0) == 0x40) /* mpeg2 */ + tmp1 = buf + 14 + (buf[13] & 7); + else if ((buf[4] & 0xf0) == 0x20) /* mpeg1 */ + tmp1 = buf + 12; + else if (buf + 5 > end) + goto copy; + else { + fprintf (stderr, "(%s) weird pack header\n", __FILE__); + return; + } + + if (tmp1 > end) + goto copy; + buf = tmp1; + break; + + + case 0xbd: /* private stream 1 */ + tmp2 = buf + 6 + (buf[4] << 8) + buf[5]; + if (tmp2 > end) + goto copy; + if ((buf[6] & 0xc0) == 0x80) /* mpeg2 */ + tmp1 = buf + 9 + buf[8]; + else { /* mpeg1 */ + for (tmp1 = buf + 6; *tmp1 == 0xff; tmp1++) + if (tmp1 == buf + 6 + 16) { + fprintf (stderr, "(%s) too much stuffing\n", __FILE__); + buf = tmp2; + break; + } + if ((*tmp1 & 0xc0) == 0x40) + tmp1 += 2; + tmp1 += mpeg1_skip_table [*tmp1 >> 4]; + } + + + //subtitle + + if ((*tmp1 == track_code && track_code < 0x40 )) { + + if (tmp1 < tmp2) { + + // get pts time stamp: + tc_memcpy(pack_buf, &buf[6], 16); + + if (get_pts_dts(pack_buf, &i_pts, &i_dts)) { + pack_sub_rpts = (double) i_pts/90000.; + + abs_sub_rpts=m_totalLength+pack_sub_rpts - start_rpts; + } + vobsub_out_output(vobsub_h, tmp1+1,tmp2-tmp1-1, abs_sub_rpts); + + + } + + //ac3 package + + if (*tmp1 == track_code && track_code >= 0x80) { + tmp1 += 4; + + //test + if (0) { + tc_memcpy(pack_buf, &buf[6], 16); + get_pts_dts(pack_buf, &i_pts, &i_dts); + fprintf(stderr, "AC3 PTS=%f\n", (double) i_pts/90000.); + } + + } + } + + buf = tmp2; + break; + case 0xbb: { + pci_t pci_pack; + k9Ifo2::navRead_PCI(&pci_pack,buf-14 + 0x2d); +// k9DVDChapter *ch=m_title->getChapterFromSector(dsi_pack.dsi_gi.nv_pck_lbn); +// if (ch!=m_chapter) { + //adds the length of previous vobu + if (start_rpts !=-1.) { + m_totalLength+=end_rpts-start_rpts; + } + start_rpts=(double) pci_pack.pci_gi.vobu_s_ptm/90000.; + end_rpts=(double) pci_pack.pci_gi.vobu_e_ptm/90000.; + +// m_chapter=ch; + } + default: + if (buf[3] < 0xb9) fprintf (stderr, "(%s) broken stream - skipping data\n", __FILE__); + + /* skip */ + tmp1 = buf + 6 + (buf[4] << 8) + buf[5]; + if (tmp1 > end) + goto copy; + buf = tmp1; + break; + + } //start code selection + } //scan buffer + + if (buf < end) { +copy: + /* we only pass here for mpeg1 ps streams */ + memmove (buffer, buf, end - buf); + } + buf = buffer + (end - buf); + + } while (end == buffer + BUFFER_SIZE); + vobsub_out_close(vobsub_h); +} + + + + + +void k9Subtitle2Pgm::run() { + pes_ac3_loop(); +} + + + +/********************************************************************** + * Vobsub output + **********************************************************************/ + + +#define MIN(a,b) a>b?b:a +#define MAX(a,b) afidx, + "# VobSub index file, v7 (do not modify this line!)\n" + "#\n" + "# Generated by MPlayer " VERSION "\n" + "# See for more information about MPlayer\n" + "# See for more information about Vobsub\n" + "#\n" + "size: %ux%u\n", + orig_width, orig_height); + if (palette) { + fputs("palette:", me->fidx); + for (i = 0; i < 16; ++i) { + const double y = palette[i] >> 16 & 0xff, + u = (palette[i] >> 8 & 0xff) - 128.0, + v = (palette[i] & 0xff) - 128.0; + if (i) + putc(',', me->fidx); + fprintf(me->fidx, " %02x%02x%02x", + MIN(MAX((int)(y + 1.4022 * u), 0), 0xff), + MIN(MAX((int)(y - 0.3456 * u - 0.7145 * v), 0), 0xff), + MIN(MAX((int)(y + 1.7710 * v), 0), 0xff)); + } + putc('\n', me->fidx); + } + + fprintf(me->fidx,"# ON: displays only forced subtitles, OFF: shows everything\n" + "forced subs: OFF\n"); +} + +void *k9Subtitle2Pgm::vobsub_out_open(const char *basename, const uint *palette, + uint orig_width, uint orig_height, + const char *id, uint index) { + vobsub_out_t *result = NULL; + char *filename; + filename = (char*)malloc(strlen(basename) + 5); + if (filename) { + result = (vobsub_out_t*)malloc(sizeof(vobsub_out_t)); + if (result) { + result->aid = index; + strcpy(filename, basename); + strcat(filename, ".sub"); + result->fsub = fopen(filename, "ab"); + if (result->fsub == NULL) + perror("Error: vobsub_out_open subtitle file open failed"); + strcpy(filename, basename); + strcat(filename, ".idx"); + result->fidx = fopen(filename, "ab"); + if (result->fidx) { + if (ftell(result->fidx) == 0) { + create_idx(result, palette, orig_width, orig_height); + /* Make the selected language the default language */ + fprintf(result->fidx, "\n# Language index in use\nlangidx: %u\n", index); + } + fprintf(result->fidx, "\nid: %s, index: %u\n", id ? id : "xx", index); + /* So that we can check the file now */ + fflush(result->fidx); + } else + perror("Error: vobsub_out_open index file open failed"); + free(filename); + } + } + return result; +} + +void k9Subtitle2Pgm::vobsub_out_close(void *me) { + vobsub_out_t *vob = (vobsub_out_t*)me; + if (vob->fidx) + fclose(vob->fidx); + if (vob->fsub) + fclose(vob->fsub); + free(vob); +} + +void k9Subtitle2Pgm::vobsub_out_output(void *me, const uchar *packet, int len, double pts) { + + vobsub_out_t *vob = (vobsub_out_t*)me; + if (vob->fsub) { + /* Windows' Vobsub require that every packet is exactly 2kB long */ + uchar buffer[2048]; + uchar *p; + int remain = 2048; + /* Do not output twice a line with the same timestamp, this + breaks Windows' Vobsub */ + if (vob->fidx && (!last_pts_set || last_pts != pts)) { + static uint last_h = 9999, last_m = 9999, last_s = 9999, last_ms = 9999; + uint h, m, ms; + double s; + s = pts; + h = s / 3600; + s -= h * 3600; + m = s / 60; + s -= m * 60; + ms = (s - (uint) s) * 1000; + if (ms >= 1000) /* prevent overfolws or bad float stuff */ + ms = 0; + if (h != last_h || m != last_m || (uint) s != last_s || ms != last_ms) { + QTime time(h,m,s,ms); +// fprintf(vob->fidx, "timestamp: %02u:%02u:%02u:%03u, filepos: %09lx\n", +// h, m, (uint) s, ms, ftell(vob->fsub)); + fprintf(vob->fidx, "timestamp: %02u:%02u:%02u:%03u, filepos: %09lx\n", + time.hour(), time.minute(), (uint) time.second(), time.msec(), ftell(vob->fsub)); + last_h = h; + last_m = m; + last_s = (uint) s; + last_ms = ms; + } + } + last_pts = pts; + last_pts_set = 1; + + /* Packet start code: Windows' Vobsub needs this */ + p = buffer; + *p++ = 0; /* 0x00 */ + *p++ = 0; + *p++ = 1; + *p++ = 0xba; + *p++ = 0x40; + memset(p, 0, 9); + p += 9; + { /* Packet */ + static uchar last_pts[5] = { 0, 0, 0, 0, 0}; + uchar now_pts[5]; + int pts_len, pad_len, datalen = len; + pts *= 90000; + now_pts[0] = 0x21 | (((ulong)pts >> 29) & 0x0e); + now_pts[1] = ((ulong)pts >> 22) & 0xff; + now_pts[2] = 0x01 | (((ulong)pts >> 14) & 0xfe); + now_pts[3] = ((ulong)pts >> 7) & 0xff; + now_pts[4] = 0x01 | (((ulong)pts << 1) & 0xfe); + pts_len = memcmp(last_pts, now_pts, sizeof(now_pts)) ? sizeof(now_pts) : 0; + memcpy(last_pts, now_pts, sizeof(now_pts)); + + datalen += 3; /* Version, PTS_flags, pts_len */ + datalen += pts_len; + datalen += 1; /* AID */ + pad_len = 2048 - (p - buffer) - 4 /* MPEG ID */ - 2 /* payload len */ - datalen; + /* XXX - Go figure what should go here! In any case the + packet has to be completly filled. If I can fill it + with padding (0x000001be) latter I'll do that. But if + there is only room for 6 bytes then I can not write a + padding packet. So I add some padding in the PTS + field. This looks like a dirty kludge. Oh well... */ + if (pad_len < 0) { + /* Packet is too big. Let's try ommiting the PTS field */ + datalen -= pts_len; + pts_len = 0; + pad_len = 0; + } else if (pad_len > 6) + pad_len = 0; + datalen += pad_len; + + *p++ = 0; /* 0x0e */ + *p++ = 0; + *p++ = 1; + *p++ = 0xbd; + + *p++ = (datalen >> 8) & 0xff; /* length of payload */ + *p++ = datalen & 0xff; + *p++ = 0x80; /* System-2 (.VOB) stream */ + *p++ = pts_len ? 0x80 : 0x00; /* pts_flags */ + *p++ = pts_len + pad_len; + memcpy(p, now_pts, pts_len); + p += pts_len; + memset(p, 0, pad_len); + p += pad_len; + } + *p++ = 0x20 | vob->aid; /* aid */ + if (fwrite(buffer, p - buffer, 1, vob->fsub) != 1 + || fwrite(packet, len, 1, vob->fsub) != 1) + perror("ERROR: vobsub write failed"); + else + remain -= p - buffer + len; + + /* Padding */ + if (remain >= 6) { + p = buffer; + *p++ = 0x00; + *p++ = 0x00; + *p++ = 0x01; + *p++ = 0xbe; + *p++ = (remain - 6) >> 8; + *p++ = (remain - 6) & 0xff; + /* for better compression, blank this */ + memset(buffer + 6, 0, remain - (p - buffer)); + if (fwrite(buffer, remain, 1, vob->fsub) != 1) + perror("ERROR: vobsub padding write failed"); + } else if (remain > 0) { + /* I don't know what to output. But anyway the block + needs to be 2KB big */ + memset(buffer, 0, remain); + if (fwrite(buffer, remain, 1, vob->fsub) != 1) + perror("ERROR: vobsub blank padding write failed"); + } else if (remain < 0) + fprintf(stderr, + "\nERROR: wrong thing happenned...\n" + " I wrote a %i data bytes spu packet and that's too long\n", len); + } + +} + + +void k9Subtitle2Pgm::setBaseName(const QString& theValue) { + m_baseName = theValue; +} + + +void k9Subtitle2Pgm::end() { + m_fifo->setNoData(); + while (isRunning()) { + wait(100); + qApp->processEvents(); + } +} + + +QTime k9Subtitle2Pgm::pts2Time(double _pts) { + + uint h, m, ms; + double s; + s = _pts; + h = s / 3600; + s -= h * 3600; + m = s / 60; + s -= m * 60; + ms = (s - (uint) s) * 1000; + if (ms >= 1000) /* prevent overfolws or bad float stuff */ + ms = 0; + QTime t(h,m,s,ms); + qDebug() << " h:" << h << " m:" << m << " s:" << s << " ms:" << ms << " time:" << t.toString("hh:mm:ss.zzz"); + return t; + + +} + +void k9Subtitle2Pgm::setPalette(uint _index,uint value) { + m_palette[_index]=value; +} + + +void k9Subtitle2Pgm::setLangCod(const QString& theValue) { + m_langCod = theValue; +} + + +void k9Subtitle2Pgm::setTrackCod(int theValue) { + m_trackCod = theValue; +} diff -Nru k9copy-2.1.0/src/subtitles/k9subtitle2pgm.h k9copy-2.2.0/src/subtitles/k9subtitle2pgm.h --- k9copy-2.1.0/src/subtitles/k9subtitle2pgm.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/subtitles/k9subtitle2pgm.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,81 @@ +// +// C++ Interface: k9subtitle2pgm +// +// Description: +// +// +// Author: <>, (C) 2008 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef K9SUBTITLE2PGM_H +#define K9SUBTITLE2PGM_H + +#include "k9common.h" +#include "k9fifo.h" +#include +#include +#include +#include + +typedef struct { + FILE *fsub; + FILE *fidx; + unsigned int aid; +} vobsub_out_t; + + +class k9Subtitle2Pgm : public QThread { + Q_OBJECT +public: + k9Subtitle2Pgm ( QObject *parent); + ~k9Subtitle2Pgm(); + void addData(uchar *buffer,uint size); + void setNoData() ; + + void setBaseName(const QString& theValue); + + void end(); + + void setPalette(uint _index,uint value); + + void setLangCod(const QString& theValue); + + void setTrackCod(int theValue); + + + +private: + double last_pts; + QString m_langCod; + int m_trackCod; + int last_pts_set; + QString m_baseName; + k9MemoryFifo *m_fifo; + uint m_palette[16]; + double start_rpts,end_rpts,m_totalLength; + + double m_offset_rpts,m_last_rpts; + int m_discont; + + uint stream_read_int16(uchar *s); + uint read_tc_time_stamp(char *s); + uint stream_read_int32(uchar *s); + int get_pts_dts(char *buffer, ulong *pts, ulong *dts) ; + void pes_ac3_loop(); + void *vobsub_out_open(const char *basename, const unsigned int *palette, + unsigned int orig_width, unsigned int orig_height, + const char *id, unsigned int index); + void create_idx(vobsub_out_t *me, const unsigned int *palette, unsigned int orig_width, unsigned int orig_height); + void vobsub_out_close(void *me); + void vobsub_out_output(void *me, const unsigned char *packet, int len, double pts); + QTime pts2Time(double _pts); + +protected: + virtual void run(); +}; + + + +#endif diff -Nru k9copy-2.1.0/src/vamps/cmake_install.cmake k9copy-2.2.0/src/vamps/cmake_install.cmake --- k9copy-2.1.0/src/vamps/cmake_install.cmake 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/vamps/cmake_install.cmake 2009-02-19 22:30:17.000000000 +0100 @@ -2,7 +2,7 @@ # Set the install prefix IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr") + SET(CMAKE_INSTALL_PREFIX "/usr/local") ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") @@ -12,7 +12,7 @@ STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "Debugfull") + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") ENDIF(BUILD_TYPE) MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) diff -Nru k9copy-2.1.0/src/vamps/k9ffmpeg.cpp k9copy-2.2.0/src/vamps/k9ffmpeg.cpp --- k9copy-2.1.0/src/vamps/k9ffmpeg.cpp 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9ffmpeg.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,113 @@ +// +// C++ Implementation: k9avidecode +// +// Description: +// +// +// Author: Jean-Michel PETIT , (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "k9common.h" +#include "k9ffmpeg.h" +#ifdef HAVE_SWSCALE +#include "swscale.h" +#endif +#include +#include + +k9FFMpeg _FFMpegInstance; + +k9FFMpeg::k9FFMpeg(){ + CodecHandle=0; + FormatHandle=0; + SwscaleHandle=0; + CodecHandle=dlopen("libavcodec.so",RTLD_LAZY ); //| RTLD_GLOBAL + FormatHandle=dlopen("libavformat.so",RTLD_LAZY); +#ifdef HAVE_SWSCALE + SwscaleHandle=dlopen("libswscale.so",RTLD_LAZY); +#endif + UtilHandle=dlopen("libavutil.so",RTLD_LAZY); + if (!CodecHandle) { + m_error =i18n("Cannot open then library %1","libavcodec"); + return; + } + if (!FormatHandle) { + m_error =i18n("Cannot open then library %1","libavformat"); + return; + } + if (!UtilHandle) { + m_error =i18n("Cannot open the library %1","libavutil"); + return; + } +#ifdef HAVE_SWSCALE + if (!SwscaleHandle) { + m_error =i18n("Cannot open then library %1","libswscale"); + return; + } +#endif + avcodec_init =(avcodec_init_t)dlsym(CodecHandle,"avcodec_init"); + av_register_all = (av_register_all_t)dlsym(FormatHandle,"av_register_all"); + avcodec_alloc_context=(avcodec_alloc_context_t)dlsym(CodecHandle,"avcodec_alloc_context"); + av_open_input_file = (av_open_input_file_t)dlsym(FormatHandle,"av_open_input_file"); + av_find_stream_info = (av_find_stream_info_t)dlsym(FormatHandle,"av_find_stream_info"); + avcodec_find_decoder =(avcodec_find_decoder_t) dlsym(CodecHandle,"avcodec_find_decoder"); + avcodec_open = (avcodec_open_t)dlsym(CodecHandle,"avcodec_open"); + avcodec_alloc_frame = (avcodec_alloc_frame_t)dlsym(CodecHandle,"avcodec_alloc_frame"); + avpicture_get_size = (avpicture_get_size_t)dlsym(CodecHandle,"avpicture_get_size"); + av_malloc = (av_malloc_t)dlsym(CodecHandle,"av_malloc"); + avpicture_fill = (avpicture_fill_t)dlsym(CodecHandle,"avpicture_fill"); + av_read_frame = (av_read_frame_t)dlsym(FormatHandle,"av_read_frame"); + avcodec_decode_video = (avcodec_decode_video_t)dlsym(CodecHandle,"avcodec_decode_video"); + img_convert = (img_convert_t)dlsym(CodecHandle,"img_convert"); + av_free = (av_free_t)dlsym(CodecHandle,"av_free"); + avcodec_close = (avcodec_close_t)dlsym(FormatHandle,"avcodec_close"); + av_close_input_file = (av_close_input_file_t)dlsym(FormatHandle,"av_close_input_file"); + av_seek_frame=(av_seek_frame_t)dlsym(FormatHandle,"av_seek_frame"); + av_rescale_q=(av_rescale_q_t)dlsym(FormatHandle,"av_rescale_q"); + avcodec_flush_buffers=(avcodec_flush_buffers_t)dlsym(CodecHandle,"avcodec_flush_buffers"); +#ifdef HAVE_SWSCALE + sws_freeContext= (sws_freeContext_t)dlsym(SwscaleHandle,"sws_freeContext"); + sws_getContext=(sws_getContext_t)dlsym(SwscaleHandle,"sws_getContext"); + sws_scale= (sws_scale_t)dlsym(SwscaleHandle,"sws_scale"); +#endif + + av_gettime=(av_gettime_t)dlsym(FormatHandle,"av_gettime"); + url_fopen=(url_fopen_t)dlsym(FormatHandle,"url_fopen"); + + audio_resample_init=(audio_resample_init_t)dlsym(CodecHandle,"audio_resample_init"); + avcodec_decode_audio2=(avcodec_decode_audio2_t)dlsym(CodecHandle,"avcodec_decode_audio2"); + avcodec_decode_audio=(avcodec_decode_audio_t)dlsym(CodecHandle,"avcodec_decode_audio"); + + avcodec_encode_audio=(avcodec_encode_audio_t)dlsym(CodecHandle,"avcodec_encode_audio"); + guess_format=(guess_format_t)dlsym(FormatHandle,"guess_format"); + audio_resample=(audio_resample_t) dlsym(CodecHandle,"audio_resample"); + av_write_header=(av_write_header_t)dlsym(FormatHandle,"av_write_header"); + av_alloc_format_context=(av_alloc_format_context_t)dlsym(FormatHandle,"av_alloc_format_context"); + avcodec_find_encoder=(avcodec_find_encoder_t)dlsym(CodecHandle,"avcodec_find_encoder"); + av_init_packet=(av_init_packet_t)dlsym(FormatHandle,"av_init_packet"); + av_write_frame=(av_write_frame_t)dlsym(FormatHandle,"av_write_frame"); + av_write_trailer=(av_write_trailer_t)dlsym(FormatHandle,"av_write_trailer"); + av_set_parameters=(av_set_parameters_t)dlsym(FormatHandle,"av_set_parameters"); + dump_format=(dump_format_t)dlsym(FormatHandle,"dump_format"); + av_new_stream=(av_new_stream_t)dlsym(FormatHandle,"av_new_stream"); +} + + +k9FFMpeg::~k9FFMpeg() { + if (FormatHandle) + dlclose(FormatHandle); + if (CodecHandle) + dlclose(CodecHandle); +#ifdef HAVE_SWSCALE + if (SwscaleHandle) + dlclose(CodecHandle); +#endif + +} + +k9FFMpeg *k9FFMpeg::instance() { + return &_FFMpegInstance; + +} \ No newline at end of file diff -Nru k9copy-2.1.0/src/vamps/k9ffmpeg.h k9copy-2.2.0/src/vamps/k9ffmpeg.h --- k9copy-2.1.0/src/vamps/k9ffmpeg.h 1970-01-01 01:00:00.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9ffmpeg.h 2009-02-19 22:30:17.000000000 +0100 @@ -0,0 +1,139 @@ +// +// C++ Interface: k9avidecode +// +// Description: +// +// +// Author: Jean-Michel PETIT , (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef K9FFMPEG_H +#define K9FFMPEG_H + +#include +#include +#include +#include +#ifdef HAVE_SWSCALE +#include +#endif +/** + @author Jean-Michel PETIT +*/ + + +//typedef dvd_file_t * (*DVDOpenFile_t) ( dvd_reader_t *, int, dvd_read_domain_t ); +typedef void (*av_register_all_t) (void); +typedef void (*avcodec_init_t)(void); +typedef int64_t (*av_gettime_t) (void); +typedef int (*av_open_input_file_t)(AVFormatContext **, const char *,AVInputFormat *,int, AVFormatParameters *); +typedef int (*av_find_stream_info_t)(AVFormatContext *); +typedef AVCodec* (*avcodec_find_decoder_t)(enum CodecID); +typedef int (*avcodec_open_t)(AVCodecContext *, AVCodec *); +typedef AVFrame * (*avcodec_alloc_frame_t)(void); +typedef AVCodecContext * (*avcodec_alloc_context_t)(void); + +typedef int (*avpicture_get_size_t)(int , int , int ); +typedef void * (*av_malloc_t)(unsigned int ); +typedef int (*avpicture_fill_t)(AVPicture *, uint8_t *,int , int , int); +typedef int (*av_read_frame_t)(AVFormatContext *, AVPacket *); + +typedef int (*avcodec_decode_video_t)(AVCodecContext *, AVFrame *,int *, uint8_t *, int ); +typedef int (*avcodec_encode_audio_t)(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples); + +typedef int (*img_convert_t)(AVPicture *, int , const AVPicture *, int ,int, int); +typedef void (*av_free_t)(void *); +typedef int (*avcodec_close_t)(AVCodecContext *); +typedef void (*av_close_input_file_t)(AVFormatContext *); +typedef int (*av_seek_frame_t)(AVFormatContext *,int,int64_t timestamp,int flags); +typedef int64_t (*av_rescale_q_t)(int64_t , AVRational , AVRational ) ; +typedef void (*avcodec_flush_buffers_t)(AVCodecContext *); + +#ifdef HAVE_SWSCALE +typedef void (*sws_freeContext_t)(struct SwsContext *swsContext); +typedef struct SwsContext* (*sws_getContext_t)(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, + SwsFilter *srcFilter, SwsFilter *dstFilter, double *param); +typedef int (*sws_scale_t)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,int srcSliceH, uint8_t* dst[], int dstStride[]); +#endif + + +typedef int (*url_fopen_t)(ByteIOContext **s, const char *filename, int flags); + +typedef ReSampleContext * (*audio_resample_init_t)(int output_channels, int input_channels,int output_rate,int input_rate); +typedef int (*av_write_header_t)(AVFormatContext *); +typedef int (*avcodec_decode_audio2_t)(AVCodecContext *avctx, int16_t *samples,int *frame_size_ptr,const uint8_t *buf, int buf_size); +typedef int (*avcodec_decode_audio_t)(AVCodecContext *avctx, int16_t *samples,int *frame_size_ptr, const uint8_t *buf, int buf_size); + +typedef AVOutputFormat *(*guess_format_t)(const char *short_name, const char *filename, const char *mime_type); +typedef int (*audio_resample_t)(ReSampleContext *s, short *output, short *input, int nb_samples); +typedef AVFormatContext *(*av_alloc_format_context_t)(void); +typedef AVCodec *(*avcodec_find_encoder_t)(enum CodecID id); +typedef void (*av_init_packet_t)(AVPacket *pkt); +typedef int (*av_write_frame_t)(AVFormatContext *s, AVPacket *pkt); +typedef int (*av_write_trailer_t)(AVFormatContext *s); +typedef int (*av_set_parameters_t)(AVFormatContext *s, AVFormatParameters *ap); +typedef void (*dump_format_t)(AVFormatContext *ic, int index, const char *url, int is_output); +typedef AVStream *(*av_new_stream_t)(AVFormatContext *s, int id); + + +class k9FFMpeg +{ +public: + k9FFMpeg(); + + ~k9FFMpeg(); + static k9FFMpeg *instance(); +public: + avcodec_init_t avcodec_init; + avcodec_alloc_context_t avcodec_alloc_context; + av_register_all_t av_register_all; + av_open_input_file_t av_open_input_file; + av_find_stream_info_t av_find_stream_info; + avcodec_find_decoder_t avcodec_find_decoder; + avcodec_open_t avcodec_open; + avcodec_alloc_frame_t avcodec_alloc_frame; + av_seek_frame_t av_seek_frame; + avpicture_get_size_t avpicture_get_size; + av_malloc_t av_malloc; + avpicture_fill_t avpicture_fill; + av_read_frame_t av_read_frame; + avcodec_decode_video_t avcodec_decode_video; + img_convert_t img_convert; + av_free_t av_free; + avcodec_close_t avcodec_close; + av_close_input_file_t av_close_input_file; + av_rescale_q_t av_rescale_q; + av_gettime_t av_gettime; + avcodec_flush_buffers_t avcodec_flush_buffers; +#ifdef HAVE_SWSCALE + sws_freeContext_t sws_freeContext; + sws_getContext_t sws_getContext; + sws_scale_t sws_scale; +#endif + url_fopen_t url_fopen; + audio_resample_init_t audio_resample_init; + av_write_header_t av_write_header; + avcodec_decode_audio2_t avcodec_decode_audio2; + avcodec_decode_audio_t avcodec_decode_audio; + avcodec_encode_audio_t avcodec_encode_audio; + guess_format_t guess_format; + audio_resample_t audio_resample; + av_alloc_format_context_t av_alloc_format_context; + avcodec_find_encoder_t avcodec_find_encoder; + av_init_packet_t av_init_packet; + av_write_frame_t av_write_frame; + av_write_trailer_t av_write_trailer; + av_set_parameters_t av_set_parameters; + dump_format_t dump_format; + av_new_stream_t av_new_stream; +private: + void *CodecHandle; + void *FormatHandle; + void *SwscaleHandle; + void *UtilHandle; + QString m_error; +}; + +#endif diff -Nru k9copy-2.1.0/src/vamps/k9fifo.cpp k9copy-2.2.0/src/vamps/k9fifo.cpp --- k9copy-2.1.0/src/vamps/k9fifo.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9fifo.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -56,6 +56,74 @@ mutex.unlock(); } + +void k9MemoryFifo::setNoData() { + noData=true; + wDataRead.wakeAll(); + wDataReady.wakeAll(); +} + +void k9MemoryFifo::addData(uchar *data,uint size) { + while (1) { + if (freespace()>=size) { + enqueue(data,size); + wDataReady.wakeAll(); + break; + } else { + QMutex m; + m.lock(); + wDataRead.wait(&m); + m.unlock(); + } + } +} + + +int k9MemoryFifo::readData(uchar * data,uint size) { + uint size2=size; + uint32_t readSize=0,s=0; + + while (1) { + // is there data in the buffer? + if (count() >0) { + // s= size of data that we will read (maximum = size) + s=(count()) =size2)) { + break; + } else { + QMutex m; + m.lock(); + wDataReady.wait(&m); + m.unlock(); + } + } + // if there's datas in input buffer and we did not get all what we wanted, we take them. + s= (count()) 0 ) + dequeue(data,s); + + wDataRead.wakeAll(); + return readSize; +} + + + + + //******************************************************************** k9FileFifo::k9FileFifo() { m_rfile=m_wfile=NULL; diff -Nru k9copy-2.1.0/src/vamps/k9fifo.h k9copy-2.2.0/src/vamps/k9fifo.h --- k9copy-2.1.0/src/vamps/k9fifo.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9fifo.h 2009-02-19 22:30:17.000000000 +0100 @@ -60,14 +60,21 @@ uint32_t head,queue; uchar *array; uint32_t m_count; + bool noData; QMutex mutex; + QWaitCondition wDataRead,wDataReady; public: - k9MemoryFifo () { head=queue=m_count=0;array= new uchar[INPUT_SIZE];}; + k9MemoryFifo () { head=queue=m_count=0;noData=false;array= new uchar[INPUT_SIZE];}; uint32_t count(); // { return (queue-head)%INPUT_SIZE ;} uint32_t freespace() {return INPUT_SIZE-count();}; void enqueue (uchar *_buffer, uint32_t _size) ; void dequeue(uchar *_buffer,uint32_t _size) ; void clear(); + void setNoData(); + void addData(uchar *data,uint size); + int readData(uchar * data,uint size); + + virtual ~k9MemoryFifo() { delete[] array;}; }; diff -Nru k9copy-2.1.0/src/vamps/k9vamps.cpp k9copy-2.2.0/src/vamps/k9vamps.cpp --- k9copy-2.1.0/src/vamps/k9vamps.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9vamps.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -85,6 +85,7 @@ spu_track_map[id-1]=cpt; } + void k9vamps::addAudio(uint id) { int cpt=1; for (uint i=0;i <8;i++) @@ -153,12 +154,12 @@ } -k9vamps::k9vamps(k9DVDBackupInterface *dvdbackup) { -#ifndef Filefifo +k9vamps::k9vamps(k9DVDBackupInterface *dvdbackup,bool _useCache) { +if (!_useCache) m_fifo=new k9MemoryFifo(); -#else +else m_fifo=new k9FileFifo(); -#endif + m_saveImage=NULL; m_dvdbackup=dvdbackup; reset(); @@ -241,14 +242,14 @@ return 0; if (avail) { - tc_memcpy (rbuf, rptr, avail); + memcpy (rbuf, rptr, avail); rptr = rbuf; rhwp = rptr + avail; } if (rbuf_size -avail <=0) { uchar *buffer =new uchar[rbuf_size+20480]; - tc_memcpy (buffer,rbuf,rbuf_size); + memcpy (buffer,rbuf,rbuf_size); rptr = buffer +(rptr-rbuf); rhwp=buffer+(rhwp-rbuf); rbuf_size+=20480; @@ -276,7 +277,7 @@ if ((wptr - wbuf) + size > WBUF_SIZE) fatal ("Write buffer overflow"); - tc_memcpy (wptr, rptr, size); + memcpy (wptr, rptr, size); rptr += size; wptr += size; } @@ -442,7 +443,7 @@ } m_requant->rqt_stop=false; // this ensures for the requant thread to stop at this GOP's end - tc_memcpy (src + n, "\0\0\1", 3); + memcpy (src + n, "\0\0\1", 3); m_requant->mutr.lock(); @@ -476,12 +477,12 @@ m_requant->mutw.unlock(); /* if ((m_requant->rbuf-m_requant->cbuf -3) >0 ) { - tc_memcpy(dst+m_requant->rqt_wcnt,m_requant->cbuf,m_requant->rbuf-m_requant->cbuf -3); + memcpy(dst+m_requant->rqt_wcnt,m_requant->cbuf,m_requant->rbuf-m_requant->cbuf -3); rv +=m_requant->rbuf-m_requant->cbuf -3; } /*/ if ((m_requant->rbuf-m_requant->cbuf -2) >0 ) { - tc_memcpy(dst+m_requant->rqt_wcnt,m_requant->cbuf,m_requant->rbuf-m_requant->cbuf -2); + memcpy(dst+m_requant->rqt_wcnt,m_requant->cbuf,m_requant->rbuf-m_requant->cbuf -2); rv +=m_requant->rbuf-m_requant->cbuf -2; } @@ -500,6 +501,35 @@ } +int k9vamps::getStreamIndex(uchar *ptr) { + int type, track, abase; + + type = ptr [6 + 3 + ptr [8]]; + //fprintf (stderr, "type=%02x\n", type); + + if (type >= 0x20 && type <= 0x3f) { + // subpicture + return type- 0x20 +1; + } + + if (type >= 0x80 && type <= 0x87) { + // AC3 audio + abase = 0x80; + } else if (type >= 0x88 && type <= 0x8f) { + // DTS audio + abase = 0x88; + } else if (type >= 0xa0 && type <= 0xa7) { + // LPCM audio + abase = 0xa0; + } else { +// fatal ("Unknown private stream 1 type at %llu: %02x", rtell (ptr), type); + abase = 0; + } + + return type - abase + 1; + +} + // translate type of private stream 1 packet // according to the track translation maps // returns new track type (e.g. 0x80 for first AC3 audio @@ -547,6 +577,13 @@ type = new_private_1_type (ptr); if (type) { + if (m_dvdbackup) { + int streamIndex=getStreamIndex(ptr); + if (streamIndex) { + m_dvdbackup->getOutput( (type >= 0x20 && type <= 0x3f) ? k9DVDBackupInterface::SUBPICTURE:k9DVDBackupInterface::AUDIO,streamIndex,ptr,SECT_SIZE); + } + } + if (!m_preserve) ptr [6 + 3 + ptr [8]] = type; @@ -620,6 +657,9 @@ return; copy (SECT_SIZE); + if (m_dvdbackup) + m_dvdbackup->getOutput(k9DVDBackupInterface::VIDEO,0,ptr,SECT_SIZE); + break; case 0xbd: @@ -642,6 +682,8 @@ case 0xbb: // system header/private 2: PCI/DSI copy (SECT_SIZE); + if (m_dvdbackup) + m_dvdbackup->getOutput(k9DVDBackupInterface::NAV,0,ptr,SECT_SIZE); break; case 0xbe: @@ -767,13 +809,13 @@ vbuf_size += VBUF_SIZE; uchar *tmp; tmp =new uchar[vbuf_size]; - tc_memcpy(tmp,vibuf,vbuf_size-VBUF_SIZE); + memcpy(tmp,vibuf,vbuf_size-VBUF_SIZE); delete[] vibuf; vibuf = tmp; // vibuf = (uchar*)realloc (vibuf, vbuf_size); tmp=new uchar[vbuf_size]; - tc_memcpy(tmp,vobuf,vbuf_size-VBUF_SIZE); + memcpy(tmp,vobuf,vbuf_size-VBUF_SIZE); delete[] vobuf; vobuf=tmp; @@ -786,7 +828,7 @@ } //fprintf (stderr, "data_length=%d\n", data_length); - tc_memcpy (viptr, ptr + 6 + opt_length, data_length); + memcpy (viptr, ptr + 6 + opt_length, data_length); viptr += data_length; break; @@ -859,7 +901,7 @@ if (avail >= data_length) { // write out a full video packet (usually 2025 byte) - tc_memcpy (ptr + 6 + 3 + header_data_length, voptr, data_length); + memcpy (ptr + 6 + 3 + header_data_length, voptr, data_length); ptr [4] = (SECT_SIZE - (14 + 6)) >> 8; ptr [5] = (SECT_SIZE - (14 + 6)) & 0xff; ptr [8] = header_data_length; @@ -869,7 +911,7 @@ if (avail < data_length - 6) { // write a short video packet and a padding packet - tc_memcpy (ptr + 6 + 3 + header_data_length, voptr, avail); + memcpy (ptr + 6 + 3 + header_data_length, voptr, avail); ptr [4] = (3 + header_data_length + avail) >> 8; ptr [5] = 3 + header_data_length + avail; ptr [8] = header_data_length; @@ -896,7 +938,7 @@ padding_bytes += padding_length; memset (ptr + 6 + 3 + header_data_length, 0xff, padding_length); header_data_length += padding_length; - tc_memcpy (ptr + 6 + 3 + header_data_length, voptr, avail); + memcpy (ptr + 6 + 3 + header_data_length, voptr, avail); ptr [4] = (SECT_SIZE - (14 + 6)) >> 8; ptr [5] = (SECT_SIZE - (14 + 6)) & 0xff; ptr [8] = header_data_length; @@ -927,6 +969,9 @@ // still some video output data left voptr += gen_video_packet (ptr, voptr, avail); copy (SECT_SIZE); + if (m_dvdbackup) + m_dvdbackup->getOutput(k9DVDBackupInterface::VIDEO,0,ptr,SECT_SIZE); + } else { // no video output data left - skip input sector skip (SECT_SIZE); @@ -954,9 +999,13 @@ case 0xbb: // system header/private 2: PCI/DSI - copy (SECT_SIZE); + copy (SECT_SIZE); + if (m_dvdbackup) + m_dvdbackup->getOutput(k9DVDBackupInterface::NAV,0,ptr,SECT_SIZE); + break; + case 0xbe: // padding data_length = ptr [4] << 8; @@ -1030,7 +1079,7 @@ // fact = (video_packs*net-(gops*net/2+10))/(vop*net-(gops*net/2+10)) // net = SECT_SIZE-(14+9) // 14: pack header size - // 9: PES header size + // 9: PES header sizerequant // 10: PTS+DTS size in PES header of sequence header // You are welcome to double check everything here! float vop, net; @@ -1062,7 +1111,7 @@ volen = requant (vobuf, vibuf, vilen, fact); } else { // don't do requantization - tc_memcpy (vobuf, vibuf, vilen); + memcpy (vobuf, vibuf, vilen); volen = vilen; } @@ -1111,14 +1160,16 @@ } void k9bgUpdate::update(uchar *_buffer,uint32_t _size) { + //à vérifier: ajout d'un wait pour s'assurer que le thread n'est pas en cours d'exécution + wait(); + mutex.lock(); m_buffer=new uchar[_size]; - tc_memcpy(m_buffer,_buffer,_size); + memcpy(m_buffer,_buffer,_size); m_size=_size; start(); mutex.unlock(); } - void k9bgUpdate::run() { m_backup->getOutput(m_buffer,m_size); delete[] m_buffer; diff -Nru k9copy-2.1.0/src/vamps/k9vamps.h k9copy-2.2.0/src/vamps/k9vamps.h --- k9copy-2.1.0/src/vamps/k9vamps.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/vamps/k9vamps.h 2009-02-19 22:30:17.000000000 +0100 @@ -31,7 +31,7 @@ #include "k9requant.h" #include "k9fifo.h" #include "k9saveimage.h" - +#include // DVD sector size #define SECT_SIZE 2048 @@ -101,7 +101,6 @@ float vap_fact; // vaporization factor from cmd line bool noData; QMutex mutex; - k9bgUpdate *m_bgUpdate; //k9MemoryFifo m_fifo; k9fifo *m_fifo; @@ -135,7 +134,7 @@ int gen_video_packet (uchar *ptr, uchar *voptr, int avail); void vap_phase2 (int seq_length); pthread_t thread; - + int getStreamIndex(uchar *ptr); int readData(uchar *data,uint size); QWaitCondition wDataRead; @@ -146,7 +145,7 @@ protected: void run(); public: - k9vamps(k9DVDBackupInterface *dvdbackup); + k9vamps(k9DVDBackupInterface *dvdbackup,bool _useCache=false); void addData(uchar* data,uint size); void setNoData(); void addSubpicture(uint id); diff -Nru k9copy-2.1.0/src/xine/k9xineplayer.cpp k9copy-2.2.0/src/xine/k9xineplayer.cpp --- k9copy-2.1.0/src/xine/k9xineplayer.cpp 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/xine/k9xineplayer.cpp 2009-02-19 22:30:17.000000000 +0100 @@ -54,7 +54,7 @@ }; -static void dest_size_cb(void *data, int video_width, int video_height, double video_pixel_aspect,int *dest_width, int *dest_height, double *dest_pixel_aspect) { +static void dest_size_cb(void *data, int , int , double ,int *dest_width, int *dest_height, double *dest_pixel_aspect) { k9xinePlayer *player=(k9xinePlayer*)data; *dest_width = player->width(); *dest_height = player->height(); @@ -99,7 +99,7 @@ k9xinePlayer::k9xinePlayer(QObject *parent) : QDBusAbstractAdaptor(parent) { m_thread=new k9xineThread(this); - + running=false; } diff -Nru k9copy-2.1.0/src/xine/k9xineplayer.h k9copy-2.2.0/src/xine/k9xineplayer.h --- k9copy-2.1.0/src/xine/k9xineplayer.h 2008-10-27 18:33:05.000000000 +0100 +++ k9copy-2.2.0/src/xine/k9xineplayer.h 2009-02-19 22:30:17.000000000 +0100 @@ -42,6 +42,7 @@ Q_PROPERTY(int position READ position WRITE seek) Q_PROPERTY(int positionAbs READ positionAbs WRITE seek) Q_PROPERTY(int length READ length); + Q_PROPERTY(int isRunning READ isRunning) Q_PROPERTY(QString device READ device WRITE setDevice) public: k9xinePlayer(QObject *parent = 0);