mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avcodec/ivi: Factor width dereference out of the loops in ivi_output_plane()
396078 -> 268468 dezicycles Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
82920bf494
commit
bf97d11b08
@ -914,13 +914,14 @@ static void ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, ptrdiff_t dst_pi
|
|||||||
|
|
||||||
for (y = 0; y < plane->height; y++) {
|
for (y = 0; y < plane->height; y++) {
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (x = 0; x < plane->width; x++) {
|
int w = plane->width;
|
||||||
|
for (x = 0; x < w; x++) {
|
||||||
int t = src[x] + 128;
|
int t = src[x] + 128;
|
||||||
dst[x] = t;
|
dst[x] = t;
|
||||||
m |= t;
|
m |= t;
|
||||||
}
|
}
|
||||||
if (m & ~255)
|
if (m & ~255)
|
||||||
for (x = 0; x < plane->width; x++)
|
for (x = 0; x < w; x++)
|
||||||
dst[x] = av_clip_uint8(src[x] + 128);
|
dst[x] = av_clip_uint8(src[x] + 128);
|
||||||
src += pitch;
|
src += pitch;
|
||||||
dst += dst_pitch;
|
dst += dst_pitch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user