comparison h263.c @ 8612:b20c590170cc libavcodec

remove ff_get_fourcc() and use AV_RL32() instead
author aurel
date Sat, 17 Jan 2009 12:21:01 +0000
parents a637db9f59b1
children d6bab465b82c
comparison
equal deleted inserted replaced
8611:a637db9f59b1 8612:b20c590170cc
112 #endif 112 #endif
113 113
114 static uint8_t static_rl_table_store[5][2][2*MAX_RUN + MAX_LEVEL + 3]; 114 static uint8_t static_rl_table_store[5][2][2*MAX_RUN + MAX_LEVEL + 3];
115 115
116 #if 0 //3IV1 is quite rare and it slows things down a tiny bit 116 #if 0 //3IV1 is quite rare and it slows things down a tiny bit
117 #define IS_3IV1 s->codec_tag == ff_get_fourcc("3IV1") 117 #define IS_3IV1 s->codec_tag == AV_RL32("3IV1")
118 #else 118 #else
119 #define IS_3IV1 0 119 #define IS_3IV1 0
120 #endif 120 #endif
121 121
122 int h263_get_picture_format(int width, int height) 122 int h263_get_picture_format(int width, int height)
5221 5221
5222 if(s->avctx->debug&FF_DEBUG_PICT_INFO){ 5222 if(s->avctx->debug&FF_DEBUG_PICT_INFO){
5223 show_pict_info(s); 5223 show_pict_info(s);
5224 } 5224 }
5225 #if 1 5225 #if 1
5226 if (s->pict_type == FF_I_TYPE && s->codec_tag == ff_get_fourcc("ZYGO")){ 5226 if (s->pict_type == FF_I_TYPE && s->codec_tag == AV_RL32("ZYGO")){
5227 int i,j; 5227 int i,j;
5228 for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb)); 5228 for(i=0; i<85; i++) av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
5229 av_log(s->avctx, AV_LOG_DEBUG, "\n"); 5229 av_log(s->avctx, AV_LOG_DEBUG, "\n");
5230 for(i=0; i<13; i++){ 5230 for(i=0; i<13; i++){
5231 for(j=0; j<3; j++){ 5231 for(j=0; j<3; j++){
5546 skip_bits1(gb); /* marker */ 5546 skip_bits1(gb); /* marker */
5547 width = get_bits(gb, 13); 5547 width = get_bits(gb, 13);
5548 skip_bits1(gb); /* marker */ 5548 skip_bits1(gb); /* marker */
5549 height = get_bits(gb, 13); 5549 height = get_bits(gb, 13);
5550 skip_bits1(gb); /* marker */ 5550 skip_bits1(gb); /* marker */
5551 if(width && height && !(s->width && s->codec_tag == ff_get_fourcc("MP4S"))){ /* they should be non zero but who knows ... */ 5551 if(width && height && !(s->width && s->codec_tag == AV_RL32("MP4S"))){ /* they should be non zero but who knows ... */
5552 s->width = width; 5552 s->width = width;
5553 s->height = height; 5553 s->height = height;
5554 // printf("width/height: %d %d\n", width, height); 5554 // printf("width/height: %d %d\n", width, height);
5555 } 5555 }
5556 } 5556 }
6060 int startcode, v; 6060 int startcode, v;
6061 6061
6062 /* search next start code */ 6062 /* search next start code */
6063 align_get_bits(gb); 6063 align_get_bits(gb);
6064 6064
6065 if(s->codec_tag == ff_get_fourcc("WV1F") && show_bits(gb, 24) == 0x575630){ 6065 if(s->codec_tag == AV_RL32("WV1F") && show_bits(gb, 24) == 0x575630){
6066 skip_bits(gb, 24); 6066 skip_bits(gb, 24);
6067 if(get_bits(gb, 8) == 0xF0) 6067 if(get_bits(gb, 8) == 0xF0)
6068 goto end; 6068 goto end;
6069 } 6069 }
6070 6070