comparison 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
comparison
equal deleted inserted replaced
11741:872971445121 11742:a37818ac3817
28 */ 28 */
29 29
30 #include "libavutil/intmath.h" 30 #include "libavutil/intmath.h"
31 #include "avcodec.h" 31 #include "avcodec.h"
32 #include "dsputil.h" 32 #include "dsputil.h"
33 #include "internal.h"
33 #include "mpegvideo.h" 34 #include "mpegvideo.h"
34 #include "mpegvideo_common.h" 35 #include "mpegvideo_common.h"
35 #include "mjpegenc.h" 36 #include "mjpegenc.h"
36 #include "msmpeg4.h" 37 #include "msmpeg4.h"
37 #include "faandct.h" 38 #include "faandct.h"
528 y_size = s->b8_stride * (2 * s->mb_height + 1); 529 y_size = s->b8_stride * (2 * s->mb_height + 1);
529 c_size = s->mb_stride * (s->mb_height + 1); 530 c_size = s->mb_stride * (s->mb_height + 1);
530 yc_size = y_size + 2 * c_size; 531 yc_size = y_size + 2 * c_size;
531 532
532 /* convert fourcc to upper case */ 533 /* convert fourcc to upper case */
533 s->codec_tag= toupper( s->avctx->codec_tag &0xFF) 534 s->codec_tag = ff_toupper4(s->avctx->codec_tag);
534 + (toupper((s->avctx->codec_tag>>8 )&0xFF)<<8 ) 535
535 + (toupper((s->avctx->codec_tag>>16)&0xFF)<<16) 536 s->stream_codec_tag = ff_toupper4(s->avctx->stream_codec_tag);
536 + (toupper((s->avctx->codec_tag>>24)&0xFF)<<24);
537
538 s->stream_codec_tag= toupper( s->avctx->stream_codec_tag &0xFF)
539 + (toupper((s->avctx->stream_codec_tag>>8 )&0xFF)<<8 )
540 + (toupper((s->avctx->stream_codec_tag>>16)&0xFF)<<16)
541 + (toupper((s->avctx->stream_codec_tag>>24)&0xFF)<<24);
542 537
543 s->avctx->coded_frame= (AVFrame*)&s->current_picture; 538 s->avctx->coded_frame= (AVFrame*)&s->current_picture;
544 539
545 FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num+1)*sizeof(int), fail) //error ressilience code looks cleaner with this 540 FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num+1)*sizeof(int), fail) //error ressilience code looks cleaner with this
546 for(y=0; y<s->mb_height; y++){ 541 for(y=0; y<s->mb_height; y++){