aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-29 14:21:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-29 14:21:33 +0000
commite4cb187db8f96634f2306538e134d40f2793e376 (patch)
tree7b8617c0ac55f1f437f65715a41dda57f56e3645 /libavcodec/mpegvideo.c
parent20da31792b1988d2f21f4c14548333405cd9c37d (diff)
downloadffmpeg-e4cb187db8f96634f2306538e134d40f2793e376.tar.gz
remove duplicated find_frame_end() code
move codec specific code from parser.c -> <codecname>.c as far as its easily possible Originally committed as revision 3087 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index cc96c66a88..29804b704e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -3698,64 +3698,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
#endif //CONFIG_ENCODERS
-/**
- * combines the (truncated) bitstream to a complete frame
- * @returns -1 if no complete frame could be created
- */
-int ff_combine_frame( MpegEncContext *s, int next, uint8_t **buf, int *buf_size){
- ParseContext *pc= &s->parse_context;
-
-#if 0
- if(pc->overread){
- printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index);
- printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]);
- }
-#endif
-
- /* copy overreaded byes from last frame into buffer */
- for(; pc->overread>0; pc->overread--){
- pc->buffer[pc->index++]= pc->buffer[pc->overread_index++];
- }
-
- pc->last_index= pc->index;
-
- /* copy into buffer end return */
- if(next == END_NOT_FOUND){
- pc->buffer= av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
-
- memcpy(&pc->buffer[pc->index], *buf, *buf_size);
- pc->index += *buf_size;
- return -1;
- }
-
- *buf_size=
- pc->overread_index= pc->index + next;
-
- /* append to buffer */
- if(pc->index){
- pc->buffer= av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE);
-
- memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
- pc->index = 0;
- *buf= pc->buffer;
- }
-
- /* store overread bytes */
- for(;next < 0; next++){
- pc->state = (pc->state<<8) | pc->buffer[pc->last_index + next];
- pc->overread++;
- }
-
-#if 0
- if(pc->overread){
- printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index);
- printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]);
- }
-#endif
-
- return 0;
-}
-
void ff_mpeg_flush(AVCodecContext *avctx){
int i;
MpegEncContext *s = avctx->priv_data;