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

Showing the changes to libavcodec/bit_depth_template.c (1 of 1 file). Show all

Unified · Split

libavcodec/bit_depth_template.c+2−2
@@ -70,7 +70,7 @@ · 69 unmodified lines
70# define pixel4 uint32_t70# define pixel4 uint32_t
71# define dctcoef int16_t71# define dctcoef int16_t
72 72
73# define INIT_CLIP uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;73# define INIT_CLIP ;
74# define no_rnd_avg_pixel4 no_rnd_avg3274# define no_rnd_avg_pixel4 no_rnd_avg32
75# define rnd_avg_pixel4 rnd_avg3275# define rnd_avg_pixel4 rnd_avg32
76# define AV_RN2P AV_RN1676# define AV_RN2P AV_RN16
@@ -82,7 +82,7 @@ · 5 unmodified lines
82# define PIXEL_SPLAT_X4(x) ((x)*0x01010101U)82# define PIXEL_SPLAT_X4(x) ((x)*0x01010101U)
83 83
84# define av_clip_pixel(a) av_clip_uint8(a)84# define av_clip_pixel(a) av_clip_uint8(a)
85# define CLIP(a) cm[a]85# define CLIP(a) av_clip_uint8(a)
86#endif86#endif
87 87
88#define FUNC3(a, b, c) a ## _ ## b ## c88#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