优化
This commit is contained in:
parent
2ab8d6c2dc
commit
84b7b414f7
11
avs2bdnxml.c
11
avs2bdnxml.c
@ -1035,6 +1035,7 @@ int main (int argc, char *argv[])
|
||||
if (!min_split) {
|
||||
min_split = 1;
|
||||
}
|
||||
buffer_opt = parse_int(buffer_optimize, "buffer-opt", NULL);
|
||||
mark_forced = parse_int(mark_forced_string, "forced", NULL);
|
||||
|
||||
/* TODO: Sanity check video_format and frame_rate. */
|
||||
@ -1072,9 +1073,6 @@ int main (int argc, char *argv[])
|
||||
print_usage();
|
||||
return 1;
|
||||
}
|
||||
in_img = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char)); /* allocate + 16 for alignment, and + n * 16 for over read/write */
|
||||
old_img = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char)); /* see above */
|
||||
out_buf = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char));
|
||||
|
||||
/* Check minimum size */
|
||||
if (s_info->i_width < 8 || s_info->i_height < 8)
|
||||
@ -1083,14 +1081,15 @@ int main (int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
in_img = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char)); /* allocate + 16 for alignment, and + n * 16 for over read/write */
|
||||
old_img = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char)); /* see above */
|
||||
out_buf = calloc(s_info->i_width * s_info->i_height * 4 + 16 * 2, sizeof(char));
|
||||
|
||||
/* Align buffers */
|
||||
in_img = in_img + (short)(16 - ((long)in_img % 16));
|
||||
old_img = old_img + (short)(16 - ((long)old_img % 16));
|
||||
out_buf = out_buf + (short)(16 - ((long)out_buf % 16));
|
||||
|
||||
/* Set up buffer (non-)optimization */
|
||||
buffer_opt = parse_int(buffer_optimize, "buffer-opt", NULL);
|
||||
|
||||
pic.b = out_buf;
|
||||
pic.w = s_info->i_width;
|
||||
pic.h = s_info->i_height;
|
||||
|
Loading…
Reference in New Issue
Block a user