summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-10 15:58:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-11 03:51:46 +0200
commit29fb1b5a06752d2baf10dd363ece1f1b3c964833 (patch)
tree262726013776f0190038685f915da80ea6fd990d /libswscale
parentc59f9a68e2eda847538df367b5b9e7256247ef78 (diff)
downloadffmpeg-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.c10
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);
OpenPOWER on IntegriCloud