You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
h264: mark some MC functions with av_always_inline instead of inline.
This actually causes them to be inlined, leading to a significant speedup (1-1.5% in my measurements).
This commit is contained in:
@@ -438,7 +438,8 @@ static void chroma_dc_dct_c(DCTELEM *block){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
|
static av_always_inline void
|
||||||
|
mc_dir_part(H264Context *h, Picture *pic, int n, int square,
|
||||||
int height, int delta, int list,
|
int height, int delta, int list,
|
||||||
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
||||||
int src_x_offset, int src_y_offset,
|
int src_x_offset, int src_y_offset,
|
||||||
@@ -535,7 +536,8 @@ static inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square,
|
|||||||
mx&7, (my << (chroma_idc == 2 /* yuv422 */)) &7);
|
mx&7, (my << (chroma_idc == 2 /* yuv422 */)) &7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mc_part_std(H264Context *h, int n, int square, int height, int delta,
|
static av_always_inline void
|
||||||
|
mc_part_std(H264Context *h, int n, int square, int height, int delta,
|
||||||
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
||||||
int x_offset, int y_offset,
|
int x_offset, int y_offset,
|
||||||
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
||||||
@@ -578,7 +580,8 @@ static inline void mc_part_std(H264Context *h, int n, int square, int height, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mc_part_weighted(H264Context *h, int n, int square, int height, int delta,
|
static av_always_inline void
|
||||||
|
mc_part_weighted(H264Context *h, int n, int square, int height, int delta,
|
||||||
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
||||||
int x_offset, int y_offset,
|
int x_offset, int y_offset,
|
||||||
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
||||||
@@ -664,7 +667,8 @@ static inline void mc_part_weighted(H264Context *h, int n, int square, int heigh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mc_part(H264Context *h, int n, int square, int height, int delta,
|
static av_always_inline void
|
||||||
|
mc_part(H264Context *h, int n, int square, int height, int delta,
|
||||||
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
|
||||||
int x_offset, int y_offset,
|
int x_offset, int y_offset,
|
||||||
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put,
|
||||||
@@ -685,7 +689,9 @@ static inline void mc_part(H264Context *h, int n, int square, int height, int de
|
|||||||
chroma_avg, list0, list1, pixel_shift, chroma_idc);
|
chroma_avg, list0, list1, pixel_shift, chroma_idc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void prefetch_motion(H264Context *h, int list, int pixel_shift, int chroma_idc){
|
static av_always_inline void
|
||||||
|
prefetch_motion(H264Context *h, int list, int pixel_shift, int chroma_idc)
|
||||||
|
{
|
||||||
/* fetch pixels for estimated mv 4 macroblocks ahead
|
/* fetch pixels for estimated mv 4 macroblocks ahead
|
||||||
* optimized for 64byte cache lines */
|
* optimized for 64byte cache lines */
|
||||||
MpegEncContext * const s = &h->s;
|
MpegEncContext * const s = &h->s;
|
||||||
|
Reference in New Issue
Block a user