summaryrefslogtreecommitdiff
path: root/libavcodec/wmv2dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/wmv2dsp.c')
-rw-r--r--libavcodec/wmv2dsp.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/libavcodec/wmv2dsp.c b/libavcodec/wmv2dsp.c
index 90073e4b4a..543f01b852 100644
--- a/libavcodec/wmv2dsp.c
+++ b/libavcodec/wmv2dsp.c
@@ -1,18 +1,18 @@
/*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -48,8 +48,8 @@ static void wmv2_idct_row(short * b)
a4 = W0 * b[0] - W0 * b[4];
/* step 2 */
- s1 = (181 * (a1 - a5 + a7 - a3) + 128) >> 8; // 1, 3, 5, 7
- s2 = (181 * (a1 - a5 - a7 + a3) + 128) >> 8;
+ s1 = (int)(181U * (a1 - a5 + a7 - a3) + 128) >> 8; // 1, 3, 5, 7
+ s2 = (int)(181U * (a1 - a5 - a7 + a3) + 128) >> 8;
/* step 3 */
b[0] = (a0 + a2 + a1 + a5 + (1 << 7)) >> 8;
@@ -78,8 +78,8 @@ static void wmv2_idct_col(short * b)
a4 = (W0 * b[8 * 0] - W0 * b[8 * 4] ) >> 3;
/* step 2 */
- s1 = (181 * (a1 - a5 + a7 - a3) + 128) >> 8;
- s2 = (181 * (a1 - a5 - a7 + a3) + 128) >> 8;
+ s1 = (int)(181U * (a1 - a5 + a7 - a3) + 128) >> 8;
+ s2 = (int)(181U * (a1 - a5 - a7 + a3) + 128) >> 8;
/* step 3 */
b[8 * 0] = (a0 + a2 + a1 + a5 + (1 << 13)) >> 14;
@@ -262,4 +262,7 @@ av_cold void ff_wmv2dsp_init(WMV2DSPContext *c)
c->put_mspel_pixels_tab[5] = put_mspel8_mc12_c;
c->put_mspel_pixels_tab[6] = put_mspel8_mc22_c;
c->put_mspel_pixels_tab[7] = put_mspel8_mc32_c;
+
+ if (ARCH_MIPS)
+ ff_wmv2dsp_init_mips(c);
}