Exemplo n.º 1
0
void read_sei_end_bits(h264_stream_t* h, bs_t* b )
{
    // if the message doesn't end at a byte border
    if ( !bs_byte_aligned( b ) )
    {
        if ( !bs_read_u1( b ) ) fprintf(stderr, "WARNING: bit_equal_to_one is 0!!!!\n");
        while ( ! bs_byte_aligned( b ) )
        {
            if ( bs_read_u1( b ) ) fprintf(stderr, "WARNING: bit_equal_to_zero is 1!!!!\n");
        }
    }

    read_rbsp_trailing_bits(h, b);
}
Exemplo n.º 2
0
//7.3.2.11 RBSP trailing bits syntax
void structure(rbsp_trailing_bits)(h264_stream_t* h, bs_t* b)
{
    value( rbsp_stop_one_bit, f(1, 1) );

    while( !bs_byte_aligned(b) )
    {
        value( rbsp_alignment_zero_bit, f(1, 0) );
    }
}
Exemplo n.º 3
0
//7.3.2.11 RBSP trailing bits syntax
void read_rbsp_trailing_bits(bs_t* b)
{
    bs_read_u1( b ); // equal to 1

    while( !bs_byte_aligned(b) )
    {
        bs_read_u1( b ); // equal to 0
    }
}
Exemplo n.º 4
0
//7.3.2.11 RBSP trailing bits syntax
void write_rbsp_trailing_bits(bs_t* b)
{
	int rbsp_stop_one_bit = 1;
	int rbsp_alignment_zero_bit = 0;

	bs_write(b, 1, rbsp_stop_one_bit); // equal to 1
	while (!bs_byte_aligned(b))
	{
		bs_write(b, 1, rbsp_alignment_zero_bit); // equal to 0
	}
}