diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-10-20 11:53:22 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-10-20 12:06:45 +0200 |
commit | 935ecfb002385697d57573975f95c401eba68d64 (patch) | |
tree | b11ba5d75640b4bc0b7c8a324fd491074ef1b30f | |
parent | 7bc533c41b40cde40c1b3bc62e07d876a3387818 (diff) | |
download | ffmpeg-935ecfb002385697d57573975f95c401eba68d64.tar.gz |
examples/scaling_video: remove unnecessary intermediary variable in fill_yuv_frame()
-rw-r--r-- | doc/examples/scaling_video.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/examples/scaling_video.c b/doc/examples/scaling_video.c index e380131edd..660be2f9b4 100644 --- a/doc/examples/scaling_video.c +++ b/doc/examples/scaling_video.c @@ -32,20 +32,18 @@ static void fill_yuv_image(uint8_t *data[4], int linesize[4], int width, int height, int frame_index) { - int x, y, i; - - i = frame_index; + int x, y; /* Y */ for (y = 0; y < height; y++) for (x = 0; x < width; x++) - data[0][y * linesize[0] + x] = x + y + i * 3; + data[0][y * linesize[0] + x] = x + y + frame_index * 3; /* Cb and Cr */ for (y = 0; y < height / 2; y++) { for (x = 0; x < width / 2; x++) { - data[1][y * linesize[1] + x] = 128 + y + i * 2; - data[2][y * linesize[2] + x] = 64 + x + i * 5; + data[1][y * linesize[1] + x] = 128 + y + frame_index * 2; + data[2][y * linesize[2] + x] = 64 + x + frame_index * 5; } } } |