Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
311e5e3a
Commit
311e5e3a
authored
May 01, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use macro for __attribute__((packed))
parent
00650921
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
30 deletions
+14
-30
include/vlc_codecs.h
include/vlc_codecs.h
+10
-30
include/vlc_common.h
include/vlc_common.h
+4
-0
No files found.
include/vlc_codecs.h
View file @
311e5e3a
...
@@ -44,9 +44,7 @@ typedef struct _GUID
...
@@ -44,9 +44,7 @@ typedef struct _GUID
#ifndef _WAVEFORMATEX_
#ifndef _WAVEFORMATEX_
#define _WAVEFORMATEX_
#define _WAVEFORMATEX_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
_WAVEFORMATEX
{
_WAVEFORMATEX
{
uint16_t
wFormatTag
;
uint16_t
wFormatTag
;
uint16_t
nChannels
;
uint16_t
nChannels
;
...
@@ -61,9 +59,7 @@ _WAVEFORMATEX {
...
@@ -61,9 +59,7 @@ _WAVEFORMATEX {
#ifndef _WAVEFORMATEXTENSIBLE_
#ifndef _WAVEFORMATEXTENSIBLE_
#define _WAVEFORMATEXTENSIBLE_
#define _WAVEFORMATEXTENSIBLE_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
_WAVEFORMATEXTENSIBLE
{
_WAVEFORMATEXTENSIBLE
{
WAVEFORMATEX
Format
;
WAVEFORMATEX
Format
;
union
{
union
{
...
@@ -79,9 +75,7 @@ _WAVEFORMATEXTENSIBLE {
...
@@ -79,9 +75,7 @@ _WAVEFORMATEXTENSIBLE {
#ifndef _WAVEHEADER_
#ifndef _WAVEHEADER_
#define _WAVEHEADER_
#define _WAVEHEADER_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
_WAVEHEADER
{
_WAVEHEADER
{
uint32_t
MainChunkID
;
uint32_t
MainChunkID
;
uint32_t
Length
;
uint32_t
Length
;
...
@@ -102,9 +96,7 @@ _WAVEHEADER {
...
@@ -102,9 +96,7 @@ _WAVEHEADER {
#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
#define _BITMAPINFOHEADER_
#define _BITMAPINFOHEADER_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
uint32_t
biSize
;
uint32_t
biSize
;
uint32_t
biWidth
;
uint32_t
biWidth
;
...
@@ -120,9 +112,7 @@ typedef struct
...
@@ -120,9 +112,7 @@ typedef struct
}
BITMAPINFOHEADER
,
*
PBITMAPINFOHEADER
,
*
LPBITMAPINFOHEADER
;
}
BITMAPINFOHEADER
,
*
PBITMAPINFOHEADER
,
*
LPBITMAPINFOHEADER
;
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
BITMAPINFOHEADER
bmiHeader
;
BITMAPINFOHEADER
bmiHeader
;
int
bmiColors
[
1
];
int
bmiColors
[
1
];
...
@@ -132,9 +122,7 @@ typedef struct
...
@@ -132,9 +122,7 @@ typedef struct
#ifndef _RECT32_
#ifndef _RECT32_
#define _RECT32_
#define _RECT32_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
int
left
,
top
,
right
,
bottom
;
int
left
,
top
,
right
,
bottom
;
}
RECT32
;
}
RECT32
;
...
@@ -148,9 +136,7 @@ typedef int64_t REFERENCE_TIME;
...
@@ -148,9 +136,7 @@ typedef int64_t REFERENCE_TIME;
#ifndef _VIDEOINFOHEADER_
#ifndef _VIDEOINFOHEADER_
#define _VIDEOINFOHEADER_
#define _VIDEOINFOHEADER_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
RECT32
rcSource
;
RECT32
rcSource
;
RECT32
rcTarget
;
RECT32
rcTarget
;
...
@@ -164,9 +150,7 @@ typedef struct
...
@@ -164,9 +150,7 @@ typedef struct
#ifndef _RGBQUAD_
#ifndef _RGBQUAD_
#define _RGBQUAD_
#define _RGBQUAD_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
uint8_t
rgbBlue
;
uint8_t
rgbBlue
;
uint8_t
rgbGreen
;
uint8_t
rgbGreen
;
...
@@ -178,9 +162,7 @@ typedef struct
...
@@ -178,9 +162,7 @@ typedef struct
#ifndef _TRUECOLORINFO_
#ifndef _TRUECOLORINFO_
#define _TRUECOLORINFO_
#define _TRUECOLORINFO_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
uint32_t
dwBitMasks
[
3
];
uint32_t
dwBitMasks
[
3
];
RGBQUAD1
bmiColors
[
256
];
RGBQUAD1
bmiColors
[
256
];
...
@@ -190,9 +172,7 @@ typedef struct
...
@@ -190,9 +172,7 @@ typedef struct
#ifndef _VIDEOINFO_
#ifndef _VIDEOINFO_
#define _VIDEOINFO_
#define _VIDEOINFO_
typedef
struct
typedef
struct
#ifdef HAVE_ATTRIBUTE_PACKED
ATTR_PACKED
__attribute__
((
__packed__
))
#endif
{
{
RECT32
rcSource
;
RECT32
rcSource
;
RECT32
rcTarget
;
RECT32
rcTarget
;
...
...
include/vlc_common.h
View file @
311e5e3a
...
@@ -780,6 +780,10 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
...
@@ -780,6 +780,10 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
# define ATTR_ALIGN(align)
# define ATTR_ALIGN(align)
#endif
#endif
#ifdef HAVE_ATTRIBUTE_PACKED
# define ATTR_PACKED __attribute__((__packed__))
#endif
/* */
/* */
#define VLC_UNUSED(x) (void)(x)
#define VLC_UNUSED(x) (void)(x)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment