Skip to content

Commit 72a801d

Browse files
Revert "i965/drv: Pack some structs"
A future MR will properly clean up structs and pack them. This reverts commit c0673ad.
1 parent 7da890b commit 72a801d

11 files changed

+16
-65
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,3 @@ TAGS
3434
/src/intel_version.h
3535
/src/wayland-drm-client-protocol.h
3636
.VERSION*
37-
.vscode/c_cpp_properties.json
38-
.vscode/settings.json

src/i965_avc_sw_scoreboard.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/i965_decoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct gen_frame_store {
6666
6767
This is only used for H.264 decoding on platforms before Haswell */
6868
uint64_t ref_age;
69-
} __attribute__((packed));
69+
};
7070

7171
typedef struct gen_frame_store_context GenFrameStoreContext;
7272
struct gen_frame_store_context {

src/i965_drv_video.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ struct object_surface {
397397
VAGenericID wrapper_surface;
398398

399399
int exported_primefd;
400-
} __attribute__((packed));
400+
};
401401

402402
struct object_buffer {
403403
struct object_base base;
@@ -413,15 +413,15 @@ struct object_buffer {
413413

414414
VAGenericID wrapper_buffer;
415415
VAContextID context_id;
416-
} __attribute__((packed));
416+
};
417417

418418
struct object_image {
419419
struct object_base base;
420420
VAImage image;
421421
dri_bo *bo;
422422
unsigned int *palette;
423423
VASurfaceID derived_surface;
424-
} __attribute__((packed));
424+
};
425425

426426
struct object_subpic {
427427
struct object_base base;
@@ -436,7 +436,7 @@ struct object_subpic {
436436
float global_alpha;
437437
dri_bo *bo;
438438
unsigned int flags;
439-
} __attribute__((packed));
439+
};
440440

441441
#define I965_RING_NULL 0
442442
#define I965_RING_BSD 1
@@ -446,7 +446,7 @@ struct object_subpic {
446446
struct i965_filter {
447447
VAProcFilterType type;
448448
int ring;
449-
} __attribute__((packed));
449+
};
450450

451451
struct i965_driver_data;
452452

src/i965_encoder_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ struct generic_enc_codec_state {
480480
uint32_t min_delta_qp;
481481
struct intel_roi roi[INTEL_ROI_NUM];
482482

483-
} __attribute__((packed));
483+
};
484484

485485
/*
486486
by now VME and PAK use the same context. it will bind the ctx according to the codec and platform, also vdenc and non-vdenc

src/i965_fourcc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
typedef struct {
4848
uint8_t plane; /* the plane which the pixel belongs to */
4949
uint8_t offset; /* bits offset within a macro-pixel for packed YUV formats or pixel for other formats in the plane */
50-
} __attribute__((packed)) i965_component_info;
50+
} i965_component_info;
5151

5252
typedef struct {
5353
uint32_t fourcc; /* fourcc */
@@ -65,7 +65,7 @@ typedef struct {
6565
* I, A (2 components) for indexed formats
6666
*/
6767
i965_component_info components[I965_MAX_COMONENTS];
68-
} __attribute__((packed)) i965_fourcc_info;
68+
} i965_fourcc_info;
6969

7070
extern const i965_fourcc_info *get_fourcc_info(unsigned int);
7171

src/i965_media.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ struct i965_media_context {
9090
void (*media_states_setup)(VADriverContextP ctx, struct decode_state *decode_state, struct i965_media_context *media_context);
9191
void (*media_objects)(VADriverContextP ctx, struct decode_state *decode_state, struct i965_media_context *media_context);
9292
void (*free_private_context)(void **data);
93-
} __attribute__((packed));
93+
};
9494

9595
#endif /* _I965_MEDIA_H_ */

src/i965_media_h264.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
#include "i965_media_h264.h"
1414
#include "i965_decoder_utils.h"
1515

16-
#if defined(I965_ENABLE_CTG_H264)
17-
#include "i965_avc_sw_scoreboard.h"
18-
#endif
19-
2016
enum {
2117
INTRA_16X16 = 0,
2218
INTRA_8X8,
@@ -709,12 +705,6 @@ i965_media_h264_objects(VADriverContextP ctx,
709705
assert(media_context->private_context);
710706
i965_h264_context = (struct i965_h264_context *)media_context->private_context;
711707

712-
#if defined(I965_ENABLE_CTG_H264)
713-
/* issue OBJECT command for software scoreboard befere MC kernels */
714-
if (i965_h264_context->is_g4x_context)
715-
i965_avc_sw_scoreboard_objects(ctx, i965_h264_context);
716-
#endif
717-
718708
dri_bo_map(i965_h264_context->avc_it_command_mb_info.bo, True);
719709
assert(i965_h264_context->avc_it_command_mb_info.bo->virtual);
720710
object_command = i965_h264_context->avc_it_command_mb_info.bo->virtual;

src/i965_media_h264.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ struct i965_h264_context {
4545
int i_flag;
4646
} picture;
4747

48-
unsigned int is_g4x_context : 1;
49-
unsigned int enable_avc_ildb : 1;
50-
unsigned int use_avc_hw_scoreboard : 1;
51-
unsigned int use_hw_w128 : 1;
48+
int enable_avc_ildb;
49+
int use_avc_hw_scoreboard;
5250

51+
int use_hw_w128;
5352
unsigned int weight128_luma_l0;
5453
unsigned int weight128_luma_l1;
5554
unsigned int weight128_chroma_l0;
@@ -66,7 +65,7 @@ struct i965_h264_context {
6665

6766
struct i965_kernel avc_kernels[NUM_H264_AVC_KERNELS];
6867
struct intel_batchbuffer *batch;
69-
} __attribute__((packed));
68+
};
7069

7170
void i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_state, struct i965_media_context *media_context);
7271
void i965_media_h264_dec_context_init(VADriverContextP ctx, struct i965_media_context *media_context);

src/i965_media_mpeg2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct i965_mpeg2_context {
4444
struct i965_kernel vld_kernels[NUM_MPEG2_VLD_KERNELS];
4545
VAIQMatrixBufferMPEG2 iq_matrix;
4646
int wa_slice_vertical_position;
47-
} __attribute__((packed));
47+
};
4848

4949
void i965_media_mpeg2_decode_init(VADriverContextP ctx, struct decode_state * decode_state, struct i965_media_context *media_context);
5050
void i965_media_mpeg2_dec_context_init(VADriverContextP ctx, struct i965_media_context *media_context);

src/i965_render.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct i965_render_state {
120120
const VARectangle *src_rec,
121121
const VARectangle *dst_rect);
122122
void (*render_terminate)(VADriverContextP ctx);
123-
} __attribute__((packed));
123+
};
124124

125125
bool i965_render_init(VADriverContextP ctx);
126126
void i965_render_terminate(VADriverContextP ctx);

0 commit comments

Comments
 (0)