Lines Matching refs:gb

218 static MPP_RET mpg4d_parse_matrix(BitReadCtx_t *gb, RK_U8 * matrix)  in mpg4d_parse_matrix()  argument
225 READ_BITS(gb, 8, &value); in mpg4d_parse_matrix()
264 static MPP_RET read_vol_complexity_estimation_header(Mpeg4Estimation *e, BitReadCtx_t *gb) in read_vol_complexity_estimation_header() argument
268 READ_BITS(gb, 2, &(e->method)); /* estimation_method */ in read_vol_complexity_estimation_header()
271 READ_BITS(gb, 1, &val); in read_vol_complexity_estimation_header()
273 READ_BITS(gb, 1, &(e->opaque)); /* opaque */ in read_vol_complexity_estimation_header()
274 READ_BITS(gb, 1, &(e->transparent)); /* transparent */ in read_vol_complexity_estimation_header()
275 READ_BITS(gb, 1, &(e->intra_cae)); /* intra_cae */ in read_vol_complexity_estimation_header()
276 READ_BITS(gb, 1, &(e->inter_cae)); /* inter_cae */ in read_vol_complexity_estimation_header()
277 READ_BITS(gb, 1, &(e->no_update)); /* no_update */ in read_vol_complexity_estimation_header()
278 READ_BITS(gb, 1, &(e->upsampling)); /* upsampling */ in read_vol_complexity_estimation_header()
281 READ_BITS(gb, 1, &val); in read_vol_complexity_estimation_header()
283 READ_BITS(gb, 1, &(e->intra_blocks)); /* intra_blocks */ in read_vol_complexity_estimation_header()
284 READ_BITS(gb, 1, &(e->inter_blocks)); /* inter_blocks */ in read_vol_complexity_estimation_header()
285 READ_BITS(gb, 1, &(e->inter4v_blocks)); /* inter4v_blocks */ in read_vol_complexity_estimation_header()
286 READ_BITS(gb, 1, &(e->not_coded_blocks)); /* not_coded_blocks */ in read_vol_complexity_estimation_header()
290 SKIP_BITS(gb, 1); in read_vol_complexity_estimation_header()
292 READ_BITS(gb, 1, &val); in read_vol_complexity_estimation_header()
294 READ_BITS(gb, 1, &(e->dct_coefs)); /* dct_coefs */ in read_vol_complexity_estimation_header()
295 READ_BITS(gb, 1, &(e->dct_lines)); /* dct_lines */ in read_vol_complexity_estimation_header()
296 READ_BITS(gb, 1, &(e->vlc_symbols)); /* vlc_symbols */ in read_vol_complexity_estimation_header()
297 READ_BITS(gb, 1, &(e->vlc_bits)); /* vlc_bits */ in read_vol_complexity_estimation_header()
300 READ_BITS(gb, 1, &val); in read_vol_complexity_estimation_header()
302 READ_BITS(gb, 1, &(e->apm)); /* apm */ in read_vol_complexity_estimation_header()
303 READ_BITS(gb, 1, &(e->npm)); /* npm */ in read_vol_complexity_estimation_header()
304 READ_BITS(gb, 1, &(e->interpolate_mc_q)); /* interpolate_mc_q */ in read_vol_complexity_estimation_header()
305 READ_BITS(gb, 1, &(e->forw_back_mc_q)); /* forw_back_mc_q */ in read_vol_complexity_estimation_header()
306 READ_BITS(gb, 1, &(e->halfpel2)); /* halfpel2 */ in read_vol_complexity_estimation_header()
307 READ_BITS(gb, 1, &(e->halfpel4)); /* halfpel4 */ in read_vol_complexity_estimation_header()
310 SKIP_BITS(gb, 1); in read_vol_complexity_estimation_header()
313 READ_BITS(gb, 1, &val); in read_vol_complexity_estimation_header()
315 READ_BITS(gb, 1, &(e->sadct)); /* sadct */ in read_vol_complexity_estimation_header()
316 READ_BITS(gb, 1, &(e->quarterpel)); /* quarterpel */ in read_vol_complexity_estimation_header()
327 static MPP_RET read_vop_complexity_estimation_header(Mpeg4Estimation *e, BitReadCtx_t *gb, Mpg4Hdr … in read_vop_complexity_estimation_header() argument
331 if (e->opaque) SKIP_BITS(gb, 8); /* dcecs_opaque */ in read_vop_complexity_estimation_header()
332 if (e->transparent) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
333 if (e->intra_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
334 if (e->inter_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
335 if (e->no_update) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
336 if (e->upsampling) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
337 if (e->intra_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
338 if (e->not_coded_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
339 if (e->dct_coefs) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
340 if (e->dct_lines) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
341 if (e->vlc_symbols) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
342 if (e->vlc_bits) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
343 if (e->sadct) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
347 if (e->opaque) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
348 if (e->transparent) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
349 if (e->intra_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
350 if (e->inter_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
351 if (e->no_update) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
352 if (e->upsampling) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
353 if (e->intra_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
354 if (e->not_coded_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
355 if (e->dct_coefs) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
356 if (e->dct_lines) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
357 if (e->vlc_symbols) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
358 if (e->vlc_bits) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
359 if (e->inter_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
360 if (e->inter4v_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
361 if (e->apm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
362 if (e->npm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
363 if (e->forw_back_mc_q) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
364 if (e->halfpel2) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
365 if (e->halfpel4) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
366 if (e->sadct) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
367 if (e->quarterpel) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
371 if (e->opaque) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
372 if (e->transparent) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
373 if (e->intra_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
374 if (e->inter_cae) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
375 if (e->no_update) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
376 if (e->upsampling) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
377 if (e->intra_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
378 if (e->not_coded_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
379 if (e->dct_coefs) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
380 if (e->dct_lines) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
381 if (e->vlc_symbols) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
382 if (e->vlc_bits) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
383 if (e->inter_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
384 if (e->inter4v_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
385 if (e->apm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
386 if (e->npm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
387 if (e->forw_back_mc_q) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
388 if (e->halfpel2) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
389 if (e->halfpel4) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
390 if (e->interpolate_mc_q) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
391 if (e->sadct) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
392 if (e->quarterpel) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
397 if (e->intra_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
398 if (e->not_coded_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
399 if (e->dct_coefs) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
400 if (e->dct_lines) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
401 if (e->vlc_symbols) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
402 if (e->vlc_bits) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
403 if (e->inter_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
404 if (e->inter4v_blocks) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
405 if (e->apm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
406 if (e->npm) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
407 if (e->forw_back_mc_q) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
408 if (e->halfpel2) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
409 if (e->halfpel4) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
410 if (e->interpolate_mc_q) SKIP_BITS(gb, 8); /* */ in read_vop_complexity_estimation_header()
705 static MPP_RET mpg4d_parse_user_data(Mpg4dParserImpl *p, BitReadCtx_t *gb) in mpg4d_parse_user_data() argument
709 RK_U32 remain_bit = gb->bytes_left_ * 8 + gb->num_remaining_bits_in_curr_byte_; in mpg4d_parse_user_data()
714 for (i = 0; i < 255 && gb->bytes_left_; i++) { in mpg4d_parse_user_data()
718 SHOW_BITS(gb, show_bit, &val); in mpg4d_parse_user_data()
722 READ_BITS(gb, 8, &val); in mpg4d_parse_user_data()
785 static MPP_RET mpeg4_parse_gop_header(Mpg4dParserImpl *p, BitReadCtx_t *gb) in mpeg4_parse_gop_header() argument
790 READ_BITS(gb, 5, &hours); in mpeg4_parse_gop_header()
791 READ_BITS(gb, 6, &minutes); in mpeg4_parse_gop_header()
792 SKIP_BITS(gb, 1); in mpeg4_parse_gop_header()
793 READ_BITS(gb, 6, &seconds); in mpeg4_parse_gop_header()
795 SKIP_BITS(gb, 1); /* closed_gov */ in mpeg4_parse_gop_header()
796 SKIP_BITS(gb, 1); /* broken_link */ in mpeg4_parse_gop_header()
814 static MPP_RET mpeg4_parse_vop_header(Mpg4dParserImpl *p, BitReadCtx_t *gb) in mpeg4_parse_vop_header() argument
821 READ_BITS(gb, 2, &(mp4Hdr->vop.coding_type)); /* vop_coding_type */ in mpeg4_parse_vop_header()
823 READ_BITS(gb, 1, &val); in mpeg4_parse_vop_header()
826 READ_BITS(gb, 1, &val); in mpeg4_parse_vop_header()
829 SKIP_BITS(gb, 1); in mpeg4_parse_vop_header()
833 READ_BITS(gb, mp4Hdr->vol.time_inc_bits, &time_increment); in mpeg4_parse_vop_header()
847 SKIP_BITS(gb, 1); in mpeg4_parse_vop_header()
849 READ_BITS(gb, 1, &val); in mpeg4_parse_vop_header()
868 READ_BITS(gb, (MPP_MIN(mp4Hdr->vol.time_inc_bits + 3, 15)), &vop_id); in mpeg4_parse_vop_header()
870 READ_BITS(gb, 1, &val); in mpeg4_parse_vop_header()
873 READ_BITS(gb, MPP_MIN(mp4Hdr->vol.time_inc_bits + 3, 15), &vop_id_for_prediction); in mpeg4_parse_vop_header()
876 SKIP_BITS(gb, 1); in mpeg4_parse_vop_header()
883 READ_BITS(gb, 1, &(mp4Hdr->vop.rounding)); /* rounding_type */ in mpeg4_parse_vop_header()
890 READ_BITS(gb, 1, &val); in mpeg4_parse_vop_header()
897 … read_vop_complexity_estimation_header(&p->estimation, gb, mp4Hdr, mp4Hdr->vop.coding_type); in mpeg4_parse_vop_header()
900 READ_BITS(gb, 3, &val); in mpeg4_parse_vop_header()
907 READ_BITS(gb, 1, &(mp4Hdr->vop.top_field_first)); in mpeg4_parse_vop_header()
908 READ_BITS(gb, 1, &(mp4Hdr->vop.alternate_vertical_scan)); in mpeg4_parse_vop_header()
920 READ_BITS(gb, mp4Hdr->vol.quant_bits, &(mp4Hdr->vop.quant)); in mpeg4_parse_vop_header()
925 READ_BITS(gb, 3, &(mp4Hdr->vop.fcode_forward)); /* fcode_forward */ in mpeg4_parse_vop_header()
929 READ_BITS(gb, 3, &(mp4Hdr->vop.fcode_backward)); /* fcode_backward */ in mpeg4_parse_vop_header()
935 SKIP_BITS(gb, 1); /* vop_shape_coding_type */ in mpeg4_parse_vop_header()
940 mp4Hdr->vop.hdr_bits = gb->used_bits; in mpeg4_parse_vop_header()
1242 BitReadCtx_t *gb = p->bit_ctx; in mpp_mpg4_parser_decode() local
1250 mpp_set_bitread_ctx(gb, buf, len); in mpp_mpg4_parser_decode()
1253 while (gb->bytes_left_) { in mpp_mpg4_parser_decode()
1256 READ_BITS(gb, 8, &val); in mpp_mpg4_parser_decode()
1262 mpg4d_dbg_bit("found startcode at byte %d\n", gb->used_bits >> 3); in mpp_mpg4_parser_decode()
1323 ret = mpg4d_parse_vol_header(p, gb); in mpp_mpg4_parser_decode()
1327 ret = mpg4d_parse_user_data(p, gb); in mpp_mpg4_parser_decode()
1329 ret = mpeg4_parse_gop_header(p, gb); in mpp_mpg4_parser_decode()
1331 ret = mpeg4_parse_profile_level(p, gb); in mpp_mpg4_parser_decode()
1333 ret = mpeg4_parse_vop_header(p, gb); in mpp_mpg4_parser_decode()
1341 mpp_align_get_bits(gb); in mpp_mpg4_parser_decode()
1352 mpp_align_get_bits(gb); in mpp_mpg4_parser_decode()
1376 RK_U32 used_bytes = gb->used_bits >> 3; in mpp_mpg4_parser_decode()