summaryrefslogtreecommitdiff
path: root/libavcodec/h264chroma.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-11 13:52:38 -0800
committerMartin Storsjö <martin@martin.st>2013-02-19 22:33:19 +0200
commite5ffffe48d20642acc079166f0fa7d93a6a9f594 (patch)
treef4dda8d81447d001926bde2bc83a39d7f175c062 /libavcodec/h264chroma.c
parent0c0828ecc565a617ed50cd5f682a9dd635a9fbc1 (diff)
h264chroma: Remove duplicate 9/10 bit functions
These functions do the same thing in 16 bit space and don't need any depth specific clipping. Signed-off-by: Martin Storsjö <martin@martin.st>
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 2bd2df3b56..463d6c454f 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)