diff mpegvideo.c @ 11742:a37818ac3817 libavcodec

Factorize some code into the new function ff_toupper4(). Patch by Francesco Lavra, francescolavra interfree it
author cehoyos
date Tue, 18 May 2010 19:16:40 +0000
parents 7dd2a45249a9
children fdafbcef52f5
line wrap: on
line diff
--- a/mpegvideo.c	Mon May 17 22:49:34 2010 +0000
+++ b/mpegvideo.c	Tue May 18 19:16:40 2010 +0000
@@ -30,6 +30,7 @@
 #include "libavutil/intmath.h"
 #include "avcodec.h"
 #include "dsputil.h"
+#include "internal.h"
 #include "mpegvideo.h"
 #include "mpegvideo_common.h"
 #include "mjpegenc.h"
@@ -530,15 +531,9 @@
     yc_size = y_size + 2 * c_size;
 
     /* convert fourcc to upper case */
-    s->codec_tag=          toupper( s->avctx->codec_tag     &0xFF)
-                        + (toupper((s->avctx->codec_tag>>8 )&0xFF)<<8 )
-                        + (toupper((s->avctx->codec_tag>>16)&0xFF)<<16)
-                        + (toupper((s->avctx->codec_tag>>24)&0xFF)<<24);
+    s->codec_tag = ff_toupper4(s->avctx->codec_tag);
 
-    s->stream_codec_tag=          toupper( s->avctx->stream_codec_tag     &0xFF)
-                               + (toupper((s->avctx->stream_codec_tag>>8 )&0xFF)<<8 )
-                               + (toupper((s->avctx->stream_codec_tag>>16)&0xFF)<<16)
-                               + (toupper((s->avctx->stream_codec_tag>>24)&0xFF)<<24);
+    s->stream_codec_tag = ff_toupper4(s->avctx->stream_codec_tag);
 
     s->avctx->coded_frame= (AVFrame*)&s->current_picture;