comparison mpegvideo.c @ 4283:d6f83e2f8804 libavcodec

rename always_inline to av_always_inline and move to common.h
author mru
date Fri, 08 Dec 2006 00:35:08 +0000
parents de525a2b41db
children 5ed8f8fd71e9
comparison
equal deleted inserted replaced
4282:9d64f6eacc7b 4283:d6f83e2f8804
2944 pix_op[lowres](dest, src, stride, h, sx, sy); 2944 pix_op[lowres](dest, src, stride, h, sx, sy);
2945 return emu; 2945 return emu;
2946 } 2946 }
2947 2947
2948 /* apply one mpeg motion vector to the three components */ 2948 /* apply one mpeg motion vector to the three components */
2949 static always_inline void mpeg_motion(MpegEncContext *s, 2949 static av_always_inline void mpeg_motion(MpegEncContext *s,
2950 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, 2950 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
2951 int field_based, int bottom_field, int field_select, 2951 int field_based, int bottom_field, int field_select,
2952 uint8_t **ref_picture, op_pixels_func (*pix_op)[4], 2952 uint8_t **ref_picture, op_pixels_func (*pix_op)[4],
2953 int motion_x, int motion_y, int h) 2953 int motion_x, int motion_y, int h)
2954 { 2954 {
3061 } 3061 }
3062 #endif 3062 #endif
3063 } 3063 }
3064 3064
3065 /* apply one mpeg motion vector to the three components */ 3065 /* apply one mpeg motion vector to the three components */
3066 static always_inline void mpeg_motion_lowres(MpegEncContext *s, 3066 static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
3067 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, 3067 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
3068 int field_based, int bottom_field, int field_select, 3068 int field_based, int bottom_field, int field_select,
3069 uint8_t **ref_picture, h264_chroma_mc_func *pix_op, 3069 uint8_t **ref_picture, h264_chroma_mc_func *pix_op,
3070 int motion_x, int motion_y, int h) 3070 int motion_x, int motion_y, int h)
3071 { 3071 {
3893 s->mv_dir : motion vector direction 3893 s->mv_dir : motion vector direction
3894 s->mv_type : motion vector type 3894 s->mv_type : motion vector type
3895 s->mv : motion vector 3895 s->mv : motion vector
3896 s->interlaced_dct : true if interlaced dct used (mpeg2) 3896 s->interlaced_dct : true if interlaced dct used (mpeg2)
3897 */ 3897 */
3898 static always_inline void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], int lowres_flag) 3898 static av_always_inline void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], int lowres_flag)
3899 { 3899 {
3900 int mb_x, mb_y; 3900 int mb_x, mb_y;
3901 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; 3901 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
3902 #ifdef HAVE_XVMC 3902 #ifdef HAVE_XVMC
3903 if(s->avctx->xvmc_acceleration){ 3903 if(s->avctx->xvmc_acceleration){
4316 weight[x + 8*y]= (36*ff_sqrt(count*sqr - sum*sum)) / count; 4316 weight[x + 8*y]= (36*ff_sqrt(count*sqr - sum*sum)) / count;
4317 } 4317 }
4318 } 4318 }
4319 } 4319 }
4320 4320
4321 static always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count) 4321 static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count)
4322 { 4322 {
4323 int16_t weight[8][64]; 4323 int16_t weight[8][64];
4324 DCTELEM orig[8][64]; 4324 DCTELEM orig[8][64];
4325 const int mb_x= s->mb_x; 4325 const int mb_x= s->mb_x;
4326 const int mb_y= s->mb_y; 4326 const int mb_y= s->mb_y;
4598 default: 4598 default:
4599 assert(0); 4599 assert(0);
4600 } 4600 }
4601 } 4601 }
4602 4602
4603 static always_inline void encode_mb(MpegEncContext *s, int motion_x, int motion_y) 4603 static av_always_inline void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
4604 { 4604 {
4605 if (s->chroma_format == CHROMA_420) encode_mb_internal(s, motion_x, motion_y, 8, 6); 4605 if (s->chroma_format == CHROMA_420) encode_mb_internal(s, motion_x, motion_y, 8, 6);
4606 else encode_mb_internal(s, motion_x, motion_y, 16, 8); 4606 else encode_mb_internal(s, motion_x, motion_y, 16, 8);
4607 } 4607 }
4608 4608