History

bit_depth_template: use av_clip_uint8 over crop_tab.

This fixes some global out of array reads and wrong cliping. No speed difference meassurable under clang on i5 also all important code paths on all important platforms should use SIMD.

Michael Niedermayer committed 14 years ago

Commit 263bb6e1 parent e75518e1 file · +2 −2Browse files

Unified · Split

libavcodec/bit_depth_template.c+2−2
@@ -70,7 +70,7 @@ · 69 unmodified lines
7070 # define pixel4 uint32_t
7171 # define dctcoef int16_t
7272
73−# define INIT_CLIP uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
73+# define INIT_CLIP ;
7474 # define no_rnd_avg_pixel4 no_rnd_avg32
7575 # define rnd_avg_pixel4 rnd_avg32
7676 # define AV_RN2P AV_RN16
@@ -82,7 +82,7 @@ · 5 unmodified lines
8282 # define PIXEL_SPLAT_X4(x) ((x)*0x01010101U)
8383
8484 # define av_clip_pixel(a) av_clip_uint8(a)
85−# define CLIP(a) cm[a]
85+# define CLIP(a) av_clip_uint8(a)
8686 #endif
8787
8888 #define FUNC3(a, b, c) a ## _ ## b ## c

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