diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-12-05 22:05:09 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2006-12-05 22:05:09 +0000 |
commit | 3ee5c5b739e6961cf6791687301c0fd781238a22 (patch) | |
tree | febf9469a5f387916221824b283a41fd9b749d28 /libavcodec | |
parent | ea9f5d6f767e2632e62a58f56c9007d90c073e5a (diff) | |
download | ffmpeg-3ee5c5b739e6961cf6791687301c0fd781238a22.tar.gz |
Removing unused code
Originally committed as revision 7228 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 704bc28b11..1c02adc314 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1794,81 +1794,6 @@ static uint8_t *decode_nal(H264Context *h, uint8_t *src, int *dst_length, int *c return dst; } -#if 0 -/** - * @param src the data which should be escaped - * @param dst the target buffer, dst+1 == src is allowed as a special case - * @param length the length of the src data - * @param dst_length the length of the dst array - * @returns length of escaped data in bytes or -1 if an error occured - */ -static int encode_nal(H264Context *h, uint8_t *dst, uint8_t *src, int length, int dst_length){ - int i, escape_count, si, di; - uint8_t *temp; - - assert(length>=0); - assert(dst_length>0); - - dst[0]= (h->nal_ref_idc<<5) + h->nal_unit_type; - - if(length==0) return 1; - - escape_count= 0; - for(i=0; i<length; i+=2){ - if(src[i]) continue; - if(i>0 && src[i-1]==0) - i--; - if(i+2<length && src[i+1]==0 && src[i+2]<=3){ - escape_count++; - i+=2; - } - } - - if(escape_count==0){ - if(dst+1 != src) - memcpy(dst+1, src, length); - return length + 1; - } - - if(length + escape_count + 1> dst_length) - return -1; - - //this should be damn rare (hopefully) - - h->rbsp_buffer= av_fast_realloc(h->rbsp_buffer, &h->rbsp_buffer_size, length + escape_count); - temp= h->rbsp_buffer; -//printf("encoding esc\n"); - - si= 0; - di= 0; - while(si < length){ - if(si+2<length && src[si]==0 && src[si+1]==0 && src[si+2]<=3){ - temp[di++]= 0; si++; - temp[di++]= 0; si++; - temp[di++]= 3; - temp[di++]= src[si++]; - } - else - temp[di++]= src[si++]; - } - memcpy(dst+1, temp, length+escape_count); - - assert(di == length+escape_count); - - return di + 1; -} - -/** - * write 1,10,100,1000,... for alignment, yes its exactly inverse to mpeg4 - */ -static void encode_rbsp_trailing(PutBitContext *pb){ - int length; - put_bits(pb, 1, 1); - length= (-put_bits_count(pb))&7; - if(length) put_bits(pb, length, 0); -} -#endif - /** * identifies the exact end of the bitstream * @return the length of the trailing, or 0 if damaged |