summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 15:43:03 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-08 16:35:28 +0200
commit151aa2ebff514a9d150a2d3a7b92be1dcc46df36 (patch)
tree866bd99edecd778aee4cd8eb5f34977d0c82a27d /libswscale/swscale_internal.h
parentf53569a93f853057d4852601b547a1d9c57613b6 (diff)
parent2268db2cd052674fde55c7d48b7a5098ce89b4ba (diff)
Merge commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba'
* commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba': lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 608cc3e6e9..9676d463d1 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -651,14 +651,14 @@ static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
- return desc->comp[0].depth_minus1 == 15;
+ return desc->comp[0].depth == 16;
}
static av_always_inline int is9_OR_10BPS(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
- return desc->comp[0].depth_minus1 >= 8 && desc->comp[0].depth_minus1 <= 13;
+ return desc->comp[0].depth >= 9 && desc->comp[0].depth <= 14;
}
#define isNBPS(x) is9_OR_10BPS(x)
@@ -928,7 +928,7 @@ static inline void fillPlane16(uint8_t *plane, int stride, int width, int height
{
int i, j;
uint8_t *ptr = plane + stride * y;
- int v = alpha ? 0xFFFF>>(15-bits) : (1<<bits);
+ int v = alpha ? 0xFFFF>>(16-bits) : (1<<(bits-1));
for (i = 0; i < height; i++) {
#define FILL(wfunc) \
for (j = 0; j < width; j++) {\