Commit 4388e78a authored by Michael Niedermayer's avatar 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0dba982b
...@@ -1634,6 +1634,16 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ ...@@ -1634,6 +1634,16 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
#define BGR2V_IDX "16*4+16*34" #define BGR2V_IDX "16*4+16*34"
int y; int y;
const x86_reg chromWidth= width>>1; 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) { for (y=0; y<height-2; y+=2) {
int i; int i;
for (i=0; i<2; i++) { for (i=0; i<2; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment