diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 14:02:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 14:02:39 +0000 |
commit | 5b0fb5244d3fb7758521c6988abdc26879c57968 (patch) | |
tree | 34e5f5e9da6a65b700b0669a3192b5dc170cebf3 /libavcodec/h264.c | |
parent | c2186cbddcc8e13608bc2243785b4dbc02700ac3 (diff) | |
download | ffmpeg-5b0fb5244d3fb7758521c6988abdc26879c57968.tar.gz |
Store intra4x4_pred_mode per row only.
about 5 cpu cycles slower in the local code but should be overall faster
due to reduced cache use. (my sample though has too few intra4x4 blocks
for this to be meassureable easily either way)
Originally committed as revision 22052 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index fc39bdb49d..7f9b411639 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -52,15 +52,15 @@ static const uint8_t div6[52]={ }; void ff_h264_write_back_intra_pred_mode(H264Context *h){ - const int mb_xy= h->mb_xy; - - h->intra4x4_pred_mode[mb_xy][0]= h->intra4x4_pred_mode_cache[7+8*1]; - h->intra4x4_pred_mode[mb_xy][1]= h->intra4x4_pred_mode_cache[7+8*2]; - h->intra4x4_pred_mode[mb_xy][2]= h->intra4x4_pred_mode_cache[7+8*3]; - h->intra4x4_pred_mode[mb_xy][3]= h->intra4x4_pred_mode_cache[7+8*4]; - h->intra4x4_pred_mode[mb_xy][4]= h->intra4x4_pred_mode_cache[4+8*4]; - h->intra4x4_pred_mode[mb_xy][5]= h->intra4x4_pred_mode_cache[5+8*4]; - h->intra4x4_pred_mode[mb_xy][6]= h->intra4x4_pred_mode_cache[6+8*4]; + int8_t *mode= h->intra4x4_pred_mode + h->mb2br_xy[h->mb_xy]; + + mode[0]= h->intra4x4_pred_mode_cache[7+8*1]; + mode[1]= h->intra4x4_pred_mode_cache[7+8*2]; + mode[2]= h->intra4x4_pred_mode_cache[7+8*3]; + mode[3]= h->intra4x4_pred_mode_cache[7+8*4]; + mode[4]= h->intra4x4_pred_mode_cache[4+8*4]; + mode[5]= h->intra4x4_pred_mode_cache[5+8*4]; + mode[6]= h->intra4x4_pred_mode_cache[6+8*4]; } /** |