Ticket #11435: SPS-H264Parser-0.26.patch
File SPS-H264Parser-0.26.patch, 22.1 KB (added by , 11 years ago) |
---|
-
mythtv/libs/libmythtv/avformatdecoder.cpp
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp index 1376f5d..1d730ac 100644
a b int AvFormatDecoder::H264PreProcessPkt(AVStream *stream, AVPacket *pkt) 3013 3013 { 3014 3014 buf += m_h264_parser->addBytes(buf, buf_end - buf, 0); 3015 3015 3016 if (m_h264_parser->stateChanged() )3016 if (m_h264_parser->stateChanged() && m_h264_parser->seen_SPS()) 3017 3017 { 3018 3018 if (m_h264_parser->FieldType() != H264Parser::FIELD_BOTTOM) 3019 3019 { -
mythtv/libs/libmythtv/mpeg/H264Parser.cpp
diff --git a/mythtv/libs/libmythtv/mpeg/H264Parser.cpp b/mythtv/libs/libmythtv/mpeg/H264Parser.cpp index 716b7a1..016217a 100644
a b void H264Parser::Reset(void) 115 115 prev_pic_parameter_set_id = pic_parameter_set_id = -1; 116 116 prev_field_pic_flag = field_pic_flag = -1; 117 117 prev_bottom_field_flag = bottom_field_flag = -1; 118 prev_nal_ref_idc = nal_ref_idc = 0;118 prev_nal_ref_idc = nal_ref_idc = 111; // != [0|1|2|3] 119 119 prev_pic_order_cnt_type = pic_order_cnt_type = 120 120 prev_pic_order_cnt_lsb = pic_order_cnt_lsb = 0; 121 121 prev_delta_pic_order_cnt_bottom = delta_pic_order_cnt_bottom = 0; 122 122 prev_delta_pic_order_cnt[0] = delta_pic_order_cnt[0] = 0; 123 123 prev_delta_pic_order_cnt[1] = delta_pic_order_cnt[1] = 0; 124 124 prev_nal_unit_type = nal_unit_type = UNKNOWN; 125 prev_idr_pic_id = idr_pic_id = 0; 125 126 // The value of idr_pic_id shall be in the range of 0 to 65535, inclusive. 127 prev_idr_pic_id = idr_pic_id = 65536; 126 128 127 129 log2_max_frame_num = log2_max_pic_order_cnt_lsb = 0; 128 130 seq_parameter_set_id = 0; … … bool H264Parser::fillRBSP(const uint8_t *byteP, uint32_t byte_count, 368 370 /* If we've found the next start code then that, plus the first byte of 369 371 * the next NAL, plus the preceding zero bytes will all be in the rbsp 370 372 * buffer. Move rbsp_index++ back to the end of the actual rbsp data. We 371 * need to know the correct size of the rbsp to decode some NALs. */ 373 * need to know the correct size of the rbsp to decode some NALs. 374 */ 372 375 if (found_start_code) 373 376 { 374 377 if (rbsp_index >= 4) … … uint32_t H264Parser::addBytes(const uint8_t *bytes, 399 402 const uint8_t *startP = bytes; 400 403 const uint8_t *endP; 401 404 bool found_start_code; 405 bool good_nal_unit; 402 406 403 407 state_changed = false; 404 408 on_frame = false; … … uint32_t H264Parser::addBytes(const uint8_t *bytes, 413 417 414 418 /* Between startP and endP we potentially have some more 415 419 * bytes of a NAL that we've been parsing (plus some bytes of 416 * start code) */ 420 * start code) 421 */ 417 422 if (have_unfinished_NAL) 418 423 { 419 424 if (!fillRBSP(startP, endP - startP, found_start_code)) … … uint32_t H264Parser::addBytes(const uint8_t *bytes, 447 452 /* If we find the start of an AU somewhere from here 448 453 * to the next start code, the offset to associate with 449 454 * it is the one passed in to this call, not any of the 450 * subsequent calls. */ 455 * subsequent calls. 456 */ 451 457 pkt_offset = stream_offset; // + (startP - bytes); 458 452 459 /* 453 460 nal_unit_type specifies the type of RBSP data structure contained in 454 461 the NAL unit as specified in Table 7-1. VCL NAL units … … uint32_t H264Parser::addBytes(const uint8_t *bytes, 472 479 nal_unit_type = sync_accumulator & 0x1f; 473 480 nal_ref_idc = (sync_accumulator >> 5) & 0x3; 474 481 475 if (nal_unit_type == SPS || nal_unit_type == PPS ||476 nal_unit_type == SEI || NALisSlice(nal_unit_type))482 good_nal_unit = true; 483 if (nal_ref_idc) 477 484 { 478 /* This is a NAL we need to parse. We may have the body 479 * of it in the part of the stream past to us this call, 480 * or we may get the rest in subsequent calls to addBytes. 481 * Either way, we set have_unfinished_NAL, so that we 482 * start filling the rbsp buffer */ 483 have_unfinished_NAL = true; 485 /* nal_ref_idc shall be equal to 0 for all NAL units having 486 * nal_unit_type equal to 6, 9, 10, 11, or 12. 487 */ 488 if (nal_unit_type == SEI || 489 (nal_unit_type >= AU_DELIMITER && 490 nal_unit_type <= FILLER_DATA)) 491 good_nal_unit = false; 484 492 } 485 else if (nal_unit_type == AU_DELIMITER || 486 (nal_unit_type > SPS_EXT && 487 nal_unit_type < AUXILIARY_SLICE)) 493 else 488 494 { 489 set_AU_pending(); 495 /* nal_ref_idc shall not be equal to 0 for NAL units with 496 * nal_unit_type equal to 5 497 */ 498 if (nal_unit_type == SLICE_IDR) 499 good_nal_unit = false; 490 500 } 491 } 501 502 if (good_nal_unit) 503 { 504 if (nal_unit_type == SPS || nal_unit_type == PPS || 505 nal_unit_type == SEI || NALisSlice(nal_unit_type)) 506 { 507 /* This is a NAL we need to parse. We may have the body 508 * of it in the part of the stream past to us this call, 509 * or we may get the rest in subsequent calls to addBytes. 510 * Either way, we set have_unfinished_NAL, so that we 511 * start filling the rbsp buffer 512 */ 513 have_unfinished_NAL = true; 514 } 515 else if (nal_unit_type == AU_DELIMITER || 516 (nal_unit_type > SPS_EXT && 517 nal_unit_type < AUXILIARY_SLICE)) 518 { 519 set_AU_pending(); 520 } 521 } 522 else 523 LOG(VB_GENERAL, LOG_ERR, 524 "H264Parser::addbytes: malformed NAL units"); 525 } //found start code 492 526 } 493 527 494 528 return startP - bytes; … … void H264Parser::processRBSP(bool rbsp_complete) 505 539 { 506 540 /* SEI cannot be parsed without knowing its size. If 507 541 * we haven't got the whole rbsp, return and wait for 508 * the rest */ 542 * the rest 543 */ 509 544 if (!rbsp_complete) 510 545 return; 511 546 … … void H264Parser::processRBSP(bool rbsp_complete) 521 556 522 557 set_AU_pending(); 523 558 559 if (!seen_sps) 560 SPS_offset = pkt_offset; 561 524 562 decode_SPS(&gb); 525 563 } 526 564 else if (nal_unit_type == PPS) … … void H264Parser::processRBSP(bool rbsp_complete) 553 591 if (AU_pending && NALisSlice(nal_unit_type)) 554 592 { 555 593 /* Once we know the slice type of a new AU, we can 556 * determine if it is a keyframe or just a frame */557 594 * determine if it is a keyframe or just a frame 595 */ 558 596 AU_pending = false; 559 597 state_changed = true; 560 598 … … void H264Parser::processRBSP(bool rbsp_complete) 574 612 */ 575 613 bool H264Parser::decode_Header(GetBitContext *gb) 576 614 { 577 uint first_mb_in_slice;615 // uint first_mb_in_slice; 578 616 579 617 is_keyframe = false; 580 618 … … bool H264Parser::decode_Header(GetBitContext *gb) 601 639 that precedes the current slice in decoding order and has the 602 640 same value of colour_plane_id. 603 641 */ 604 first_mb_in_slice =get_ue_golomb(gb);642 /* first_mb_in_slice = */ get_ue_golomb(gb); 605 643 606 644 /* 607 645 slice_type specifies the coding type of the slice according to … … bool H264Parser::decode_Header(GetBitContext *gb) 610 648 When nal_unit_type is equal to 5 (IDR picture), slice_type shall 611 649 be equal to 2, 4, 7, or 9 (I or SI) 612 650 */ 613 slice_type = get_ue_golomb(gb); 651 slice_type = get_ue_golomb_31(gb); 652 653 /* s->pict_type = golomb_to_pict_type[slice_type % 5]; 654 */ 614 655 615 656 /* 616 657 pic_parameter_set_id specifies the picture parameter set in … … bool H264Parser::decode_Header(GetBitContext *gb) 641 682 bitstream.... 642 683 643 684 If the current picture is an IDR picture, frame_num shall be equal to 0. 644 */645 685 686 When max_num_ref_frames is equal to 0, slice_type shall be equal 687 to 2, 4, 7, or 9. 688 */ 646 689 frame_num = get_bits(gb, log2_max_frame_num); 647 690 648 691 /* … … bool H264Parser::decode_Header(GetBitContext *gb) 656 699 picture is a coded top field. When this syntax element is not present 657 700 for the current slice, it shall be inferred to be equal to 0. 658 701 */ 659 660 702 if (!frame_mbs_only_flag) 661 703 { 662 704 field_pic_flag = get_bits1(gb); … … bool H264Parser::decode_Header(GetBitContext *gb) 677 719 second such IDR access unit. The value of idr_pic_id shall be in 678 720 the range of 0 to 65535, inclusive. 679 721 */ 680 681 722 if (nal_unit_type == SLICE_IDR) 682 723 { 683 724 idr_pic_id = get_ue_golomb(gb); 684 725 is_keyframe = true; 685 726 } 686 727 else 687 is_keyframe |= I_is_keyframe && isKeySlice(slice_type); 728 is_keyframe = (I_is_keyframe && isKeySlice(slice_type)); 729 688 730 /* 689 731 pic_order_cnt_lsb specifies the picture order count modulo 690 732 MaxPicOrderCntLsb for the top field of a coded frame or for a coded … … bool H264Parser::decode_Header(GetBitContext *gb) 701 743 { 702 744 pic_order_cnt_lsb = get_bits(gb, log2_max_pic_order_cnt_lsb); 703 745 704 if ( pic_order_present_flag&& !field_pic_flag)746 if ((pic_order_present_flag == 1) && !field_pic_flag) 705 747 delta_pic_order_cnt_bottom = get_se_golomb(gb); 706 748 else 707 749 delta_pic_order_cnt_bottom = 0; … … bool H264Parser::decode_Header(GetBitContext *gb) 710 752 delta_pic_order_cnt_bottom = 0; 711 753 712 754 /* 713 delta_pic_order_cnt[ 0 ] specifies the picture order count 714 difference from the expected picture order count for the top 715 field of a coded frame or for a coded field as specified in 716 subclause 8.2.1. The value of delta_pic_order_cnt[ 0 ] shall be 717 in the range of -231 to 231 - 1, inclusive. When this syntax 718 element is not present in the bitstream for the current slice, 719 it shall be inferred to be equal to 0. 720 721 delta_pic_order_cnt[ 1 ] specifies the picture order count 722 difference from the expected picture order count for the bottom 723 field of a coded frame specified in subclause 8.2.1. The value 724 of delta_pic_order_cnt[ 1 ] shall be in the range of -231 to 231 725 - 1, inclusive. When this syntax element is not present in the 726 bitstream for the current slice, it shall be inferred to be 727 equal to 0. 728 */ 729 if (pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag) 755 delta_pic_order_always_zero_flag equal to 1 specifies that 756 delta_pic_order_cnt[ 0 ] and delta_pic_order_cnt[ 1 ] are not 757 present in the slice headers of the sequence and shall be 758 inferred to be equal to 0. delta_pic_order_always_zero_flag 759 equal to 0 specifies that delta_pic_order_cnt[ 0 ] is present in 760 the slice headers of the sequence and delta_pic_order_cnt[ 1 ] 761 may be present in the slice headers of the sequence. 762 */ 763 if (delta_pic_order_always_zero_flag) 730 764 { 765 delta_pic_order_cnt[1] = delta_pic_order_cnt[0] = 0; 766 } 767 else if (pic_order_cnt_type == 1) 768 { 769 /* 770 delta_pic_order_cnt[ 0 ] specifies the picture order count 771 difference from the expected picture order count for the top 772 field of a coded frame or for a coded field as specified in 773 subclause 8.2.1. The value of delta_pic_order_cnt[ 0 ] shall 774 be in the range of -2^31 to 2^31 - 1, inclusive. When this 775 syntax element is not present in the bitstream for the 776 current slice, it shall be inferred to be equal to 0. 777 778 delta_pic_order_cnt[ 1 ] specifies the picture order count 779 difference from the expected picture order count for the 780 bottom field of a coded frame specified in subclause 781 8.2.1. The value of delta_pic_order_cnt[ 1 ] shall be in the 782 range of -2^31 to 2^31 - 1, inclusive. When this syntax 783 element is not present in the bitstream for the current 784 slice, it shall be inferred to be equal to 0. 785 */ 731 786 delta_pic_order_cnt[0] = get_se_golomb(gb); 732 787 733 if ( pic_order_present_flag&& !field_pic_flag)788 if ((pic_order_present_flag == 1) && !field_pic_flag) 734 789 delta_pic_order_cnt[1] = get_se_golomb(gb); 735 790 else 736 791 delta_pic_order_cnt[1] = 0; 737 } 738 else 739 delta_pic_order_cnt[0] = 0; 792 } 740 793 741 794 /* 742 795 redundant_pic_cnt shall be equal to 0 for slices and slice data … … bool H264Parser::decode_Header(GetBitContext *gb) 747 800 be equal to 0. The value of redundant_pic_cnt shall be in the 748 801 range of 0 to 127, inclusive. 749 802 */ 750 751 803 redundant_pic_cnt = redundant_pic_cnt_present_flag ? get_ue_golomb(gb) : 0; 752 804 753 805 return true; … … bool H264Parser::decode_Header(GetBitContext *gb) 759 811 void H264Parser::decode_SPS(GetBitContext * gb) 760 812 { 761 813 int profile_idc, chroma_format_idc; 814 int lastScale; 815 int nextScale; 816 int deltaScale; 762 817 763 818 seen_sps = true; 764 819 765 profile_idc = get_bits(gb, 8); // profile_idc820 profile_idc = get_bits(gb, 8); 766 821 get_bits1(gb); // constraint_set0_flag 767 822 get_bits1(gb); // constraint_set1_flag 768 823 get_bits1(gb); // constraint_set2_flag … … void H264Parser::decode_SPS(GetBitContext * gb) 771 826 get_bits(gb, 8); // level_idc 772 827 get_ue_golomb(gb); // sps_id 773 828 774 if (profile_idc >= 100) 829 if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 || 830 profile_idc == 244 || profile_idc == 44 || profile_idc == 83 || 831 profile_idc == 86 || profile_idc == 118 || profile_idc == 128 ) 775 832 { // high profile 776 if ((chroma_format_idc = get_ue_golomb(gb)) == 3) // chroma_format_idc833 if ((chroma_format_idc = get_ue_golomb(gb)) == 3) 777 834 separate_colour_plane_flag = (get_bits1(gb) == 1); 778 835 779 836 get_ue_golomb(gb); // bit_depth_luma_minus8 … … void H264Parser::decode_SPS(GetBitContext * gb) 784 841 { 785 842 for (int idx = 0; idx < ((chroma_format_idc != 3) ? 8 : 12); ++idx) 786 843 { 787 if (get_bits1(gb)) // Scaling list pres nent844 if (get_bits1(gb)) // Scaling list present 788 845 { 846 lastScale = nextScale = 8; 789 847 int sl_n = ((idx < 6) ? 16 : 64); 790 for(int sl_i = 0; sl_i < sl_n; sl_i++)848 for(int sl_i = 0; sl_i < sl_n; ++sl_i) 791 849 { 792 get_se_golomb(gb); 850 if (nextScale != 0) 851 { 852 deltaScale = get_se_golomb(gb); 853 nextScale = (lastScale + deltaScale + 256) % 256; 854 } 855 lastScale = (nextScale == 0) ? lastScale : nextScale; 793 856 } 794 857 } 795 858 } … … void H264Parser::decode_SPS(GetBitContext * gb) 808 871 int offset_for_non_ref_pic; 809 872 int offset_for_top_to_bottom_field; 810 873 uint tmp; 811 bool gaps_in_frame_num_allowed_flag;874 // bool gaps_in_frame_num_allowed_flag; 812 875 813 876 /* 814 877 pic_order_cnt_type specifies the method to decode picture order … … void H264Parser::decode_SPS(GetBitContext * gb) 841 904 0. delta_pic_order_always_zero_flag 842 905 */ 843 906 delta_pic_order_always_zero_flag = get_bits1(gb); 907 844 908 /* 845 909 offset_for_non_ref_pic is used to calculate the picture 846 910 order count of a non-reference picture as specified in … … void H264Parser::decode_SPS(GetBitContext * gb) 848 912 range of -231 to 231 - 1, inclusive. 849 913 */ 850 914 offset_for_non_ref_pic = get_se_golomb(gb); 915 851 916 /* 852 917 offset_for_top_to_bottom_field is used to calculate the 853 918 picture order count of a bottom field as specified in … … void H264Parser::decode_SPS(GetBitContext * gb) 855 920 shall be in the range of -231 to 231 - 1, inclusive. 856 921 */ 857 922 offset_for_top_to_bottom_field = get_se_golomb(gb); 923 858 924 /* 859 925 offset_for_ref_frame[ i ] is an element of a list of 860 926 num_ref_frames_in_pic_order_cnt_cycle values used in the … … void H264Parser::decode_SPS(GetBitContext * gb) 878 944 specified in subclause A.3.1 or A.3.2), inclusive. 879 945 */ 880 946 num_ref_frames = get_ue_golomb(gb); 947 881 948 /* 882 949 gaps_in_frame_num_value_allowed_flag specifies the allowed 883 950 values of frame_num as specified in subclause 7.4.3 and the 884 951 decoding process in case of an inferred gap between values of 885 952 frame_num as specified in subclause 8.2.5.2. 886 953 */ 887 gaps_in_frame_num_allowed_flag =get_bits1(gb);954 /* gaps_in_frame_num_allowed_flag = */ get_bits1(gb); 888 955 889 956 /* 890 957 pic_width_in_mbs_minus1 plus 1 specifies the width of each 891 958 decoded picture in units of macroblocks. 16 macroblocks in a row 892 959 */ 893 960 pic_width = (get_ue_golomb(gb) + 1) * 16; 961 894 962 /* 895 963 pic_height_in_map_units_minus1 plus 1 specifies the height in 896 964 slice group map units of a decoded frame or field. 16 … … void H264Parser::decode_SPS(GetBitContext * gb) 909 977 if (!frame_mbs_only_flag) 910 978 { 911 979 pic_height *= 2; 980 912 981 /* 913 982 mb_adaptive_frame_field_flag equal to 0 specifies no 914 983 switching between frame and field macroblocks within a … … void H264Parser::decode_PPS(GetBitContext * gb) 966 1035 inclusive. 967 1036 */ 968 1037 pic_parameter_set_id = get_ue_golomb(gb); 1038 969 1039 /* 970 1040 seq_parameter_set_id refers to the active sequence parameter 971 1041 set. The value of seq_parameter_set_id shall be in the range of … … void H264Parser::decode_PPS(GetBitContext * gb) 973 1043 */ 974 1044 seq_parameter_set_id = get_ue_golomb(gb); 975 1045 get_bits1(gb); // entropy_coding_mode_flag; 1046 976 1047 /* 977 1048 pic_order_present_flag equal to 1 specifies that the picture 978 1049 order count related syntax elements are present in the slice … … void H264Parser::decode_SEI(GetBitContext *gb) 1046 1117 { 1047 1118 do { 1048 1119 type += show_bits(gb, 8); 1049 } while (get_bits(gb, 8) == 255);1120 } while (get_bits(gb, 8) == 0xFF); 1050 1121 1051 1122 do { 1052 1123 size += show_bits(gb, 8); 1053 } while (get_bits(gb, 8) == 255);1124 } while (get_bits(gb, 8) == 0xFF); 1054 1125 1055 1126 switch (type) 1056 1127 { 1057 case SEI_TYPE_RECOVERY_POINT: 1058 recovery_frame_cnt = get_ue_golomb(gb); 1059 exact_match_flag = get_bits1(gb); 1060 broken_link_flag = get_bits1(gb); 1061 changing_group_slice_idc = get_bits(gb, 2); 1062 au_contains_keyframe_message = (recovery_frame_cnt == 0); 1063 return; 1064 1065 default: 1066 skip_bits(gb, size * 8); 1067 break; 1128 case SEI_TYPE_RECOVERY_POINT: 1129 recovery_frame_cnt = get_ue_golomb(gb); 1130 exact_match_flag = get_bits1(gb); 1131 broken_link_flag = get_bits1(gb); 1132 changing_group_slice_idc = get_bits(gb, 2); 1133 au_contains_keyframe_message = (recovery_frame_cnt == 0); 1134 if ((size - 12) > 0) 1135 skip_bits(gb, (size - 12) * 8); 1136 return; 1137 1138 default: 1139 skip_bits(gb, size * 8); 1140 break; 1068 1141 } 1069 1142 } 1070 1143 } -
mythtv/libs/libmythtv/mpeg/H264Parser.h
diff --git a/mythtv/libs/libmythtv/mpeg/H264Parser.h b/mythtv/libs/libmythtv/mpeg/H264Parser.h index 3d8ffaa..21a0b68 100644
a b class H264Parser { 58 58 // ITU-T Rec. H.264 table 7-1 59 59 enum NAL_unit_type { 60 60 UNKNOWN = 0, 61 SLICE = 1, 61 SLICE = 1, // 1 - 5 are VCL NAL units 62 62 SLICE_DPA = 2, 63 63 SLICE_DPB = 3, 64 64 SLICE_DPC = 4, … … class H264Parser { 71 71 END_STREAM = 11, 72 72 FILLER_DATA = 12, 73 73 SPS_EXT = 13, 74 AUXILIARY_SLICE = 19 74 NALU_prefix = 14, 75 SPS_subset = 15, 76 AUXILIARY_SLICE = 19, 77 SLICE_EXTENSION = 20 75 78 }; 76 79 77 80 enum SEI_type { 78 81 SEI_TYPE_PIC_TIMING = 1, 82 SEI_FILLER_PAYLOAD = 3, 79 83 SEI_TYPE_USER_DATA_UNREGISTERED = 5, 80 84 SEI_TYPE_RECOVERY_POINT = 6 81 85 }; … … class H264Parser { 130 134 } 131 135 132 136 bool onFrameStart(void) const { return on_frame; } 133 bool onKeyFrameStart(void) const { return on_key_frame; }137 bool onKeyFrameStart(void) const { return seen_sps && on_key_frame; } 134 138 135 139 uint pictureWidth(void) const { return pic_width; } 136 140 uint pictureHeight(void) const { return pic_height; } … … class H264Parser { 142 146 143 147 uint64_t frameAUstreamOffset(void) const {return frame_start_offset;} 144 148 uint64_t keyframeAUstreamOffset(void) const {return keyframe_start_offset;} 149 uint64_t SPSstreamOffset(void) const {return SPS_offset;} 145 150 151 // == NAL_type AU_delimiter: primary_pic_type = 5 146 152 static int isKeySlice(uint slice_type) 147 153 { 148 154 return (slice_type == SLICE_I || … … class H264Parser { 159 165 } 160 166 161 167 void use_I_forKeyframes(bool val) { I_is_keyframe = val; } 168 bool using_I_forKeyframes(void) const { return I_is_keyframe; } 162 169 163 170 uint32_t GetTimeScale(void) const { return timeScale; } 164 171 … … class H264Parser { 167 174 void parse_SPS(uint8_t *sps, uint32_t sps_size, 168 175 bool& interlaced, int32_t& max_ref_frames); 169 176 177 bool seen_SPS(void) const { return seen_sps; } 178 179 bool found_AU(void) const { return AU_pending; } 180 170 181 private: 171 182 enum constants {EXTENDED_SAR = 255}; 172 183 … … class H264Parser { 241 252 bool fixedRate; 242 253 243 254 uint64_t pkt_offset, AU_offset, frame_start_offset, keyframe_start_offset; 255 uint64_t SPS_offset; 244 256 bool on_frame, on_key_frame; 245 257 }; 246 258