Revision 849f1035 libavcodec/snow.c
libavcodec/snow.c | ||
---|---|---|
709 | 709 |
return v; |
710 | 710 |
} |
711 | 711 |
|
712 |
static always_inline void lift(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){ |
|
712 |
static av_always_inline void lift(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
|
|
713 | 713 |
const int mirror_left= !highpass; |
714 | 714 |
const int mirror_right= (width&1) ^ highpass; |
715 | 715 |
const int w= (width>>1) - 1 + (highpass & width); |
... | ... | |
732 | 732 |
} |
733 | 733 |
|
734 | 734 |
#ifndef lift5 |
735 |
static always_inline void lift5(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){ |
|
735 |
static av_always_inline void lift5(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
|
|
736 | 736 |
const int mirror_left= !highpass; |
737 | 737 |
const int mirror_right= (width&1) ^ highpass; |
738 | 738 |
const int w= (width>>1) - 1 + (highpass & width); |
... | ... | |
764 | 764 |
#endif |
765 | 765 |
|
766 | 766 |
#ifndef liftS |
767 |
static always_inline void liftS(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){ |
|
767 |
static av_always_inline void liftS(DWTELEM *dst, DWTELEM *src, DWTELEM *ref, int dst_step, int src_step, int ref_step, int width, int mul, int add, int shift, int highpass, int inverse){
|
|
768 | 768 |
const int mirror_left= !highpass; |
769 | 769 |
const int mirror_right= (width&1) ^ highpass; |
770 | 770 |
const int w= (width>>1) - 1 + (highpass & width); |
... | ... | |
2206 | 2206 |
} |
2207 | 2207 |
} |
2208 | 2208 |
|
2209 |
static always_inline int same_block(BlockNode *a, BlockNode *b){ |
|
2209 |
static av_always_inline int same_block(BlockNode *a, BlockNode *b){
|
|
2210 | 2210 |
if((a->type&BLOCK_INTRA) && (b->type&BLOCK_INTRA)){ |
2211 | 2211 |
return !((a->color[0] - b->color[0]) | (a->color[1] - b->color[1]) | (a->color[2] - b->color[2])); |
2212 | 2212 |
}else{ |
... | ... | |
2553 | 2553 |
} |
2554 | 2554 |
|
2555 | 2555 |
//FIXME name clenup (b_w, block_w, b_width stuff) |
2556 |
static always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, DWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){ |
|
2556 |
static av_always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, DWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){
|
|
2557 | 2557 |
const int b_width = s->b_width << s->block_max_depth; |
2558 | 2558 |
const int b_height= s->b_height << s->block_max_depth; |
2559 | 2559 |
const int b_stride= b_width; |
... | ... | |
2712 | 2712 |
#endif |
2713 | 2713 |
} |
2714 | 2714 |
|
2715 |
static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, DWTELEM * old_buffer, int plane_index, int add, int mb_y){ |
|
2715 |
static av_always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * sb, DWTELEM * old_buffer, int plane_index, int add, int mb_y){
|
|
2716 | 2716 |
Plane *p= &s->plane[plane_index]; |
2717 | 2717 |
const int mb_w= s->b_width << s->block_max_depth; |
2718 | 2718 |
const int mb_h= s->b_height << s->block_max_depth; |
... | ... | |
2779 | 2779 |
STOP_TIMER("predict_slice") |
2780 | 2780 |
} |
2781 | 2781 |
|
2782 |
static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_index, int add, int mb_y){ |
|
2782 |
static av_always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_index, int add, int mb_y){
|
|
2783 | 2783 |
Plane *p= &s->plane[plane_index]; |
2784 | 2784 |
const int mb_w= s->b_width << s->block_max_depth; |
2785 | 2785 |
const int mb_h= s->b_height << s->block_max_depth; |
... | ... | |
2836 | 2836 |
STOP_TIMER("predict_slice") |
2837 | 2837 |
} |
2838 | 2838 |
|
2839 |
static always_inline void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){ |
|
2839 |
static av_always_inline void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){
|
|
2840 | 2840 |
const int mb_h= s->b_height << s->block_max_depth; |
2841 | 2841 |
int mb_y; |
2842 | 2842 |
for(mb_y=0; mb_y<=mb_h; mb_y++) |
... | ... | |
3094 | 3094 |
return distortion + rate*penalty_factor; |
3095 | 3095 |
} |
3096 | 3096 |
|
3097 |
static always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){ |
|
3097 |
static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, const uint8_t *obmc_edged, int *best_rd){
|
|
3098 | 3098 |
const int b_stride= s->b_width << s->block_max_depth; |
3099 | 3099 |
BlockNode *block= &s->block[mb_x + mb_y * b_stride]; |
3100 | 3100 |
BlockNode backup= *block; |
... | ... | |
3133 | 3133 |
} |
3134 | 3134 |
|
3135 | 3135 |
/* special case for int[2] args we discard afterward, fixes compilation prob with gcc 2.95 */ |
3136 |
static always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){ |
|
3136 |
static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, const uint8_t *obmc_edged, int *best_rd){
|
|
3137 | 3137 |
int p[2] = {p0, p1}; |
3138 | 3138 |
return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd); |
3139 | 3139 |
} |
3140 | 3140 |
|
3141 |
static always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){ |
|
3141 |
static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, int ref, int *best_rd){
|
|
3142 | 3142 |
const int b_stride= s->b_width << s->block_max_depth; |
3143 | 3143 |
BlockNode *block= &s->block[mb_x + mb_y * b_stride]; |
3144 | 3144 |
BlockNode backup[4]= {block[0], block[1], block[b_stride], block[b_stride+1]}; |
Also available in: Unified diff