diff options
author | Diego Biurrun <diego@biurrun.de> | 2005-12-17 18:14:38 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2005-12-17 18:14:38 +0000 |
commit | 115329f16062074e11ccf3b89ead6176606c9696 (patch) | |
tree | e98aa993905a702688bf821737ab9a443969fc28 /libavcodec/rv10.c | |
parent | d76319b1ab716320f6e6a4d690b85fe4504ebd5b (diff) | |
download | ffmpeg-115329f16062074e11ccf3b89ead6176606c9696.tar.gz |
COSMETICS: Remove all trailing whitespace.
Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 06fbde837d..e35b2250dc 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -22,7 +22,7 @@ * @file rv10.c * RV10 codec. */ - + #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" @@ -67,7 +67,7 @@ static const uint16_t rv_lum_code[256] = 0x0f78, 0x0f79, 0x0f7a, 0x0f7b, 0x0f7c, 0x0f7d, 0x0f7e, 0x0f7f, }; -static const uint8_t rv_lum_bits[256] = +static const uint8_t rv_lum_bits[256] = { 14, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, @@ -235,7 +235,7 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) int full_frame= 0; align_put_bits(&s->pb); - + put_bits(&s->pb, 1, 1); /* marker */ put_bits(&s->pb, 1, (s->pict_type == P_TYPE)); @@ -262,13 +262,13 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ? put_bits(&s->pb, 1, 0); /* unknown bit */ put_bits(&s->pb, 5, s->qscale); - + put_bits(&s->pb, 8, picture_number&0xFF); //FIXME wrong, but correct is not known s->mb_x= s->mb_y= 0; ff_h263_encode_mba(s); - + put_bits(&s->pb, 1, s->no_rounding); - + assert(s->f_code == 1); assert(s->unrestricted_mv == 1); // assert(s->h263_aic== (s->pict_type == I_TYPE)); @@ -279,7 +279,7 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ s->h263_aic= s->pict_type == I_TYPE; if(s->h263_aic){ - s->y_dc_scale_table= + s->y_dc_scale_table= s->c_dc_scale_table= ff_aic_dc_scale_table; }else{ s->y_dc_scale_table= @@ -308,7 +308,7 @@ static int get_num(GetBitContext *gb) static int rv10_decode_picture_header(MpegEncContext *s) { int mb_count, pb_frame, marker, unk, mb_xy; - + //printf("ff:%d\n", full_frame); marker = get_bits(&s->gb, 1); @@ -323,7 +323,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) #ifdef DEBUG printf("pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame); #endif - + if (pb_frame){ av_log(s->avctx, AV_LOG_ERROR, "pb frame not supported\n"); return -1; @@ -373,7 +373,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) static int rv20_decode_picture_header(MpegEncContext *s) { int seq, mb_pos, i; - + #if 0 GetBitContext gb= s->gb; for(i=0; i<64; i++){ @@ -389,13 +389,13 @@ static int rv20_decode_picture_header(MpegEncContext *s) } av_log(s->avctx, AV_LOG_DEBUG, "\n"); #endif - + if(s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){ if (get_bits(&s->gb, 3)){ av_log(s->avctx, AV_LOG_ERROR, "unknown triplet set\n"); return -1; - } - } + } + } i= get_bits(&s->gb, 2); switch(i){ @@ -403,16 +403,16 @@ static int rv20_decode_picture_header(MpegEncContext *s) case 1: s->pict_type= I_TYPE; break; //hmm ... case 2: s->pict_type= P_TYPE; break; case 3: s->pict_type= B_TYPE; break; - default: + default: av_log(s->avctx, AV_LOG_ERROR, "unknown frame type\n"); return -1; } - + if(s->last_picture_ptr==NULL && s->pict_type==B_TYPE){ av_log(s->avctx, AV_LOG_ERROR, "early B pix\n"); return -1; } - + if (get_bits(&s->gb, 1)){ av_log(s->avctx, AV_LOG_ERROR, "unknown bit set\n"); return -1; @@ -429,7 +429,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) return -1; } } - + if(s->avctx->has_b_frames){ int f=9; int v= s->avctx->extradata_size >= 4 ? ((uint8_t*)s->avctx->extradata)[1] : 0; @@ -440,7 +440,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) } seq= get_bits(&s->gb, 14)<<1; - if(v) + if(v) f= get_bits(&s->gb, av_log2(v)); if(s->avctx->debug & FF_DEBUG_PICT_INFO){ @@ -450,7 +450,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) seq= get_bits(&s->gb, 8)*128; } -// if(s->avctx->sub_id <= 0x20201002){ //0x20201002 definitely needs this +// if(s->avctx->sub_id <= 0x20201002){ //0x20201002 definitely needs this mb_pos= ff_h263_decode_mba(s); /* }else{ mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1); @@ -461,7 +461,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) seq |= s->time &~0x7FFF; if(seq - s->time > 0x4000) seq -= 0x8000; if(seq - s->time < -0x4000) seq += 0x8000; - if(seq != s->time){ + if(seq != s->time){ if(s->pict_type!=B_TYPE){ s->time= seq; s->pp_time= s->time - s->last_non_b_time; @@ -481,7 +481,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) } av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ s->no_rounding= get_bits1(&s->gb); - + s->f_code = 1; s->unrestricted_mv = 1; s->h263_aic= s->pict_type == I_TYPE; @@ -490,9 +490,9 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ // s->umvplus=1; s->modified_quant=1; s->loop_filter=1; - + if(s->avctx->debug & FF_DEBUG_PICT_INFO){ - av_log(s->avctx, AV_LOG_INFO, "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n", + av_log(s->avctx, AV_LOG_INFO, "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n", seq, s->mb_x, s->mb_y, s->pict_type, s->qscale, s->no_rounding); } @@ -507,7 +507,7 @@ static int rv10_decode_init(AVCodecContext *avctx) static int done=0; MPV_decode_defaults(s); - + s->avctx= avctx; s->out_format = FMT_H263; s->codec_id= avctx->codec_id; @@ -556,7 +556,7 @@ static int rv10_decode_init(AVCodecContext *avctx) default: av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id); } - + if(avctx->debug & FF_DEBUG_PICT_INFO){ av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", avctx->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1); } @@ -570,10 +570,10 @@ static int rv10_decode_init(AVCodecContext *avctx) /* init rv vlc */ if (!done) { - init_vlc(&rv_dc_lum, DC_VLC_BITS, 256, + init_vlc(&rv_dc_lum, DC_VLC_BITS, 256, rv_lum_bits, 1, 1, rv_lum_code, 2, 2, 1); - init_vlc(&rv_dc_chrom, DC_VLC_BITS, 256, + init_vlc(&rv_dc_chrom, DC_VLC_BITS, 256, rv_chrom_bits, 1, 1, rv_chrom_code, 2, 2, 1); done = 1; @@ -590,7 +590,7 @@ static int rv10_decode_end(AVCodecContext *avctx) return 0; } -static int rv10_decode_packet(AVCodecContext *avctx, +static int rv10_decode_packet(AVCodecContext *avctx, uint8_t *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; @@ -605,7 +605,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, av_log(s->avctx, AV_LOG_ERROR, "HEADER ERROR\n"); return -1; } - + if (s->mb_x >= s->mb_width || s->mb_y >= s->mb_height) { av_log(s->avctx, AV_LOG_ERROR, "POS ERROR %d %d\n", s->mb_x, s->mb_y); @@ -638,12 +638,12 @@ static int rv10_decode_packet(AVCodecContext *avctx, if(s->codec_id== CODEC_ID_RV10){ if(s->mb_y==0) s->first_slice_line=1; }else{ - s->first_slice_line=1; + s->first_slice_line=1; s->resync_mb_x= s->mb_x; s->resync_mb_y= s->mb_y; } if(s->h263_aic){ - s->y_dc_scale_table= + s->y_dc_scale_table= s->c_dc_scale_table= ff_aic_dc_scale_table; }else{ s->y_dc_scale_table= @@ -652,7 +652,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, if(s->modified_quant) s->chroma_qscale_table= ff_h263_chroma_qscale_table; - + ff_set_qscale(s, s->qscale); s->rv10_first_dc_coded[0] = 0; @@ -676,7 +676,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, #endif s->mv_dir = MV_DIR_FORWARD; - s->mv_type = MV_TYPE_16X16; + s->mv_type = MV_TYPE_16X16; ret=ff_h263_decode_mb(s, s->block); if (ret == SLICE_ERROR || s->gb.size_in_bits < get_bits_count(&s->gb)) { @@ -704,13 +704,13 @@ static int rv10_decode_packet(AVCodecContext *avctx, return buf_size; } -static int rv10_decode_frame(AVCodecContext *avctx, +static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i; - AVFrame *pict = data; + AVFrame *pict = data; #ifdef DEBUG printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); @@ -725,7 +725,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, for(i=0; i<avctx->slice_count; i++){ int offset= avctx->slice_offset[i]; int size; - + if(i+1 == avctx->slice_count) size= buf_size - offset; else @@ -736,11 +736,11 @@ static int rv10_decode_frame(AVCodecContext *avctx, }else{ rv10_decode_packet(avctx, buf, buf_size); } - + if(s->mb_y>=s->mb_height){ ff_er_frame_end(s); MPV_frame_end(s); - + if(s->pict_type==B_TYPE || s->low_delay){ *pict= *(AVFrame*)&s->current_picture; ff_print_debug_info(s, pict); |