diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-10 15:58:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-11 03:51:46 +0200 |
commit | 29fb1b5a06752d2baf10dd363ece1f1b3c964833 (patch) | |
tree | 262726013776f0190038685f915da80ea6fd990d /libswscale | |
parent | c59f9a68e2eda847538df367b5b9e7256247ef78 (diff) | |
download | ffmpeg-streaming-29fb1b5a06752d2baf10dd363ece1f1b3c964833.zip ffmpeg-streaming-29fb1b5a06752d2baf10dd363ece1f1b3c964833.tar.gz |
sws: Fix chroma init for 32bit buffers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 00bd89f..9d373cc 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -778,7 +778,7 @@ SwsContext *sws_alloc_context(void) int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) { - int i; + int i, j; int usesVFilter, usesHFilter; int unscaled; SwsFilter dummyFilter= {NULL, NULL, NULL, NULL}; @@ -1062,7 +1062,13 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) //try to avoid drawing green stuff between the right end and the stride end for (i=0; i<c->vChrBufSize; i++) - memset(c->chrUPixBuf[i], 64, dst_stride*2+1); + if(av_pix_fmt_descriptors[c->dstFormat].comp[0].depth_minus1 == 15){ + av_assert0(c->scalingBpp == 16); + for(j=0; j<dst_stride/2+1; j++) + ((int32_t*)(c->chrUPixBuf[i]))[j] = 1<<18; + } else + for(j=0; j<dst_stride+1; j++) + ((int16_t*)(c->chrUPixBuf[i]))[j] = 1<<14; assert(c->chrDstH <= dstH); |