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
937937
938938 void 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)
939939 {
940− unsigned int i;
940+ int i;
941941 int temp;
942+ int width = dest_width;
942943
943944 (void) dest_pitch;
944945
945− for (i = 0; i < dest_width; i++)
946+ for (i = 0; i < width; i++)
946947 {
947948 temp = 8;
948949 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