aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cavs.h
diff options
context:
space:
mode:
authorStefan Gehrer <stefan.gehrer@gmx.de>2007-07-07 06:15:05 +0000
committerStefan Gehrer <stefan.gehrer@gmx.de>2007-07-07 06:15:05 +0000
commit25c899471decb181b03eaf45ba4b4a1c634c4248 (patch)
tree3f0d19119c4ee970118853d2a4a5ecb183a232ac /libavcodec/cavs.h
parente183b6d17cc5730f41f44ccca5c9857e19385f5f (diff)
downloadffmpeg-25c899471decb181b03eaf45ba4b4a1c634c4248.tar.gz
move modification of intra prediction modes into
its own inline function Originally committed as revision 9514 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cavs.h')
-rw-r--r--libavcodec/cavs.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index a2d050a2b3..2d56d4bb1a 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -224,6 +224,10 @@ typedef struct {
DCTELEM *block;
} AVSContext;
+extern const int_fast8_t ff_left_modifier_l[8];
+extern const int_fast8_t ff_top_modifier_l[8];
+extern const int_fast8_t ff_left_modifier_c[7];
+extern const int_fast8_t ff_top_modifier_c[7];
extern const vector_t ff_cavs_un_mv;
static inline void load_intra_pred_luma(AVSContext *h, uint8_t *top,
@@ -301,6 +305,26 @@ static inline void modify_pred(const int_fast8_t *mod_table, int *mode) {
}
}
+static inline void modify_mb_i(AVSContext *h, int *pred_mode_uv) {
+ /* save pred modes before they get modified */
+ h->pred_mode_Y[3] = h->pred_mode_Y[5];
+ h->pred_mode_Y[6] = h->pred_mode_Y[8];
+ h->top_pred_Y[h->mbx*2+0] = h->pred_mode_Y[7];
+ h->top_pred_Y[h->mbx*2+1] = h->pred_mode_Y[8];
+
+ /* modify pred modes according to availability of neighbour samples */
+ if(!(h->flags & A_AVAIL)) {
+ modify_pred(ff_left_modifier_l, &h->pred_mode_Y[4] );
+ modify_pred(ff_left_modifier_l, &h->pred_mode_Y[7] );
+ modify_pred(ff_left_modifier_c, pred_mode_uv );
+ }
+ if(!(h->flags & B_AVAIL)) {
+ modify_pred(ff_top_modifier_l, &h->pred_mode_Y[4] );
+ modify_pred(ff_top_modifier_l, &h->pred_mode_Y[5] );
+ modify_pred(ff_top_modifier_c, pred_mode_uv );
+ }
+}
+
static inline void set_mvs(vector_t *mv, enum block_t size) {
switch(size) {
case BLK_16X16: