Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3ee5c5b7
Commit
3ee5c5b7
authored
Dec 05, 2006
by
Panagiotis Issaris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing unused code
Originally committed as revision 7228 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ea9f5d6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
75 deletions
+0
-75
h264.c
libavcodec/h264.c
+0
-75
No files found.
libavcodec/h264.c
View file @
3ee5c5b7
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment