Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Restore 32-bit build
Browse files Browse the repository at this point in the history
This just made build possible. Functionality not tested.

Partially addresses #1195
  • Loading branch information
Nabiullin, Oleg authored and dvrogozh committed Mar 5, 2019
1 parent 66a1a87 commit 51dffc4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ if (BUILD_SAMPLES)
endif()

if (BUILD_RUNTIME)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/contrib/ipp)
if (MFX_ENABLE_SW_FALLBACK)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/contrib/ipp)
endif()
add_subdirectory(${CMAKE_HOME_DIRECTORY}/_studio)
endif()

Expand Down
22 changes: 12 additions & 10 deletions _studio/shared/src/mfx_static_assert_structs.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright (c) 2018 Intel Corporation
// Copyright (c) 2018-2019 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down Expand Up @@ -187,7 +187,7 @@
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtLAFrameStatistics ,72 )
#elif defined(LINUX32)
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtLAControl ,576 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxLAFrameInfo ,496 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxLAFrameInfo ,492 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtLAFrameStatistics ,64 )
#endif
#endif //defined (__MFXLA_H__)
Expand Down Expand Up @@ -327,7 +327,7 @@
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxFrameId ,8 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxFrameInfo ,68 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxFrameData ,72 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxFrameSurface1 ,160 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxFrameSurface1 ,156 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxInfoMFX ,136 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxInfoVPP ,168 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxVideoParam ,196 )
Expand All @@ -338,7 +338,7 @@
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtVPPDenoise ,12 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtVPPDetail ,12 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtVPPProcAmp ,40 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxEncodeStat ,88 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxEncodeStat ,80 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxDecodeStat ,80 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxVPPStat ,72 )
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtVppAuxData ,20 )
Expand Down Expand Up @@ -410,6 +410,7 @@
#if (MFX_VERSION >= 1026)
MSDK_STATIC_ASSERT_STRUCT_SIZE(mfxExtVppMctf ,64 )
#endif

#endif
#endif //defined (__MFXSTRUCTURES_H__)

Expand Down Expand Up @@ -1300,7 +1301,7 @@
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxFrameData ,DataFlag ,70 )

MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxFrameSurface1 ,Info ,16 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxFrameSurface1 ,Data ,88 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxFrameSurface1 ,Data ,84 )

MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxInfoMFX ,LowPower ,28 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxInfoMFX ,BRCParamMultiplier ,30 )
Expand Down Expand Up @@ -1480,8 +1481,8 @@
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtVPPProcAmp ,Saturation ,32 )

MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxEncodeStat ,NumFrame ,64 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxEncodeStat ,NumBit ,72 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxEncodeStat ,NumCachedFrame ,80 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxEncodeStat ,NumBit ,68 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxEncodeStat ,NumCachedFrame ,76 )

MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxDecodeStat ,NumFrame ,64 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxDecodeStat ,NumSkippedFrame ,68 )
Expand Down Expand Up @@ -2418,14 +2419,15 @@
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxLAFrameInfo ,InterCost ,20 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxLAFrameInfo ,DependencyCost ,24 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxLAFrameInfo ,Layer ,28 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxLAFrameInfo ,EstimatedRate ,80 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxLAFrameInfo ,EstimatedRate ,76 )

MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,Header ,0 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,NumAlloc ,48 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,NumStream ,50 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,NumFrame ,52 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,FrameStat ,56 )
MSDK_STATIC_ASSERT_STRUCT_OFFSET(mfxExtLAFrameStatistics ,OutSurface ,60 )

#endif
#endif //defined (__MFXLA_H__)

Expand Down
8 changes: 7 additions & 1 deletion builder/ConfTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ if (ENABLE_STAT)
endif()

option( MFX_ENABLE_KERNELS "Build with advanced media kernels support?" ON )
option( MFX_ENABLE_SW_FALLBACK "Enabled software fallback for codecs?" ON )
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
option( MFX_ENABLE_SW_FALLBACK "Enabled software fallback for codecs?" ON )
else ()
# disable SW fallback on ia32 by default (no ipp p8 yet)
option( MFX_ENABLE_SW_FALLBACK "Enabled software fallback for codecs?" OFF )
endif()


cmake_dependent_option(
BUILD_KERNELS "Rebuild kernels (shaders)?" OFF
Expand Down
15 changes: 13 additions & 2 deletions contrib/ipp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,20 @@ include_directories (

set( SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" )
# Optimized for processors with Intel SSE4.2
set( defs "-D_Y8 -D_ARCH_EM64T" )

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set( defs "-D_Y8 -D_ARCH_EM64T" )
else ()
set( defs "-D_P8 -D_ARCH_IA32" )
endif()

set( sources "" )
file( GLOB_RECURSE srcs "${SRC_DIR}/*.c" "${SRC_DIR}/asm_intel64/*.s" )
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
file( GLOB_RECURSE srcs "${SRC_DIR}/*.c" "${SRC_DIR}/asm_intel64/*.s" )
else()
#file( GLOB_RECURSE srcs "${SRC_DIR}/*.c" "${SRC_DIR}/asm_ia32/*.s" )
endif()

list( APPEND sources ${srcs})
enable_language(C ASM)
set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
Expand Down
2 changes: 1 addition & 1 deletion samples/sample_common/src/vaapi_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ VAStatus CLibVA::AcquireVASurface(
}

AcquireCtx* ctx;
unsigned long handle=0;
uintptr_t handle=0;
VAStatus va_res;
VASurfaceAttrib attribs[2];
VASurfaceAttribExternalBuffers extsrf;
Expand Down

0 comments on commit 51dffc4

Please sign in to comment.