@@ -530,7 +530,7 @@ namespace ojph {
530530 /* * @brief State structure for reading and unstuffing of forward-growing
531531 * bitstreams; these are: MagSgn and SPP bitstreams
532532 */
533- struct frwd_struct {
533+ struct frwd_struct64 {
534534 const ui8* data; // !<pointer to bitstream
535535 ui64 tmp; // !<temporary buffer of read data
536536 ui32 bits; // !<number of bits stored in tmp
@@ -553,12 +553,12 @@ namespace ojph {
553553 * Reading can go beyond the end of buffer by up to 3 bytes.
554554 *
555555 * @tparam X is the value fed in when the bitstream is exhausted
556- * @param [in] msp is a pointer to frwd_struct structure
556+ * @param [in] msp is a pointer to frwd_struct64 structure
557557 *
558558 */
559559 template <int X>
560560 static inline
561- void frwd_read (frwd_struct *msp)
561+ void frwd_read (frwd_struct64 *msp)
562562 {
563563 assert (msp->bits <= 32 ); // assert that there is a space for 32 bits
564564
@@ -617,12 +617,12 @@ namespace ojph {
617617 * MSB of the next byte is set 0 and must be ignored during decoding.
618618 *
619619 * @tparam X is the value fed in when the bitstream is exhausted
620- * @param [in] msp is a pointer to frwd_struct structure
620+ * @param [in] msp is a pointer to frwd_struct64 structure
621621 *
622622 */
623623 template <ui8 X>
624624 static inline
625- void frwd_read8 (frwd_struct *msp)
625+ void frwd_read8 (frwd_struct64 *msp)
626626 {
627627 ui8 val = X;
628628 if (msp->size > 0 ) {
@@ -640,17 +640,17 @@ namespace ojph {
640640 }
641641
642642 // ************************************************************************/
643- /* * @brief Initialize frwd_struct struct and reads some bytes
643+ /* * @brief Initialize frwd_struct64 struct and reads some bytes
644644 *
645645 * @tparam X is the value fed in when the bitstream is exhausted.
646646 * See frwd_read regarding the template
647- * @param [in] msp is a pointer to frwd_struct
647+ * @param [in] msp is a pointer to frwd_struct64
648648 * @param [in] data is a pointer to the start of data
649649 * @param [in] size is the number of byte in the bitstream
650650 */
651651 template <int X>
652652 static inline
653- void frwd_init (frwd_struct *msp, const ui8* data, int size)
653+ void frwd_init (frwd_struct64 *msp, const ui8* data, int size)
654654 {
655655 msp->data = data;
656656 msp->tmp = 0 ;
@@ -676,17 +676,17 @@ namespace ojph {
676676 }
677677
678678 // ************************************************************************/
679- /* * @brief Initialize frwd_struct struct and reads some bytes
679+ /* * @brief Initialize frwd_struct64 struct and reads some bytes
680680 *
681681 * @tparam X is the value fed in when the bitstream is exhausted.
682682 * See frwd_read regarding the template
683- * @param [in] msp is a pointer to frwd_struct
683+ * @param [in] msp is a pointer to frwd_struct64
684684 * @param [in] data is a pointer to the start of data
685685 * @param [in] size is the number of byte in the bitstream
686686 */
687687 template <ui8 X>
688688 static inline
689- void frwd_init8 (frwd_struct *msp, const ui8* data, int size)
689+ void frwd_init8 (frwd_struct64 *msp, const ui8* data, int size)
690690 {
691691 msp->data = data;
692692 msp->tmp = 0 ;
@@ -697,29 +697,29 @@ namespace ojph {
697697 }
698698
699699 // ************************************************************************/
700- /* * @brief Consume num_bits bits from the bitstream of frwd_struct
700+ /* * @brief Consume num_bits bits from the bitstream of frwd_struct64
701701 *
702- * @param [in] msp is a pointer to frwd_struct
702+ * @param [in] msp is a pointer to frwd_struct64
703703 * @param [in] num_bits is the number of bit to consume
704704 */
705705 static inline
706- void frwd_advance (frwd_struct *msp, ui32 num_bits)
706+ void frwd_advance (frwd_struct64 *msp, ui32 num_bits)
707707 {
708708 assert (num_bits <= msp->bits );
709709 msp->tmp >>= num_bits; // consume num_bits
710710 msp->bits -= num_bits;
711711 }
712712
713713 // ************************************************************************/
714- /* * @brief Fetches 32 bits from the frwd_struct bitstream
714+ /* * @brief Fetches 32 bits from the frwd_struct64 bitstream
715715 *
716716 * @tparam X is the value fed in when the bitstream is exhausted.
717717 * See frwd_read regarding the template
718- * @param [in] msp is a pointer to frwd_struct
718+ * @param [in] msp is a pointer to frwd_struct64
719719 */
720720 template <int X>
721721 static inline
722- ui32 frwd_fetch (frwd_struct *msp)
722+ ui32 frwd_fetch (frwd_struct64 *msp)
723723 {
724724 if (msp->bits < 32 )
725725 {
@@ -731,15 +731,15 @@ namespace ojph {
731731 }
732732
733733 // ************************************************************************/
734- /* * @brief Fetches up to 64 bits from the frwd_struct bitstream
734+ /* * @brief Fetches up to 64 bits from the frwd_struct64 bitstream
735735 *
736736 * @tparam X is the value fed in when the bitstream is exhausted.
737737 * See frwd_read regarding the template
738- * @param [in] msp is a pointer to frwd_struct
738+ * @param [in] msp is a pointer to frwd_struct64
739739 */
740740 template <ui8 X>
741741 static inline
742- ui64 frwd_fetch64 (frwd_struct *msp)
742+ ui64 frwd_fetch64 (frwd_struct64 *msp)
743743 {
744744 while (msp->bits <= 56 )
745745 frwd_read8<X>(msp);
@@ -1147,7 +1147,7 @@ namespace ojph {
11471147 const int v_n_size = 512 + 4 ;
11481148 ui64 v_n_scratch[v_n_size] = {0 }; // 4+ kB
11491149
1150- frwd_struct magsgn;
1150+ frwd_struct64 magsgn;
11511151 frwd_init8<0xFF >(&magsgn, coded_data, lcup - scup);
11521152
11531153 const ui16 *sp = scratch;
@@ -1415,7 +1415,7 @@ namespace ojph {
14151415 // We add an extra 8 entries, just in case we need more
14161416 ui16 prev_row_sig[256 + 8 ] = {0 }; // 528 Bytes
14171417
1418- frwd_struct sigprop;
1418+ frwd_struct64 sigprop;
14191419 frwd_init<0 >(&sigprop, coded_data + lengths1, (int )lengths2);
14201420
14211421 for (ui32 y = 0 ; y < height; y += 4 )
0 commit comments