Skip to content

Commit

Permalink
Updated jpgd.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhu1-V committed Nov 10, 2020
1 parent 060c222 commit 5066b53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thirdparty/jpeg-compressor/jpgd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ namespace jpgd {
int row = m_max_mcu_y_size - m_mcu_lines_left;
uint8* d0 = m_pScan_line_0;

const int half_image_x_size = (m_image_x_size >> 1) - 1;
const int half_image_x_size = ((m_image_x_size == 1)) ? 0 : ((m_image_x_size >> 1) - 1);
const int row_x8 = row * 8;

for (int x = 0; x < m_image_x_size; x++)
Expand Down Expand Up @@ -1762,7 +1762,7 @@ namespace jpgd {
int y = m_image_y_size - m_total_lines_left;
int row = y & 15;

const int half_image_y_size = (m_image_y_size >> 1) - 1;
const int half_image_y_size = ((m_image_y_size == 1)) ? 0 : ((m_image_y_size >> 1) - 1);

uint8* d0 = m_pScan_line_0;

Expand Down Expand Up @@ -1891,7 +1891,7 @@ namespace jpgd {
int y = m_image_y_size - m_total_lines_left;
int row = y & 15;

const int half_image_y_size = (m_image_y_size >> 1) - 1;
const int half_image_y_size = (m_image_y_size == 1) ? 0 : (m_image_y_size >> 1) - 1;

uint8* d0 = m_pScan_line_0;

Expand All @@ -1915,7 +1915,7 @@ namespace jpgd {
const int y0_base = (c_y0 & 7) * 8 + 256;
const int y1_base = (c_y1 & 7) * 8 + 256;

const int half_image_x_size = (m_image_x_size >> 1) - 1;
const int half_image_x_size = ( m_image_x_size == 1 ) ? 0 : ((m_image_x_size >> 1) - 1);

static const uint8_t s_muls[2][2][4] =
{
Expand Down

0 comments on commit 5066b53

Please sign in to comment.