OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 11 Jul 2011 23:42:32 +0000 (01:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 11 Jul 2011 23:42:32 +0000 (01:42 +0200)
* qatar/master:
  changelog: misc typo and wording fixes
  H.264: add filter_mb_fast support for >8-bit decoding
  doc: Remove outdated comments about gcc 2.95 and gcc 3.3 support.
  lls: use av_lfg instead of rand() in test program
  build: remove unnecessary dependency on libs from 'all' target
  H.264: avoid redundant alpha/beta calculations in loopfilter
  H.264: optimize intra/inter loopfilter decision
  mpegts: fix Continuity Counter error detection
  build: remove unnecessary FFLDFLAGS variable
  vp8/mt: flush worker thread, not application thread context, on seek.
  mt: proper locking around release_buffer calls.
  DxVA2: unbreak build after [657ccb5ac75ce34e62bd67f228d9bd36db72189e]
  hwaccel: unbreak build
  Eliminate FF_COMMON_FRAME macro.

Conflicts:
Changelog
Makefile
doc/developer.texi
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
58 files changed:
1  2 
Changelog
Makefile
common.mak
doc/developer.texi
libavcodec/avcodec.h
libavcodec/cavs.c
libavcodec/cavsdec.c
libavcodec/dxva2.c
libavcodec/dxva2_h264.c
libavcodec/dxva2_mpeg2.c
libavcodec/dxva2_vc1.c
libavcodec/error_resilience.c
libavcodec/h261dec.c
libavcodec/h263.c
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_direct.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mvpred.h
libavcodec/h264_refs.c
libavcodec/intrax8.c
libavcodec/ituh263dec.c
libavcodec/ituh263enc.c
libavcodec/motion_est.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4video.c
libavcodec/mpeg4videodec.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_common.h
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_xvmc.c
libavcodec/msmpeg4.c
libavcodec/pthread.c
libavcodec/ratecontrol.c
libavcodec/rv30.c
libavcodec/rv34.c
libavcodec/rv40.c
libavcodec/snow.c
libavcodec/svq1dec.c
libavcodec/svq1enc.c
libavcodec/svq3.c
libavcodec/utils.c
libavcodec/vaapi_h264.c
libavcodec/vaapi_internal.h
libavcodec/vaapi_mpeg4.c
libavcodec/vc1dec.c
libavcodec/vdpau.c
libavcodec/wmv2dec.c
libavcodec/x86/h264dsp_mmx.c
libavformat/mpegts.c
libavutil/lls.c
subdir.mak

diff --cc Changelog
+++ b/Changelog
@@@ -1,14 -1,33 +1,15 @@@
  Entries are sorted chronologically from oldest to youngest within each release,
  releases are sorted from youngest to oldest.
  
 +version next:
  
 -version 0.7:
 -
 -- E-AC-3 audio encoder
 -- ac3enc: add channel coupling support
 -- floating-point sample format support for (E-)AC-3, DCA, AAC, Vorbis decoders
 -- H.264/MPEG frame-level multithreading
 -- av_metadata_* functions renamed to av_dict_* and moved to libavutil
 -- 4:4:4 H.264 decoding support
 -- 10-bit H.264 optimizations for x86
 -- bump libswscale for recently reported ABI break
 -
 +- openal input device added
  
 -version 0.7_beta2:
  
 -- VP8 frame-level multithreading
 -- NEON optimizations for VP8
 -- removed a lot of deprecated API cruft
 -- FFT and IMDCT optimizations for AVX (Sandy Bridge) processors
 -- DPX image encoder
 -- SMPTE 302M AES3 audio decoder
 -- ffmpeg no longer quits after the 'q' key is pressed; use 'ctrl+c' instead
 -- 9bit and 10bit per sample support in the H.264 decoder
 +version 0.8:
  
 -version 0.7_beta1:
 -
 +- many many things we forgot because we rather write code than changelogs
  - WebM support in Matroska de/muxer
  - low overhead Ogg muxing
  - MMS-TCP support
diff --cc Makefile
+++ b/Makefile
@@@ -8,6 -7,49 +8,7 @@@ vpath %.asm  $(SRC_PATH
  vpath %.v    $(SRC_PATH)
  vpath %.texi $(SRC_PATH)
  
 -ifndef V
 -Q      = @
 -ECHO   = printf "$(1)\t%s\n" $(2)
 -BRIEF  = CC AS YASM AR LD HOSTCC
 -SILENT = DEPCC YASMDEP RM RANLIB
 -MSG    = $@
 -M      = @$(call ECHO,$(TAG),$@);
 -$(foreach VAR,$(BRIEF), \
 -    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 -$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
 -$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL))
 -endif
 -
 -IFLAGS     := -I. -I$(SRC_PATH)
 -CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
 -CFLAGS     += $(ECFLAGS)
 -CCFLAGS     = $(CFLAGS)
 -YASMFLAGS  += $(IFLAGS) -Pconfig.asm
 -HOSTCFLAGS += $(IFLAGS)
 -LDFLAGS    += $(ALLFFLIBS:%=-Llib%)
 -
 -define COMPILE
 -      $($(1)DEP)
 -      $($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
 -endef
 -
 -COMPILE_C = $(call COMPILE,CC)
 -COMPILE_S = $(call COMPILE,AS)
 -
 -%.o: %.c
 -      $(COMPILE_C)
 -
 -%.o: %.S
 -      $(COMPILE_S)
 -
 -%.ho: %.h
 -      $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 -
 -%.ver: %.v
 -      $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
 -
 -%.c %.h: TAG = GEN
  PROGS-$(CONFIG_FFMPEG)   += ffmpeg
  PROGS-$(CONFIG_FFPLAY)   += ffplay
  PROGS-$(CONFIG_FFPROBE)  += ffprobe
@@@ -46,13 -86,8 +47,12 @@@ include $(SRC_PATH)/common.ma
  FF_EXTRALIBS := $(FFEXTRALIBS)
  FF_DEP_LIBS  := $(DEP_LIBS)
  
- all: $(FF_DEP_LIBS) $(PROGS)
+ all: $(PROGS)
  
 +$(PROGS): %$(EXESUF): %_g$(EXESUF)
 +      $(CP) $< $@
 +      $(STRIP) $@
 +
  $(TOOLS): %$(EXESUF): %.o
        $(LD) $(LDFLAGS) -o $@ $< $(ELIBS)
  
@@@ -82,11 -117,11 +82,11 @@@ ende
  $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
  
  ffplay.o: CFLAGS += $(SDL_CFLAGS)
 -ffplay$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
 -ffserver$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
 +ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
- ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
++ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
  
 -$(PROGS): %$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
 +%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
-       $(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
+       $(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
  
  OBJDIRS += tools
  
diff --cc common.mak
@@@ -5,63 -5,6 +5,64 @@@
  # first so "all" becomes default target
  all: all-yes
  
 +ifndef SUBDIR
 +
 +ifndef V
 +Q      = @
 +ECHO   = printf "$(1)\t%s\n" $(2)
 +BRIEF  = CC AS YASM AR LD HOSTCC STRIP CP
 +SILENT = DEPCC YASMDEP RM RANLIB
 +MSG    = $@
 +M      = @$(call ECHO,$(TAG),$@);
 +$(foreach VAR,$(BRIEF), \
 +    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
 +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
 +endif
 +
 +# NASM requires -I path terminated with /
 +IFLAGS     := -I. -I$(SRC_PATH)/
 +CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
 +CFLAGS     += $(ECFLAGS)
 +CCFLAGS     = $(CFLAGS)
 +YASMFLAGS  += $(IFLAGS) -Pconfig.asm
 +HOSTCFLAGS += $(IFLAGS)
++LDFLAGS    += $(ALLFFLIBS:%=-Llib%)
 +
 +define COMPILE
 +       $($(1)DEP)
 +       $($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
 +endef
 +
 +COMPILE_C = $(call COMPILE,CC)
 +COMPILE_S = $(call COMPILE,AS)
 +
 +%.o: %.c
 +      $(COMPILE_C)
 +
 +%.o: %.S
 +      $(COMPILE_S)
 +
 +%.ho: %.h
 +      $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 +
 +%.ver: %.v
 +      $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
 +
 +%.c %.h: TAG = GEN
 +
 +# Dummy rule to stop make trying to rebuild removed or renamed headers
 +%.h:
 +      @:
 +
 +# Disable suffix rules.  Most of the builtin rules are suffix rules,
 +# so this saves some time on slow systems.
 +.SUFFIXES:
 +
 +# Do not delete intermediate files from chains of implicit rules
 +$(OBJS):
 +endif
 +
  OBJS-$(HAVE_MMX) +=  $(MMX-OBJS-yes)
  
  OBJS      += $(OBJS-yes)
Simple merge
@@@ -1150,7 -841,264 +850,302 @@@ typedef struct AVPacket 
   * sizeof(AVFrame) must not be used outside libav*.
   */
  typedef struct AVFrame {
-     FF_COMMON_FRAME
+     /**
+      * pointer to the picture planes.
+      * This might be different from the first allocated byte
+      * - encoding:
+      * - decoding:
+      */
+     uint8_t *data[4];
+     int linesize[4];
+     /**
+      * pointer to the first allocated byte of the picture. Can be used in get_buffer/release_buffer.
+      * This isn't used by libavcodec unless the default get/release_buffer() is used.
+      * - encoding:
+      * - decoding:
+      */
+     uint8_t *base[4];
+     /**
+      * 1 -> keyframe, 0-> not
+      * - encoding: Set by libavcodec.
+      * - decoding: Set by libavcodec.
+      */
+     int key_frame;
+     /**
+      * Picture type of the frame, see ?_TYPE below.
+      * - encoding: Set by libavcodec. for coded_picture (and set by user for input).
+      * - decoding: Set by libavcodec.
+      */
+     enum AVPictureType pict_type;
+     /**
+      * presentation timestamp in time_base units (time when frame should be shown to user)
+      * If AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed.
+      * - encoding: MUST be set by user.
+      * - decoding: Set by libavcodec.
+      */
+     int64_t pts;
+     /**
+      * picture number in bitstream order
+      * - encoding: set by
+      * - decoding: Set by libavcodec.
+      */
+     int coded_picture_number;
+     /**
+      * picture number in display order
+      * - encoding: set by
+      * - decoding: Set by libavcodec.
+      */
+     int display_picture_number;
+     /**
+      * quality (between 1 (good) and FF_LAMBDA_MAX (bad))
+      * - encoding: Set by libavcodec. for coded_picture (and set by user for input).
+      * - decoding: Set by libavcodec.
+      */
+     int quality;
+     /**
+      * buffer age (1->was last buffer and dint change, 2->..., ...).
+      * Set to INT_MAX if the buffer has not been used yet.
+      * - encoding: unused
+      * - decoding: MUST be set by get_buffer().
+      */
+     int age;
+     /**
+      * is this picture used as reference
+      * The values for this are the same as the MpegEncContext.picture_structure
+      * variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
+      * Set to 4 for delayed, non-reference frames.
+      * - encoding: unused
+      * - decoding: Set by libavcodec. (before get_buffer() call)).
+      */
+     int reference;
+     /**
+      * QP table
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     int8_t *qscale_table;
+     /**
+      * QP store stride
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     int qstride;
+     /**
+      * mbskip_table[mb]>=1 if MB didn't change
+      * stride= mb_width = (width+15)>>4
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     uint8_t *mbskip_table;
+     /**
+      * motion vector table
+      * @code
+      * example:
+      * int mv_sample_log2= 4 - motion_subsample_log2;
+      * int mb_width= (width+15)>>4;
+      * int mv_stride= (mb_width << mv_sample_log2) + 1;
+      * motion_val[direction][x + y*mv_stride][0->mv_x, 1->mv_y];
+      * @endcode
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec.
+      */
+     int16_t (*motion_val[2])[2];
+     /**
+      * macroblock type table
+      * mb_type_base + mb_width + 2
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec.
+      */
+     uint32_t *mb_type;
+     /**
+      * log2 of the size of the block which a single vector in motion_val represents:
+      * (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     uint8_t motion_subsample_log2;
+     /**
+      * for some private data of the user
+      * - encoding: unused
+      * - decoding: Set by user.
+      */
+     void *opaque;
+     /**
+      * error
+      * - encoding: Set by libavcodec. if flags&CODEC_FLAG_PSNR.
+      * - decoding: unused
+      */
+     uint64_t error[4];
+     /**
+      * type of the buffer (to keep track of who has to deallocate data[*])
+      * - encoding: Set by the one who allocates it.
+      * - decoding: Set by the one who allocates it.
+      * Note: User allocated (direct rendering) & internal buffers cannot coexist currently.
+      */
+     int type;
+     /**
+      * When decoding, this signals how much the picture must be delayed.
+      * extra_delay = repeat_pict / (2*fps)
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     int repeat_pict;
+     /**
+      *
+      */
+     int qscale_type;
+     /**
+      * The content of the picture is interlaced.
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec. (default 0)
+      */
+     int interlaced_frame;
+     /**
+      * If the content is interlaced, is top field displayed first.
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec.
+      */
+     int top_field_first;
+     /**
+      * Pan scan.
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec.
+      */
+     AVPanScan *pan_scan;
+     /**
+      * Tell user application that palette has changed from previous frame.
+      * - encoding: ??? (no palette-enabled encoder yet)
+      * - decoding: Set by libavcodec. (default 0).
+      */
+     int palette_has_changed;
+     /**
+      * codec suggestion on buffer type if != 0
+      * - encoding: unused
+      * - decoding: Set by libavcodec. (before get_buffer() call)).
+      */
+     int buffer_hints;
+     /**
+      * DCT coefficients
+      * - encoding: unused
+      * - decoding: Set by libavcodec.
+      */
+     short *dct_coeff;
+     /**
+      * motion reference frame index
+      * the order in which these are stored can depend on the codec.
+      * - encoding: Set by user.
+      * - decoding: Set by libavcodec.
+      */
+     int8_t *ref_index[2];
+     /**
+      * reordered opaque 64bit (generally an integer or a double precision float
+      * PTS but can be anything).
+      * The user sets AVCodecContext.reordered_opaque to represent the input at
+      * that time,
+      * the decoder reorders values as needed and sets AVFrame.reordered_opaque
+      * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque
+      * @deprecated in favor of pkt_pts
+      * - encoding: unused
+      * - decoding: Read by user.
+      */
+     int64_t reordered_opaque;
+     /**
 -     * hardware accelerator private data (Libav-allocated)
++     * hardware accelerator private data (FFmpeg-allocated)
+      * - encoding: unused
+      * - decoding: Set by libavcodec
+      */
+     void *hwaccel_picture_private;
+     /**
+      * reordered pts from the last AVPacket that has been input into the decoder
+      * - encoding: unused
+      * - decoding: Read by user.
+      */
+     int64_t pkt_pts;
+     /**
+      * dts from the last AVPacket that has been input into the decoder
+      * - encoding: unused
+      * - decoding: Read by user.
+      */
+     int64_t pkt_dts;
+     /**
+      * the AVCodecContext which ff_thread_get_buffer() was last called on
+      * - encoding: Set by libavcodec.
+      * - decoding: Set by libavcodec.
+      */
+     struct AVCodecContext *owner;
+     /**
+      * used by multithreading to store frame-specific info
+      * - encoding: Set by libavcodec.
+      * - decoding: Set by libavcodec.
+      */
+     void *thread_opaque;
++
++    /**
++     * frame timestamp estimated using various heuristics, in stream time base
++     * - encoding: unused
++     * - decoding: set by libavcodec, read by user.
++     */
++    int64_t best_effort_timestamp;
++
++    /**
++     * reordered pos from the last AVPacket that has been input into the decoder
++     * - encoding: unused
++     * - decoding: Read by user.
++     */
++    int64_t pkt_pos;
++
++    /**
++     * reordered sample aspect ratio for the video frame, 0/1 if unknown\unspecified
++     * - encoding: unused
++     * - decoding: Read by user.
++     */
++    AVRational sample_aspect_ratio;
++
++    /**
++     * width and height of the video frame
++     * - encoding: unused
++     * - decoding: Read by user.
++     */
++    int width, height;
++
++    /**
++     * format of the frame, -1 if unknown or unset
++     * It should be cast to the corresponding enum (enum PixelFormat
++     * for video, enum AVSampleFormat for audio)
++     * - encoding: unused
++     * - decoding: Read by user.
++     */
++    int format;
++
  } AVFrame;
  
  /**
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -382,14 -382,6 +382,14 @@@ static void guess_mv(MpegEncContext *s)
          fixed[mb_xy]= f;
          if(f==MV_FROZEN)
              num_avail++;
-         else if(s->last_picture.data[0] && s->last_picture.motion_val[0]){
++        else if(s->last_picture.f.data[0] && s->last_picture.f.motion_val[0]){
 +            const int mb_y= mb_xy / s->mb_stride;
 +            const int mb_x= mb_xy % s->mb_stride;
 +            const int mot_index= (mb_x + mb_y*mot_stride) * mot_step;
-             s->current_picture.motion_val[0][mot_index][0]= s->last_picture.motion_val[0][mot_index][0];
-             s->current_picture.motion_val[0][mot_index][1]= s->last_picture.motion_val[0][mot_index][1];
-             s->current_picture.ref_index[0][4*mb_xy]      = s->last_picture.ref_index[0][4*mb_xy];
++            s->current_picture.f.motion_val[0][mot_index][0]= s->last_picture.f.motion_val[0][mot_index][0];
++            s->current_picture.f.motion_val[0][mot_index][1]= s->last_picture.f.motion_val[0][mot_index][1];
++            s->current_picture.f.ref_index[0][4*mb_xy]      = s->last_picture.f.ref_index[0][4*mb_xy];
 +        }
      }
  
      if((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || num_avail <= mb_width/2){
@@@ -697,10 -689,9 +697,10 @@@ static int is_intra_more_likely(MpegEnc
                                               mb_y, 0);
                  }
                  is_intra_likely += s->dsp.sad[0](NULL, last_mb_ptr, mb_ptr                    , s->linesize, 16);
 +                // FIXME need await_progress() here
                  is_intra_likely -= s->dsp.sad[0](NULL, last_mb_ptr, last_mb_ptr+s->linesize*16, s->linesize, 16);
              }else{
-                 if(IS_INTRA(s->current_picture.mb_type[mb_xy]))
+                 if (IS_INTRA(s->current_picture.f.mb_type[mb_xy]))
                     is_intra_likely++;
                  else
                     is_intra_likely--;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -585,9 -585,11 +585,9 @@@ void mpeg4_encode_mb(MpegEncContext * s
  
                      x= s->mb_x*16;
                      y= s->mb_y*16;
 -                    if(x+16 > s->width)  x= s->width-16;
 -                    if(y+16 > s->height) y= s->height-16;
  
                      offset= x + y*s->linesize;
-                     p_pic= s->new_picture.data[0] + offset;
+                     p_pic = s->new_picture.f.data[0] + offset;
  
                      s->mb_skipped=1;
                      for(i=0; i<s->max_b_frames; i++){
                          int diff;
                          Picture *pic= s->reordered_input_picture[i+1];
  
-                         if(pic==NULL || pic->pict_type!=AV_PICTURE_TYPE_B) break;
+                         if (pic == NULL || pic->f.pict_type != AV_PICTURE_TYPE_B)
+                             break;
  
-                         b_pic= pic->data[0] + offset;
-                         if(pic->type != FF_BUFFER_TYPE_SHARED)
+                         b_pic = pic->f.data[0] + offset;
+                         if (pic->f.type != FF_BUFFER_TYPE_SHARED)
                              b_pic+= INPLACE_OFFSET;
 -                        diff= s->dsp.sad[0](NULL, p_pic, b_pic, s->linesize, 16);
 +
 +                        if(x+16 > s->width || y+16 > s->height){
 +                            int x1,y1;
 +                            int xe= FFMIN(16, s->width - x);
 +                            int ye= FFMIN(16, s->height- y);
 +                            diff=0;
 +                            for(y1=0; y1<ye; y1++){
 +                                for(x1=0; x1<xe; x1++){
 +                                    diff+= FFABS(p_pic[x1+y1*s->linesize] - b_pic[x1+y1*s->linesize]);
 +                                }
 +                            }
 +                            diff= diff*256/(xe*ye);
 +                        }else{
 +                            diff= s->dsp.sad[0](NULL, p_pic, b_pic, s->linesize, 16);
 +                        }
                          if(diff>s->qscale*70){ //FIXME check that 70 is optimal
                              s->mb_skipped=0;
                              break;
@@@ -826,16 -815,15 +827,16 @@@ static void mpeg4_encode_gop_header(Mpe
      put_bits(&s->pb, 16, 0);
      put_bits(&s->pb, 16, GOP_STARTCODE);
  
-     time= s->current_picture_ptr->pts;
+     time = s->current_picture_ptr->f.pts;
      if(s->reordered_input_picture[1])
-         time= FFMIN(time, s->reordered_input_picture[1]->pts);
+         time = FFMIN(time, s->reordered_input_picture[1]->f.pts);
      time= time*s->avctx->time_base.num;
 +    s->last_time_base= FFUDIV(time, s->avctx->time_base.den);
  
 -    seconds= time/s->avctx->time_base.den;
 -    minutes= seconds/60; seconds %= 60;
 -    hours= minutes/60; minutes %= 60;
 -    hours%=24;
 +    seconds= FFUDIV(time, s->avctx->time_base.den);
 +    minutes= FFUDIV(seconds, 60); FFUMOD(seconds, 60);
 +    hours  = FFUDIV(minutes, 60); FFUMOD(minutes, 60);
 +    hours  = FFUMOD(hours  , 24);
  
      put_bits(&s->pb, 5, hours);
      put_bits(&s->pb, 6, minutes);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -3698,18 -3698,9 +3698,18 @@@ static int vc1_decode_frame(AVCodecCont
          av_log(v->s.avctx, AV_LOG_WARNING, "Sprite decoder: expected I-frame\n");
      }
  
-     s->current_picture_ptr->repeat_pict = 0;
++    s->current_picture_ptr->f.repeat_pict = 0;
 +    if (v->rff){
-         s->current_picture_ptr->repeat_pict = 1;
++        s->current_picture_ptr->f.repeat_pict = 1;
 +    }else if (v->rptfrm){
-         s->current_picture_ptr->repeat_pict = v->rptfrm * 2;
++        s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2;
 +    }
 +
-     s->current_picture_ptr->top_field_first = v->tff;
++    s->current_picture_ptr->f.top_field_first = v->tff;
 +
      // for skipping the frame
-     s->current_picture.pict_type= s->pict_type;
-     s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
+     s->current_picture.f.pict_type = s->pict_type;
+     s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I;
  
      /* skip B-frames if we don't have reference frames */
      if(s->last_picture_ptr==NULL && (s->pict_type==AV_PICTURE_TYPE_B || s->dropable)){
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc libavutil/lls.c
Simple merge
diff --cc subdir.mak
@@@ -40,15 -40,11 +40,15 @@@ $(TESTPROGS) $(TOOLS): %$(EXESUF): %.
  $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
        $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
  
 -$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
 +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
        $(SLIB_CREATE_DEF_CMD)
-       $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
+       $$(LD) $(SHFLAGS) $(LDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
  
 +ifdef SUBDIR
 +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
 +endif
 +
  clean::
        $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
            $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \