aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-06 13:29:37 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-12 12:45:38 +0200
commit0a7068fa5ddaa708d26c27eb17347985d6f1b36d (patch)
treee528b7a36cd24761b71094864262195a1e11a8b5 /libswscale/swscale.c
parentb7f1010c8fce09096057528f7cd29589ea1ae7df (diff)
downloadffmpeg-0a7068fa5ddaa708d26c27eb17347985d6f1b36d.tar.gz
sws: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 4c74e18de3..3f54e4dc55 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -65,10 +65,11 @@ static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW,
const uint8_t *_src, const int16_t *filter,
const int32_t *filterPos, int filterSize)
{
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat);
int i;
int32_t *dst = (int32_t *) _dst;
const uint16_t *src = (const uint16_t *) _src;
- int bits = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
+ int bits = desc->comp[0].depth_minus1;
int sh = bits - 4;
for (i = 0; i < dstW; i++) {
@@ -88,9 +89,10 @@ static void hScale16To15_c(SwsContext *c, int16_t *dst, int dstW,
const uint8_t *_src, const int16_t *filter,
const int32_t *filterPos, int filterSize)
{
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->srcFormat);
int i;
const uint16_t *src = (const uint16_t *) _src;
- int sh = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
+ int sh = desc->comp[0].depth_minus1;
for (i = 0; i < dstW; i++) {
int j;