[FFmpeg-cvslog] sws: do not use av_pix_fmt_descriptors directly
Paul B Mahol
git at videolan.org
Fri Oct 12 18:59:44 CEST 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Oct 12 16:57:04 2012 +0000| [a291345b1e82e3c0b108c5b4041f668b223b58a5] | committer: Paul B Mahol
sws: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a291345b1e82e3c0b108c5b4041f668b223b58a5
---
libswscale/swscale.c | 4 ++--
libswscale/utils.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 8aab60a..f7dc728 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -73,7 +73,7 @@ static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW,
int bits = desc->comp[0].depth_minus1;
int sh = bits - 4;
- if((isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)
+ if((isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8) && desc->comp[0].depth_minus1<15)
sh= 9;
for (i = 0; i < dstW; i++) {
@@ -99,7 +99,7 @@ static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW,
int sh = desc->comp[0].depth_minus1;
if(sh<15)
- sh= isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
+ sh= isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8 ? 13 : desc->comp[0].depth_minus1;
for (i = 0; i < dstW; i++) {
int j;
diff --git a/libswscale/utils.c b/libswscale/utils.c
index f9797b1..3310d78 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1234,7 +1234,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
// try to avoid drawing green stuff between the right end and the stride end
for (i = 0; i < c->vChrBufSize; i++)
- if(av_pix_fmt_descriptors[c->dstFormat].comp[0].depth_minus1 == 15){
+ if(desc_dst->comp[0].depth_minus1 == 15){
av_assert0(c->dstBpc > 14);
for(j=0; j<dst_stride/2+1; j++)
((int32_t*)(c->chrUPixBuf[i]))[j] = 1<<18;
More information about the ffmpeg-cvslog
mailing list