MCPcopy Create free account
hub / github.com/anyrtcIO-Community/anyRTC-RTMP-OpenSource / bs_read1

Function bs_read1

AnyCore/plydecoder.cc:164–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 return( i_result );//���ܵķ���ֵ֮һΪ��00000000 00000000 00000000 00000001 (4�ֽڳ�)
163}
164int bs_read1( bs_t *s )
165{
166
167 if( s->p < s->p_end )
168 {
169 unsigned int i_result;
170
171 s->i_left--; //��ǰ�ֽ�δ��ȡ��λ������1λ
172 i_result = ( *s->p >> s->i_left )&0x01;//��Ҫ���ı����Ƶ���ǰ�ֽ����ң�Ȼ����0x01:00000001�����߼����������ΪҪ����ֻ��һ�����أ�������ز���0����1����0000 0001��λ��Ϳ��Ե�֪�����
173 if( s->i_left == 0 ) //�����ǰ�ֽ�ʣ��δ��λ����0������˵��ǰ�ֽ�ȫ������
174 {
175 s->p++; //ָ��s->p �Ƶ���һ�ֽ�
176 s->i_left = 8; //���ֽ��У�δ��λ����Ȼ��8λ
177 }
178 return i_result; //unsigned int
179 }
180
181 return 0; //����0Ӧ����û�ж�������
182}
183int bs_read_ue( bs_t *s )
184{
185 int i = 0;

Callers 1

bs_read_ueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected