summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorFrancesco Lavra <francescolavra@interfree.it>2010-05-18 19:16:40 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-05-18 19:16:40 +0000
commit603a5f04b2da0622faab796307d7208ecde80603 (patch)
tree7995eda41969870c0a1fb0109bd18de4633340b0 /libavcodec/mpegvideo.c
parentb74f67eb17b3dae49cb42affa07b5c41ef09160e (diff)
Factorize some code into the new function ff_toupper4().
Patch by Francesco Lavra, francescolavra interfree it Originally committed as revision 23158 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index e11fee8ffc..b5631cffc3 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -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 @@ av_cold int MPV_common_init(MpegEncContext *s)
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->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->codec_tag = ff_toupper4(s->avctx->codec_tag);
+
+ s->stream_codec_tag = ff_toupper4(s->avctx->stream_codec_tag);
s->avctx->coded_frame= (AVFrame*)&s->current_picture;