comparison mpeg12.c @ 872:8af5c366e3d9 libavcodec

hurry_up=5 support
author michaelni
date Mon, 18 Nov 2002 09:28:21 +0000
parents eacc2dd8fd9d
children 9d50cf6d6361
comparison
equal deleted inserted replaced
871:efe2d41df15e 872:8af5c366e3d9
1400 init_get_bits(&s->gb, buf, buf_size); 1400 init_get_bits(&s->gb, buf, buf_size);
1401 1401
1402 ref = get_bits(&s->gb, 10); /* temporal ref */ 1402 ref = get_bits(&s->gb, 10); /* temporal ref */
1403 s->pict_type = get_bits(&s->gb, 3); 1403 s->pict_type = get_bits(&s->gb, 3);
1404 dprintf("pict_type=%d number=%d\n", s->pict_type, s->picture_number); 1404 dprintf("pict_type=%d number=%d\n", s->pict_type, s->picture_number);
1405
1406 avctx->pict_type= s->pict_type;
1407 avctx->key_frame= s->pict_type == I_TYPE;
1408
1405 skip_bits(&s->gb, 16); 1409 skip_bits(&s->gb, 16);
1406 if (s->pict_type == P_TYPE || s->pict_type == B_TYPE) { 1410 if (s->pict_type == P_TYPE || s->pict_type == B_TYPE) {
1407 s->full_pel[0] = get_bits1(&s->gb); 1411 s->full_pel[0] = get_bits1(&s->gb);
1408 f_code = get_bits(&s->gb, 3); 1412 f_code = get_bits(&s->gb, 3);
1409 if (f_code == 0) 1413 if (f_code == 0)
1909 mpeg_decode_extension(avctx, 1913 mpeg_decode_extension(avctx,
1910 s->buffer, input_size); 1914 s->buffer, input_size);
1911 break; 1915 break;
1912 default: 1916 default:
1913 if (start_code >= SLICE_MIN_START_CODE && 1917 if (start_code >= SLICE_MIN_START_CODE &&
1914 start_code <= SLICE_MAX_START_CODE) { 1918 start_code <= SLICE_MAX_START_CODE && s2->hurry_up<5) {
1915 ret = mpeg_decode_slice(avctx, picture, 1919 ret = mpeg_decode_slice(avctx, picture,
1916 start_code, s->buffer, input_size); 1920 start_code, s->buffer, input_size);
1917 if (ret == DECODE_SLICE_EOP) { 1921 if (ret == DECODE_SLICE_EOP) {
1918 /* got a picture: exit */ 1922 /* got a picture: exit */
1919 /* first check if we must repeat the frame */ 1923 /* first check if we must repeat the frame */