diff options
author | Mike Melanson <mike@multimedia.cx> | 2004-04-27 03:58:06 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2004-04-27 03:58:06 +0000 |
commit | f9ed9d8584d762142cf5e579b38bfe649cc5c8e8 (patch) | |
tree | 790114f1ba563c9f673933792b8f5f8811cf656e /libavcodec/vp3.c | |
parent | c0c37848d8c571b13c5fe443f6d0811ac2d3cc36 (diff) | |
download | ffmpeg-f9ed9d8584d762142cf5e579b38bfe649cc5c8e8.tar.gz |
separate out put_signed_pixels_clamped() into its own function and
implement an optimized MMX version of the function
Originally committed as revision 3082 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index cf22ee6ce0..59d183505e 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2061,10 +2061,6 @@ static void render_fragments(Vp3DecodeContext *s, int motion_halfpel_index; uint8_t *motion_source; - int16_t *op; - uint8_t *dest; - int j, k; - debug_vp3(" vp3: rendering final fragments for %s\n", (plane == 0) ? "Y plane" : (plane == 1) ? "U plane" : "V plane"); @@ -2186,22 +2182,9 @@ av_log(s->avctx, AV_LOG_ERROR, " help! got beefy vector! (%X, %X)\n", motion_x, s->all_fragments[i].coeff_count, output_samples); if (s->all_fragments[i].coding_method == MODE_INTRA) { - /* this really needs to be optimized sooner or later */ - op = output_samples; - dest = output_plane + s->all_fragments[i].first_pixel; - for (j = 0; j < 8; j++) { - for (k = 0; k < 8; k++) { - if (*op < -128) - *dest = 0; - else if (*op > 127) - *dest = 255; - else - *dest = (uint8_t)(*op + 128); - op++; - dest++; - } - dest += (stride - 8); - } + s->dsp.put_signed_pixels_clamped(output_samples, + output_plane + s->all_fragments[i].first_pixel, + stride); } else { s->dsp.add_pixels_clamped(output_samples, output_plane + s->all_fragments[i].first_pixel, |