Merge commit '5ae72f54532960cb9eae82a1c9e8d505106c022b'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 26 Nov 2012 15:09:46 +0000 (16:09 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 26 Nov 2012 15:11:02 +0000 (16:11 +0100)
* commit '5ae72f54532960cb9eae82a1c9e8d505106c022b':
  flashsv: check for keyframe before using differential coding
  h264: enable low delay only if no delayed frames were seen
  x86: fix build without inline asm

Conflicts:
libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/flashsv.c
libavcodec/h264.c
libavcodec/x86/dsputil_mmx.c

Simple merge
@@@ -4007,10 -3867,50 +4007,17 @@@ again
  
                  if (s->flags & CODEC_FLAG_LOW_DELAY ||
                      (h->sps.bitstream_restriction_flag &&
-                      !h->sps.num_reorder_frames))
-                     s->low_delay = 1;
+                      !h->sps.num_reorder_frames)) {
+                     if (s->avctx->has_b_frames > 1 || h->delayed_pic[0])
+                         av_log(avctx, AV_LOG_WARNING, "Delayed frames seen "
+                                "reenabling low delay requires a codec "
+                                "flush.\n");
+                         else
+                             s->low_delay = 1;
+                 }
                  if (avctx->has_b_frames < 2)
                      avctx->has_b_frames = !s->low_delay;
 -
 -                if (avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||
 -                    h->cur_chroma_format_idc   != h->sps.chroma_format_idc) {
 -                    if (s->avctx->codec &&
 -                        s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU
 -                        && (h->sps.bit_depth_luma != 8 ||
 -                            h->sps.chroma_format_idc > 1)) {
 -                        av_log(avctx, AV_LOG_ERROR,
 -                               "VDPAU decoding does not support video "
 -                               "colorspace\n");
 -                        buf_index = -1;
 -                        goto end;
 -                    }
 -                    if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10) {
 -                        avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
 -                        h->cur_chroma_format_idc   = h->sps.chroma_format_idc;
 -                        h->pixel_shift             = h->sps.bit_depth_luma > 8;
 -
 -                        ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma,
 -                                        h->sps.chroma_format_idc);
 -                        ff_h264_pred_init(&h->hpc, s->codec_id,
 -                                          h->sps.bit_depth_luma,
 -                                          h->sps.chroma_format_idc);
 -                        s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16;
 -                        ff_dsputil_init(&s->dsp, s->avctx);
 -                    } else {
 -                        av_log(avctx, AV_LOG_ERROR,
 -                               "Unsupported bit depth: %d\n",
 -                               h->sps.bit_depth_luma);
 -                        buf_index = -1;
 -                        goto end;
 -                    }
 -                }
                  break;
              case NAL_PPS:
                  init_get_bits(&s->gb, ptr, bit_length);
Simple merge