diff options
author | Christian König <[email protected]> | 2011-05-07 18:09:31 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-05-07 18:09:31 +0200 |
commit | 626352648a8c0b5d92a979d1b1adbf472e711ff8 (patch) | |
tree | 9a8921b4ffe4e28f2365565cae684bc2169a8773 /src/gallium | |
parent | e06a09ac37c1ab55326922abc314fe84e3ac5824 (diff) |
[g3dvl] memcpy the DCT buffer instead of writing it directly
It looks like texture buffers are not cached so this seems to be alot faster
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c index 36eed519092..9401081307a 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c @@ -1258,7 +1258,7 @@ static inline void slice_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture, const int scan[64], int cc, unsigned x, unsigned y, enum pipe_mpeg12_dct_type coding, int quantizer_scale, int dc_dct_pred[3]) { - short *dest = bs->ycbcr_buffer[cc]; + short dest[64]; bs->ycbcr_stream[cc]->x = x; bs->ycbcr_stream[cc]->y = y; @@ -1283,6 +1283,8 @@ slice_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pictur else get_intra_block_B14(bs, picture, scan, quantizer_scale, dest); + memcpy(bs->ycbcr_buffer[cc], dest, sizeof(int16_t) * 64); + bs->num_ycbcr_blocks[cc]++; bs->ycbcr_stream[cc]++; bs->ycbcr_buffer[cc] += 64; @@ -1292,7 +1294,7 @@ static inline void slice_non_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture, const int scan[64], int cc, unsigned x, unsigned y, int quantizer_scale, enum pipe_mpeg12_dct_type coding) { - short *dest = bs->ycbcr_buffer[cc]; + short dest[64]; bs->ycbcr_stream[cc]->x = x; bs->ycbcr_stream[cc]->y = y; @@ -1305,6 +1307,8 @@ slice_non_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pi else get_non_intra_block(bs, picture, scan, quantizer_scale, dest); + memcpy(bs->ycbcr_buffer[cc], dest, sizeof(int16_t) * 64); + bs->num_ycbcr_blocks[cc]++; bs->ycbcr_stream[cc]++; bs->ycbcr_buffer[cc] += 64; |