You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
utvideoenc: optimize and simplify mangle_rgb_planes
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -196,16 +196,13 @@ static void mangle_rgb_planes(uint8_t *src, int step, int stride, int width,
|
|||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
uint8_t r, g, b;
|
unsigned g;
|
||||||
|
|
||||||
for (j = 0; j < height; j++) {
|
for (j = 0; j < height; j++) {
|
||||||
for (i = 0; i < width * step; i += step) {
|
for (i = 0; i < width * step; i += step) {
|
||||||
r = src[i];
|
g = src[i + 1] + 0x80;
|
||||||
g = src[i + 1];
|
src[i] -= g;
|
||||||
b = src[i + 2];
|
src[i + 2] -= g;
|
||||||
|
|
||||||
src[i] = r - g + 0x80;
|
|
||||||
src[i + 2] = b - g + 0x80;
|
|
||||||
}
|
}
|
||||||
src += stride;
|
src += stride;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user