forked from len0rd/rockbox
Enable ff_copy_bits in ffmpeg_bitstream.c and put_bits.h and intreadwrite.h to codeclib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27452 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4a46996922
commit
090768194f
4 changed files with 813 additions and 13 deletions
|
@ -30,7 +30,8 @@
|
|||
|
||||
//#include "avcodec.h"
|
||||
#include "ffmpeg_get_bits.h"
|
||||
//#include "put_bits.h"
|
||||
#include "ffmpeg_put_bits.h"
|
||||
#include "ffmpeg_intreadwrite.h"
|
||||
|
||||
#define av_log(...)
|
||||
|
||||
|
@ -65,6 +66,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
|
|||
if(terminate_string)
|
||||
put_bits(pb, 8, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
|
||||
{
|
||||
|
@ -74,7 +76,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
|
|||
|
||||
if(length==0) return;
|
||||
|
||||
if(CONFIG_SMALL || words < 16 || put_bits_count(pb)&7){
|
||||
if(words < 16 || put_bits_count(pb)&7){
|
||||
for(i=0; i<words; i++) put_bits(pb, 16, AV_RB16(src + 2*i));
|
||||
}else{
|
||||
for(i=0; put_bits_count(pb)&31; i++)
|
||||
|
@ -86,7 +88,7 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
|
|||
|
||||
put_bits(pb, bits, AV_RB16(src + 2*words)>>(16-bits));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* VLC decoding */
|
||||
|
||||
//#define DEBUG_VLC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue