File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 2424#include " file.h"
2525
2626#include < iomanip>
27+ #include < string>
28+ #include < utility>
29+ #include < vector>
2730#include < libheif/api_structs.h>
2831
2932
@@ -142,10 +145,10 @@ Error Box_evcC::write(StreamWriter& writer) const
142145 writer.write8 (m_configuration.level_idc );
143146 writer.write32 (m_configuration.toolset_idc_h );
144147 writer.write32 (m_configuration.toolset_idc_l );
145- uint8_t bit_depth_luma_minus8 = (( m_configuration.bit_depth_luma - 8 ) & 0b111 ) ;
146- uint8_t bit_depth_chroma_minus8 = ((m_configuration.bit_depth_chroma - 8 ) & 0b111 );
147- uint8_t b = (m_configuration.chroma_format_idc << 6 ) | (bit_depth_luma_minus8 << 3 ) | bit_depth_chroma_minus8 ;
148- writer.write8 (b );
148+ uint8_t chroma_format_idc_bits = m_configuration.chroma_format_idc << 6 ;
149+ uint8_t bit_depth_luma_minus8_bits = ((m_configuration.bit_depth_luma - 8 ) & 0b111 ) << 3 ;
150+ uint8_t bit_depth_chroma_minus8_bits = (( m_configuration.bit_depth_chroma - 8 ) & 0b111 ) ;
151+ writer.write8 (chroma_format_idc_bits | bit_depth_luma_minus8_bits | bit_depth_chroma_minus8_bits );
149152 writer.write16 (m_configuration.pic_width_in_luma_samples );
150153 writer.write16 (m_configuration.pic_height_in_luma_samples );
151154 writer.write8 (m_configuration.lengthSize - 1 );
You can’t perform that action at this time.
0 commit comments