History

gen_scalers: fix 64-bit integer promotion bug

i needs to be treated as signed to get the proper indexing on 64-bit platforms. This behavior was accidentally reverted when fixing an unsigned/signed comparison warning.

John Koleszar committed 16 years ago

Commit bbfeefc1 parent ec187151 file · +3 −2Browse files

Unified · Split

vpx_scale/generic/gen_scalers.c+3−2
@@ -937,12 +937,13 @@ void vp8cx_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pit · 936 unmodified lines
937 937
938void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width)938void vp8cx_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width)
939{939{
940 unsigned int i;940 int i;
941 int temp;941 int temp;
942 int width = dest_width;
942 943
943 (void) dest_pitch;944 (void) dest_pitch;
944 945
945 for (i = 0; i < dest_width; i++)946 for (i = 0; i < width; i++)
946 {947 {
947 temp = 8;948 temp = 8;
948 temp += source[i-(int)src_pitch] * 3;949 temp += source[i-(int)src_pitch] * 3;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t