[Mplayer-cvslog] CVS: main/libmpeg2 decode.c,1.9,1.10 mpeg2.h,1.2,1.3

GEREOFFY arpi_esp at users.sourceforge.net
Sun Jun 3 20:23:01 CEST 2001


Update of /cvsroot/mplayer/main/libmpeg2
In directory usw-pr-cvs1:/tmp/cvs-serv13612

Modified Files:
	decode.c mpeg2.h 
Log Message:
-framedrop worx fro mpeg files

Index: decode.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/decode.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** decode.c	2001/04/18 01:27:23	1.9
--- decode.c	2001/06/03 18:22:59	1.10
***************
*** 53,57 ****
  //static uint32_t shift = 0;
  
! static int drop_flag = 0;
  static int drop_frame = 0;
  
--- 53,57 ----
  //static uint32_t shift = 0;
  
! //static int drop_flag = 0;
  static int drop_frame = 0;
  
***************
*** 152,156 ****
  static int in_slice_flag=0;
  
! static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer)
  {
      int is_frame_done = 0;
--- 152,156 ----
  static int in_slice_flag=0;
  
! static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int framedrop)
  {
      int is_frame_done = 0;
***************
*** 164,167 ****
--- 164,168 ----
  //        if(picture->picture_structure != FRAME_PICTURE) printf("Field! %d  \n",picture->second_field);
          
+ 	if(!framedrop)
  	if (((picture->picture_structure == FRAME_PICTURE) ||
  		 (picture->second_field))
***************
*** 209,213 ****
  	}
  
! 	drop_frame = drop_flag && (picture->picture_coding_type == B_TYPE);
  	//decode_reorder_frames ();
  	break;
--- 210,215 ----
  	}
  
! 	drop_frame = framedrop && (picture->picture_coding_type == B_TYPE);
! 	drop_frame |= framedrop>=2; // hard drop
  	//decode_reorder_frames ();
  	break;
***************
*** 260,264 ****
  		    picture->current_frame->copy=copy_slice;
  #endif
! 	    
  	    picture->current_frame->vo=output;
  	    picture->slice=0;
--- 262,266 ----
  		    picture->current_frame->copy=copy_slice;
  #endif
! 	    if(framedrop) picture->current_frame->copy=NULL;
  	    picture->current_frame->vo=output;
  	    picture->slice=0;
***************
*** 286,290 ****
  }
  
! int mpeg2_decode_data (vo_functions_t *output, uint8_t *current, uint8_t *end)
  {
      //static uint8_t code = 0xff;
--- 288,292 ----
  }
  
! int mpeg2_decode_data (vo_functions_t *output, uint8_t *current, uint8_t *end,int framedrop)
  {
      //static uint8_t code = 0xff;
***************
*** 324,328 ****
      //printf("pos=%d  chunk %3X  size=%d  next-code=%X\n",pos-start,code,current-pos,head|c);
      if(setjmp(mpeg2_jmp_buf)==0){
!       ret+=parse_chunk(output, code&0xFF, pos);
      } else {
  #ifdef ARCH_X86
--- 326,330 ----
      //printf("pos=%d  chunk %3X  size=%d  next-code=%X\n",pos-start,code,current-pos,head|c);
      if(setjmp(mpeg2_jmp_buf)==0){
!       ret+=parse_chunk(output, code&0xFF, pos, framedrop);
      } else {
  #ifdef ARCH_X86
***************
*** 338,349 ****
    signal(SIGSEGV,old_sigh); // restore sighandler
  
!   if(code==0x1FF) ret+=parse_chunk(output, 0xFF, NULL); // send 'end of frame'
  
      return ret;
  }
  
! void mpeg2_drop (int flag)
! {
!     drop_flag = flag;
! }
  
--- 340,351 ----
    signal(SIGSEGV,old_sigh); // restore sighandler
  
!   if(code==0x1FF) ret+=parse_chunk(output, 0xFF, NULL, framedrop); // send 'end of frame'
  
      return ret;
  }
  
! //void mpeg2_drop (int flag)
! //{
! //    drop_flag = flag;
! //}
  

Index: mpeg2.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/mpeg2.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** mpeg2.h	2001/03/04 21:01:54	1.2
--- mpeg2.h	2001/06/03 18:22:59	1.3
***************
*** 52,58 ****
  void mpeg2_init (void);
  //void mpeg2_allocate_image_buffers (picture_t * picture);
! int mpeg2_decode_data (vo_functions_t *, uint8_t * data_start, uint8_t * data_end);
  //void mpeg2_close (vo_functions_t *);
! void mpeg2_drop (int flag);
  
  
--- 52,58 ----
  void mpeg2_init (void);
  //void mpeg2_allocate_image_buffers (picture_t * picture);
! int mpeg2_decode_data (vo_functions_t *, uint8_t * data_start, uint8_t * data_end,int framedrop);
  //void mpeg2_close (vo_functions_t *);
! //void mpeg2_drop (int flag);
  
  


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list