aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cavs.h
diff options
context:
space:
mode:
authorStefan Gehrer <stefan.gehrer@gmx.de>2007-07-07 05:27:59 +0000
committerStefan Gehrer <stefan.gehrer@gmx.de>2007-07-07 05:27:59 +0000
commite183b6d17cc5730f41f44ccca5c9857e19385f5f (patch)
treee3054a1cc787f0741a733a76f31ccdc27d1e7771 /libavcodec/cavs.h
parentb8524fd13fd940d18abb63fd8b5770ea92e2c7fa (diff)
downloadffmpeg-e183b6d17cc5730f41f44ccca5c9857e19385f5f.tar.gz
move preparation of chroma intra prediction into its
own inline function Originally committed as revision 9513 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cavs.h')
-rw-r--r--libavcodec/cavs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index 6610574536..a2d050a2b3 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -276,6 +276,23 @@ static inline void load_intra_pred_luma(AVSContext *h, uint8_t *top,
}
}
+static inline void load_intra_pred_chroma(AVSContext *h) {
+ /* extend borders by one pixel */
+ h->left_border_u[9] = h->left_border_u[8];
+ h->left_border_v[9] = h->left_border_v[8];
+ h->top_border_u[h->mbx*10+9] = h->top_border_u[h->mbx*10+8];
+ h->top_border_v[h->mbx*10+9] = h->top_border_v[h->mbx*10+8];
+ if(h->mbx && h->mby) {
+ h->top_border_u[h->mbx*10] = h->left_border_u[0] = h->topleft_border_u;
+ h->top_border_v[h->mbx*10] = h->left_border_v[0] = h->topleft_border_v;
+ } else {
+ h->left_border_u[0] = h->left_border_u[1];
+ h->left_border_v[0] = h->left_border_v[1];
+ h->top_border_u[h->mbx*10] = h->top_border_u[h->mbx*10+1];
+ h->top_border_v[h->mbx*10] = h->top_border_v[h->mbx*10+1];
+ }
+}
+
static inline void modify_pred(const int_fast8_t *mod_table, int *mode) {
*mode = mod_table[*mode];
if(*mode < 0) {