aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264chroma.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-11 13:52:38 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-02-11 22:54:52 +0100
commit972771dcf27d4988a5d83afade989f7f9b938ee4 (patch)
treec6e92e89858303c671b6fab4edf38fec50f4cde7 /libavcodec/h264chroma.c
parent0aa1d848ece6120ecaa2a43c67fc8705ec6712c5 (diff)
downloadffmpeg-972771dcf27d4988a5d83afade989f7f9b938ee4.tar.gz
h264chroma: remove duplicate 9/10 bit functions.
Also use the resulting 16bpp functions for anything >8 and <=16, not just 9 and 10. This fixes 12 and 14bpp H264 support. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264chroma.c')
-rw-r--r--libavcodec/h264chroma.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libavcodec/h264chroma.c b/libavcodec/h264chroma.c
index 31004a597b..3b780a04e2 100644
--- a/libavcodec/h264chroma.c
+++ b/libavcodec/h264chroma.c
@@ -23,11 +23,7 @@
#include "h264chroma_template.c"
#undef BIT_DEPTH
-#define BIT_DEPTH 9
-#include "h264chroma_template.c"
-#undef BIT_DEPTH
-
-#define BIT_DEPTH 10
+#define BIT_DEPTH 16
#include "h264chroma_template.c"
#undef BIT_DEPTH
@@ -41,16 +37,10 @@
void ff_h264chroma_init(H264ChromaContext *c, int bit_depth)
{
- switch (bit_depth) {
- case 10:
- SET_CHROMA(10);
- break;
- case 9:
- SET_CHROMA(9);
- break;
- default:
+ if (bit_depth > 8 && bit_depth <= 16) {
+ SET_CHROMA(16);
+ } else {
SET_CHROMA(8);
- break;
}
if (ARCH_ARM)