[FFmpeg-cvslog] swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()
Michael Niedermayer
git at videolan.org
Fri Nov 28 20:02:35 CET 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 20 00:43:45 2014 +0100| [51c32a535bb40c8e978a7bc06ad6eccb5cebf2a0] | committer: Michael Niedermayer
swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()
This avoids out of array accesses
Should fix Ticket3451
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4388e78a0f022c8572996f9ab568a39b5f716f9d)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51c32a535bb40c8e978a7bc06ad6eccb5cebf2a0
---
libswscale/x86/rgb2rgb_template.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c
index d684b70..004621a 100644
--- a/libswscale/x86/rgb2rgb_template.c
+++ b/libswscale/x86/rgb2rgb_template.c
@@ -1623,6 +1623,16 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
#define BGR2V_IDX "16*4+16*34"
int y;
const x86_reg chromWidth= width>>1;
+
+ if (height > 2) {
+ ff_rgb24toyv12_c(src, ydst, udst, vdst, width, 2, lumStride, chromStride, srcStride, rgb2yuv);
+ src += 2*srcStride;
+ ydst += 2*lumStride;
+ udst += chromStride;
+ vdst += chromStride;
+ height -= 2;
+ }
+
for (y=0; y<height-2; y+=2) {
int i;
for (i=0; i<2; i++) {
More information about the ffmpeg-cvslog
mailing list