Questions tagged [bitstream]

A Python library to manage binary data as bitstreams. Available from https://pypi.org

Bitstream three main features:

  • It is easy to use since the bitstream abstraction is simple.
  • It works seamlessly at the bit and byte level.
  • It supports Python, NumPy and user-defined types.
94 questions
21
votes
1 answer

What are bitstream filters in ffmpeg?

After careful reading of FFmpeg Bitstream Filters Documentation, I still do not understand what they are really for. The document states that the filter: performs bitstream level modifications without performing decoding Could anyone further…
Joe
  • 2,386
  • 1
  • 22
  • 33
14
votes
2 answers

Efficient bitstreams in Haskell

In an ongoing endeavour to efficiently fiddle with bits (e.g. see this SO question) the newest challenge is the efficient streaming and consumption of bits. As a first simple task I choose to find the longest sequence of identical bits in a…
mcmayer
  • 1,931
  • 12
  • 22
12
votes
4 answers

Python Bitstream implementations

I am writing a huffman implementation in Python as a learning exercise. I have got to the point of writing out my variable length huffman codes to a buffer (or file). Only to find there does not seem to be a bitstream class implemented by Python! …
Danielb
  • 1,608
  • 5
  • 24
  • 34
8
votes
1 answer

How to write a bitstream

I'm thinking about writing some data into a bit stream using C. There are two ways come in mind. One is to concatenate variable bit-length symbols into a contiguous bit sequence, but in this way my decoder will probably have a hard time separating…
user1530192
  • 81
  • 2
  • 3
7
votes
2 answers

Parsing hevc bitstream

Is there a way to parse an HEVC bitstream file? I want to be able to create a new bitstream file having selected nal unit packets selected from the original bitstream file. Edit: I inserted my code. Please find my bitstream file here. #library for…
zinon
  • 4,427
  • 14
  • 70
  • 112
6
votes
2 answers

How to read complete file with bitstring

I want to read as many 24 bit chunks as possible from a file. How can I do this using bitstrings' ConstBitStream when I don't now how many chunks there are? Currently I do this: eventList = ConstBitStream(filename = 'events.dat') for i in…
HWende
  • 1,705
  • 4
  • 18
  • 30
5
votes
2 answers

Merge C program and VHDL bitstream via "make" (i.e. using a Makefile)

I am trying to test the VHDL AVR8 soft processor found on Gadget Factory on a Digilent Nexys II (Spartan 3E) Development board. The project includes a Makefile for compiling a C (or other) software program and merging it with the FPGA bitstream so…
user_007
  • 310
  • 1
  • 10
3
votes
0 answers

Does ConstBitStream load the entire file to the memory?

Does ConsBitStream load the entire file to the memory when using is as follows? s = ConstBitStream(filename='test/test.m1v') I am performing bit operation on large files and I want to avoid loading them entirely.
3
votes
1 answer

How to pass parameter to bitstream filter in ffmpeg with tee option?

I'm actually in a student project. The aim of this project is to develop bitstream filter (bsf) in ffmpeg (no problem for this). I need to access parameter in this bitstream filter from the command line, this actually work fine in simple command…
Benji Joa
  • 53
  • 7
3
votes
1 answer

Bit order in bit streams

Is there a preferred order to the bits in a bit stream (where a bit stream is somewhat analogous to Java's Input/OutputStream, but provides bit-level granularity)? I've read that the output of the Huffman stage of the DEFLATE algorithm considers…
Joshua Warner
  • 4,465
  • 2
  • 18
  • 13
3
votes
3 answers

Very fast way to check set bit in C

I'm using some sort of BitStream in my code that has a read_bit()-function. This function is called very very often (more than one billion times in a single stream). This is what the struct BitStream looks like: typedef struct BitStream { …
user4424299
3
votes
1 answer

How to find binary data within ConstBitStream starting from a given offset?

I'm trying to find specific bytes within a file loaded as ConstBitStream: s = ConstBitStream(filename=myFile) found = s.find('0x4140', bytealigned=False) This is working fine for the first occurrence. After finding the first sequence, I want to…
mr.proton
  • 993
  • 2
  • 10
  • 24
3
votes
1 answer

Bitstream lexer generator

I have a number of packet formats that are bit-oriented. Rather than writing many fairly complex lexer by hand I am looking for a bit-level lexer generator, a bit-oriented version of flex/lex say. Obviously I could just write straight C, but I was…
jhoyla
  • 1,191
  • 1
  • 9
  • 26
3
votes
2 answers

reading/writing a value at specified bit offset

I need to read and write numerical values of specified bit-length (not necessarily multiples of 8) at a specified bit-offset in a memory buffer, the most-significant bit first. For example, writing the value of 5 at offset 6 and bit-length…
wroniasty
  • 7,884
  • 2
  • 32
  • 24
2
votes
1 answer

Bitstream Encryption

I have a question related to bitstream encryption using eFUSE option. If my FPGA has bitstream encryption key stored in the eFUSE, how Vivado will know the encryption key when generating new encrypted bitstream? Does Vivado has a method to readback…
1
2 3 4 5 6 7