FFmpeg
Macros
windows2linux.h File Reference
#include <stdlib.h>
#include <string.h>
#include "basicDataTypeConversions.h"

Go to the source code of this file.

Macros

#define __stdcall
 
#define __cdecl
 
#define noreturn
 
#define __declspec(x)
 
#define STDAPI   extern "C" HRESULT
 
#define STDMETHODIMP   HRESULT __stdcall
 
#define STDMETHODIMP_(x)   x __stdcall
 
#define STDMETHOD(x)   virtual HRESULT x
 
#define STDMETHOD_(a, x)   virtual a x
 
#define TRUE   true
 
#define FALSE   false
 
#define S_OK   (0x00000000)
 
#define S_FALSE   (0x00000001)
 
#define E_NOINTERFACE   (0X80004002)
 
#define E_POINTER   (0x80004003)
 
#define E_FAIL   (0x80004005)
 
#define E_OUTOFMEMORY   (0x8007000E)
 
#define INVALID_HANDLE_VALUE   ((HANDLE)((LONG_PTR)-1))
 
#define FAILED(hr)   ((hr) & 0x80000000)
 
#define SUCCEEDED(hr)   (!FAILED(hr))
 
#define MAKEDWORD(a, b, c, d)   (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
 
#define MAKEWORD(a, b)   (((a) << 8) | (b))
 
#define lstrlen   strlen
 
#define lstrcpy   strcpy
 
#define lstrcmpi   strcasecmp
 
#define _stricmp   strcasecmp
 
#define InterlockedIncrement(x)   __sync_fetch_and_add((x), 1)
 
#define InterlockedDecrement(x)   __sync_fetch_and_sub((x), 1)
 
#define InterlockedCompareExchange(x, y, z)   __sync_val_compare_and_swap(x,z,y)
 
#define UInt32x32To64(a, b)   ( (uint64_t) ( ((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)) ) )
 
#define Int64ShrlMod32(a, b)   ( (uint64_t) ( (uint64_t)(a) >> (b) ) )
 
#define Int32x32To64(a, b)   ((__int64)(((__int64)((long)(a))) * ((long)(b))))
 
#define MulDiv(nNumber, nNumerator, nDenominator)   (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator))
 

Macro Definition Documentation

◆ __stdcall

#define __stdcall

Definition at line 21 of file windows2linux.h.

◆ __cdecl

#define __cdecl

Definition at line 22 of file windows2linux.h.

◆ noreturn

#define noreturn

Definition at line 23 of file windows2linux.h.

◆ __declspec

#define __declspec (   x)

Definition at line 24 of file windows2linux.h.

◆ STDAPI

#define STDAPI   extern "C" HRESULT

Definition at line 25 of file windows2linux.h.

◆ STDMETHODIMP

#define STDMETHODIMP   HRESULT __stdcall

Definition at line 26 of file windows2linux.h.

◆ STDMETHODIMP_

#define STDMETHODIMP_ (   x)    x __stdcall

Definition at line 27 of file windows2linux.h.

◆ STDMETHOD

#define STDMETHOD (   x)    virtual HRESULT x

Definition at line 29 of file windows2linux.h.

◆ STDMETHOD_

#define STDMETHOD_ (   a,
 
)    virtual a x

Definition at line 30 of file windows2linux.h.

◆ TRUE

#define TRUE   true

Definition at line 33 of file windows2linux.h.

◆ FALSE

#define FALSE   false

Definition at line 37 of file windows2linux.h.

◆ S_OK

#define S_OK   (0x00000000)

Definition at line 40 of file windows2linux.h.

◆ S_FALSE

#define S_FALSE   (0x00000001)

Definition at line 41 of file windows2linux.h.

◆ E_NOINTERFACE

#define E_NOINTERFACE   (0X80004002)

Definition at line 42 of file windows2linux.h.

◆ E_POINTER

#define E_POINTER   (0x80004003)

Definition at line 43 of file windows2linux.h.

◆ E_FAIL

#define E_FAIL   (0x80004005)

Definition at line 44 of file windows2linux.h.

◆ E_OUTOFMEMORY

#define E_OUTOFMEMORY   (0x8007000E)

Definition at line 45 of file windows2linux.h.

◆ INVALID_HANDLE_VALUE

#define INVALID_HANDLE_VALUE   ((HANDLE)((LONG_PTR)-1))

Definition at line 47 of file windows2linux.h.

◆ FAILED

#define FAILED (   hr)    ((hr) & 0x80000000)

Definition at line 48 of file windows2linux.h.

◆ SUCCEEDED

#define SUCCEEDED (   hr)    (!FAILED(hr))

Definition at line 49 of file windows2linux.h.

◆ MAKEDWORD

#define MAKEDWORD (   a,
  b,
  c,
 
)    (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))

Definition at line 55 of file windows2linux.h.

◆ MAKEWORD

#define MAKEWORD (   a,
  b 
)    (((a) << 8) | (b))

Definition at line 56 of file windows2linux.h.

◆ lstrlen

#define lstrlen   strlen

Definition at line 58 of file windows2linux.h.

◆ lstrcpy

#define lstrcpy   strcpy

Definition at line 59 of file windows2linux.h.

◆ lstrcmpi

#define lstrcmpi   strcasecmp

Definition at line 60 of file windows2linux.h.

◆ _stricmp

#define _stricmp   strcasecmp

Definition at line 61 of file windows2linux.h.

◆ InterlockedIncrement

#define InterlockedIncrement (   x)    __sync_fetch_and_add((x), 1)

Definition at line 62 of file windows2linux.h.

◆ InterlockedDecrement

#define InterlockedDecrement (   x)    __sync_fetch_and_sub((x), 1)

Definition at line 63 of file windows2linux.h.

◆ InterlockedCompareExchange

#define InterlockedCompareExchange (   x,
  y,
 
)    __sync_val_compare_and_swap(x,z,y)

Definition at line 65 of file windows2linux.h.

◆ UInt32x32To64

#define UInt32x32To64 (   a,
  b 
)    ( (uint64_t) ( ((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)) ) )

Definition at line 67 of file windows2linux.h.

◆ Int64ShrlMod32

#define Int64ShrlMod32 (   a,
  b 
)    ( (uint64_t) ( (uint64_t)(a) >> (b) ) )

Definition at line 68 of file windows2linux.h.

◆ Int32x32To64

#define Int32x32To64 (   a,
  b 
)    ((__int64)(((__int64)((long)(a))) * ((long)(b))))

Definition at line 69 of file windows2linux.h.

◆ MulDiv

#define MulDiv (   nNumber,
  nNumerator,
  nDenominator 
)    (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator))

Definition at line 71 of file windows2linux.h.