* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
/**
#include <string.h>
#include "avcodec.h"
-#include "common.h"
#include "rangecoder.h"
+#include "bytestream.h"
void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size){
/* cast to avoid compiler warning */
ff_init_range_encoder(c, (uint8_t *) buf, buf_size);
- c->low =(*c->bytestream++)<<8;
- c->low+= *c->bytestream++;
+ c->low = bytestream_get_be16(&c->bytestream);
}
void ff_build_rac_states(RangeCoder *c, int factor, int max_p){
#if 0 //selftest
#define SIZE 10240
-int main(){
+int main(void){
RangeCoder c;
uint8_t b[9*SIZE];
uint8_t r[9*SIZE];