MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / vop_dquant_decoding

Function vop_dquant_decoding

libavcodec/vc1.c:240–279  ·  view source on GitHub ↗

/ VOP Dquant decoding * @param v VC-1 Context */

Source from the content-addressed store, hash-verified

238 * @param v VC-1 Context
239 */
240static int vop_dquant_decoding(VC1Context *v)
241{
242 GetBitContext *gb = &v->s.gb;
243 int pqdiff;
244
245 //variable size
246 if (v->dquant == 2)
247 {
248 pqdiff = get_bits(gb, 3);
249 if (pqdiff == 7) v->altpq = get_bits(gb, 5);
250 else v->altpq = v->pq + pqdiff + 1;
251 }
252 else
253 {
254 v->dquantfrm = get_bits1(gb);
255 if ( v->dquantfrm )
256 {
257 v->dqprofile = get_bits(gb, 2);
258 switch (v->dqprofile)
259 {
260 case DQPROFILE_SINGLE_EDGE:
261 case DQPROFILE_DOUBLE_EDGES:
262 v->dqsbedge = get_bits(gb, 2);
263 break;
264 case DQPROFILE_ALL_MBS:
265 v->dqbilevel = get_bits1(gb);
266 if(!v->dqbilevel)
267 v->halfpq = 0;
268 default: break; //Forbidden ?
269 }
270 if (v->dqbilevel || v->dqprofile != DQPROFILE_ALL_MBS)
271 {
272 pqdiff = get_bits(gb, 3);
273 if (pqdiff == 7) v->altpq = get_bits(gb, 5);
274 else v->altpq = v->pq + pqdiff + 1;
275 }
276 }
277 }
278 return 0;
279}
280
281static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb);
282

Callers 2

vc1_parse_frame_headerFunction · 0.85

Calls 2

get_bitsFunction · 0.85
get_bits1Function · 0.85

Tested by

no test coverage detected