Example #1
0
/// <summary>
/// Flush bits.
/// </summary>
void bio_flush() {
    bio_ct=0;
    bio_byteout();
    if (bio_ct==7) {
        bio_ct=0;
        bio_byteout();
    }
}
Example #2
0
/// <summary>
/// Flush bits.
/// </summary>
int bio_flush() {
    bio_ct=0;
    bio_byteout();
    if (bio_ct==7) {
        bio_ct=0;
       if ( bio_byteout()) return 1;;
    }
    return 0;
}
Example #3
0
int bio_flush(opj_bio_t *bio) {
	bio->ct = 0;
	if (bio_byteout(bio)) {
		return 1;
	}
	if (bio->ct == 7) {
		bio->ct = 0;
		if (bio_byteout(bio)) {
			return 1;
		}
	}
	return 0;
}
Example #4
0
bool bio_flush(opj_bio_t *bio) {
	bio->ct = 0;
	if (bio_byteout(bio)) {
		return true;
	}
	if (bio->ct == 7) {
		bio->ct = 0;
		if (bio_byteout(bio)) {
			return true;
		}
	}
	return false;
}
Example #5
0
static void bio_putbit(opj_bio_t *bio, int b) {
	if (bio->ct == 0) {
		bio_byteout(bio);
	}
	bio->ct--;
	bio->buf |= b << bio->ct;
}
Example #6
0
/// <summary>
/// Write bit.
/// </summary>
/// <param name="b">Bit to write (0 or 1)</param>
void bio_putbit(int b) {
    if (bio_ct==0) {
        bio_byteout();
    }
    bio_ct--;
    bio_buf|=b<<bio_ct;
}