Commit db32f2e8 authored by stefang's avatar stefang

move preparation of chroma intra prediction into it's

own inline function


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9513 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c26a6fa6
......@@ -657,20 +657,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
}
/* chroma intra prediction */
/* 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];
}
load_intra_pred_chroma(h);
h->intra_pred_c[pred_mode_uv](h->cu, &h->top_border_u[h->mbx*10],
h->left_border_u, h->c_stride);
h->intra_pred_c[pred_mode_uv](h->cv, &h->top_border_v[h->mbx*10],
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment