Commit a1befa51 authored by Rupert Swarbrick's avatar Rupert Swarbrick
Browse files

Avoid Visual Studio compile error in loopfilter

If you have a structure, foo_t, with an alignment request then Visual
Studio won't allow you to declare a function

  void use_foo(foo_t x);

The reasoning is that x might be passed on the stack, and their ABI
doesn't allow them to guarantee that x is aligned appropriately. More
strangely, this isn't allowed either:

 void use_some_foos(foo_t x[10]);

This is functionally equivalent to:

 void use_windows_foos(foo_t *x);

(except that you can't tell how long the array should be from the
function signature).

Since Visual Studio is supposed to allow the latter form, use that
instead.

Change-Id: Icd449fc1058606fa7e48a6f791091bbb42a73b2c
parent e5442928
......@@ -3532,8 +3532,7 @@ static void av1_filter_block_plane_horz(
#endif // CONFIG_PARALLEL_DEBLOCKING
void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop,
struct macroblockd_plane *planes, int start, int stop,
#if CONFIG_LPF_SB
int col_start, int col_end,
#endif
......@@ -3774,9 +3773,10 @@ void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
#endif
}
void av1_loop_filter_data_reset(
LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) {
void av1_loop_filter_data_reset(LFWorkerData *lf_data,
YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
const struct macroblockd_plane *planes) {
lf_data->frame_buffer = frame_buffer;
lf_data->cm = cm;
lf_data->start = 0;
......
......@@ -154,9 +154,8 @@ void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
// Apply the loop filter to [start, stop) macro block rows in frame_buffer.
void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int col_start, int col_end,
int y_only);
struct macroblockd_plane *planes, int start, int stop,
int col_start, int col_end, int y_only);
void av1_loop_filter_sb_level_init(struct AV1Common *cm, int mi_row, int mi_col,
int lvl);
......@@ -171,8 +170,8 @@ void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
// Apply the loop filter to [start, stop) macro block rows in frame_buffer.
void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
struct macroblockd_plane planes[MAX_MB_PLANE],
int start, int stop, int y_only);
struct macroblockd_plane *planes, int start, int stop,
int y_only);
#endif // CONFIG_LPF_SB
typedef struct LoopFilterWorkerData {
......@@ -185,9 +184,10 @@ typedef struct LoopFilterWorkerData {
int y_only;
} LFWorkerData;
void av1_loop_filter_data_reset(
LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]);
void av1_loop_filter_data_reset(LFWorkerData *lf_data,
YV12_BUFFER_CONFIG *frame_buffer,
struct AV1Common *cm,
const struct macroblockd_plane *planes);
// Operates on the rows described by 'lf_data'.
int av1_loop_filter_worker(LFWorkerData *const lf_data, void *unused);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment