summaryrefslogtreecommitdiff
path: root/libavcodec/h264pred.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-08-11 02:21:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-08-11 02:21:33 +0000
commitd1d10e9125153d0000be34c78c92c54d59d38108 (patch)
treed73d40d98ae8acaa035d8bfbab06cb602fcb41b5 /libavcodec/h264pred.c
parent697c7cd44be1ecd351bc790fbcd3a46449d63f7d (diff)
Support MBAFF + constrained intra prediction.
(no i would not have tried to implement this had i known what mess it is) fixes at least: CAMACI3_Sony_C Originally committed as revision 14687 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264pred.c')
-rw-r--r--libavcodec/h264pred.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
index b3e84b72aa..0b7394a03a 100644
--- a/libavcodec/h264pred.c
+++ b/libavcodec/h264pred.c
@@ -690,6 +690,29 @@ static void pred8x8_dc_c(uint8_t *src, int stride){
}
}
+//the following 4 function should not be optimized!
+static void pred8x8_mad_cow_dc_l0t(uint8_t *src, int stride){
+ pred8x8_top_dc_c(src, stride);
+ pred4x4_dc_c(src, NULL, stride);
+}
+
+static void pred8x8_mad_cow_dc_0lt(uint8_t *src, int stride){
+ pred8x8_dc_c(src, stride);
+ pred4x4_top_dc_c(src, NULL, stride);
+}
+
+static void pred8x8_mad_cow_dc_l00(uint8_t *src, int stride){
+ pred8x8_left_dc_c(src, stride);
+ pred4x4_128_dc_c(src + 4*stride , NULL, stride);
+ pred4x4_128_dc_c(src + 4*stride + 4, NULL, stride);
+}
+
+static void pred8x8_mad_cow_dc_0l0(uint8_t *src, int stride){
+ pred8x8_left_dc_c(src, stride);
+ pred4x4_128_dc_c(src , NULL, stride);
+ pred4x4_128_dc_c(src + 4, NULL, stride);
+}
+
static void pred8x8_dc_rv40_c(uint8_t *src, int stride){
int i;
int dc0=0;
@@ -1046,6 +1069,10 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id){
h->pred8x8[DC_PRED8x8 ]= pred8x8_dc_c;
h->pred8x8[LEFT_DC_PRED8x8]= pred8x8_left_dc_c;
h->pred8x8[TOP_DC_PRED8x8 ]= pred8x8_top_dc_c;
+ h->pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= pred8x8_mad_cow_dc_l0t;
+ h->pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= pred8x8_mad_cow_dc_0lt;
+ h->pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= pred8x8_mad_cow_dc_l00;
+ h->pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= pred8x8_mad_cow_dc_0l0;
}else{
h->pred8x8[DC_PRED8x8 ]= pred8x8_dc_rv40_c;
h->pred8x8[LEFT_DC_PRED8x8]= pred8x8_left_dc_rv40_c;