Mercurial > libavcodec.hg
comparison rv40.c @ 6714:05c3a4b419e9 libavcodec
Calculate motion vector information based on PTS provided in slice header
author | kostya |
---|---|
date | Mon, 28 Apr 2008 13:37:36 +0000 |
parents | 5b3acf9fd50a |
children | e943e1409077 |
comparison
equal
deleted
inserted
replaced
6713:f282270c589f | 6714:05c3a4b419e9 |
---|---|
101 *h = get_dimension(gb, rv40_standard_heights); | 101 *h = get_dimension(gb, rv40_standard_heights); |
102 } | 102 } |
103 | 103 |
104 static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si) | 104 static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si) |
105 { | 105 { |
106 int t, mb_bits; | 106 int mb_bits; |
107 int w = r->s.width, h = r->s.height; | 107 int w = r->s.width, h = r->s.height; |
108 int mb_size; | 108 int mb_size; |
109 | 109 |
110 memset(si, 0, sizeof(SliceInfo)); | 110 memset(si, 0, sizeof(SliceInfo)); |
111 if(get_bits1(gb)) | 111 if(get_bits1(gb)) |
115 si->quant = get_bits(gb, 5); | 115 si->quant = get_bits(gb, 5); |
116 if(get_bits(gb, 2)) | 116 if(get_bits(gb, 2)) |
117 return -1; | 117 return -1; |
118 si->vlc_set = get_bits(gb, 2); | 118 si->vlc_set = get_bits(gb, 2); |
119 skip_bits1(gb); | 119 skip_bits1(gb); |
120 t = get_bits(gb, 13); /// ??? | 120 si->pts = get_bits(gb, 13); |
121 if(!si->type || !get_bits1(gb)) | 121 if(!si->type || !get_bits1(gb)) |
122 rv40_parse_picture_size(gb, &w, &h); | 122 rv40_parse_picture_size(gb, &w, &h); |
123 if(avcodec_check_dimensions(r->s.avctx, w, h) < 0) | 123 if(avcodec_check_dimensions(r->s.avctx, w, h) < 0) |
124 return -1; | 124 return -1; |
125 si->width = w; | 125 si->width = w; |