Skip to content

Commit

Permalink
Merge branch 'figure'
Browse files Browse the repository at this point in the history
  • Loading branch information
ePi5131 committed Jul 6, 2023
2 parents 6531402 + 77094a2 commit 2583d78
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions patch/patch_fast_create_figure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@
#include "patch_fast_create_figure.hpp"
#ifdef PATCH_SWITCH_FAST_CREATE_FIGURE

#include "debug_log.hpp"

//#define PATCH_STOPWATCH
#include "stopwatch.hpp"

namespace patch::fast {
static stopwatch_mem sw;

void __cdecl CreateFigure_t::CreateFigure_circle(int thread_id, int thread_num, ExEdit::Filter* efp, ExEdit::FilterProcInfo* efpip) { // 73d20
auto& figure = *reinterpret_cast<CreateFigure_var*>(GLOBAL::exedit_base + OFS::ExEdit::CreateFigure_var_ptr);

int begin_thread = thread_id * (efpip->obj_h + 1 >> 1) / thread_num;
int end_thread = (thread_id + 1) * (efpip->obj_h + 1 >> 1) / thread_num;
int obj_half_w = efpip->obj_w + 1 >> 1;
ExEdit::PixelYCA yca = { figure.color_y, figure.color_cb, figure.color_cr, 0 };
int begin_thread = thread_id * ((efpip->obj_h + 1) >> 1) / thread_num;
int end_thread = (thread_id + 1) * ((efpip->obj_h + 1) >> 1) / thread_num;
int obj_half_w = (efpip->obj_w + 1) >> 1;
ExEdit::PixelYCA yca = { figure.color_y, figure.color_cb, figure.color_cr, 0 };

int inner = 0;
int sizesq = figure.size * figure.size;
Expand Down Expand Up @@ -171,11 +168,11 @@ namespace patch::fast {
}


int thread_begin = thread_id * efpip->obj_h / thread_num;
int thread_end = (thread_id + 1) * efpip->obj_h / thread_num;
int obj_half_w = efpip->obj_w + 1 >> 1;
int a;
ExEdit::PixelYCA yca = { figure.color_y, figure.color_cb, figure.color_cr, 0 };
int thread_begin = thread_id * efpip->obj_h / thread_num;
int thread_end = (thread_id + 1) * efpip->obj_h / thread_num;
int obj_half_w = (efpip->obj_w + 1) >> 1;
int a;
ExEdit::PixelYCA yca = { figure.color_y, figure.color_cb, figure.color_cr, 0 };

double angle_rate = (double)figure.type / 6.283185307179586;
int yy = (thread_begin * 2 - efpip->obj_h) + 1;
Expand Down

0 comments on commit 2583d78

Please sign in to comment.