Skip to content
Browse files

Merge commit '7b89cd20d844cbe763ca34e63e99d110043cf241'

* commit '7b89cd20d844cbe763ca34e63e99d110043cf241':
  eamad: allocate a dummy reference frame when the real one is missing
  Replace remaining includes of audioconvert.h with channel_layout.h
  Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*.

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
2 parents a75f01d + 7b89cd2 commit 0cfbfaaa12e10dbd2d6cdcf9ed618b9bab91ed04 @michaelni michaelni committed Mar 12, 2013
Showing with 26 additions and 13 deletions.
  1. +1 −1 libavcodec/012v.c
  2. +13 −0 libavcodec/eamad.c
  3. +1 −1 libavcodec/h264.c
  4. +2 −2 libavcodec/svq1enc.c
  5. +1 −1 libavfilter/af_volume.c
  6. +1 −1 libavformat/idcin.c
  7. +1 −1 libavutil/frame.c
  8. +6 −6 libswscale/swscale_unscaled.c
View
2 libavcodec/012v.c
@@ -26,7 +26,7 @@
static av_cold int zero12v_decode_init(AVCodecContext *avctx)
{
- avctx->pix_fmt = PIX_FMT_YUV422P16;
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P16;
avctx->bits_per_raw_sample = 10;
if (avctx->codec_tag == MKTAG('a', '1', '2', 'v'))
View
13 libavcodec/eamad.c
@@ -271,6 +271,19 @@ static int decode_frame(AVCodecContext *avctx,
return ret;
}
+ if (inter && !s->last_frame.data[0]) {
+ av_log(avctx, AV_LOG_WARNING, "Missing reference frame.\n");
+ ret = ff_get_buffer(avctx, &s->last_frame, AV_GET_BUFFER_FLAG_REF);
+ if (ret < 0)
+ return ret;
+ memset(s->last_frame.data[0], 0, s->last_frame.height *
+ s->last_frame.linesize[0]);
+ memset(s->last_frame.data[1], 0x80, s->last_frame.height / 2 *
+ s->last_frame.linesize[1]);
+ memset(s->last_frame.data[2], 0x80, s->last_frame.height / 2 *
+ s->last_frame.linesize[2]);
+ }
+
av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size,
buf_end - buf);
if (!s->bitstream_buf)
View
2 libavcodec/h264.c
@@ -2988,7 +2988,7 @@ static int h264_set_parameter_from_sps(H264Context *h)
return 0;
}
-static enum PixelFormat get_pixel_format(H264Context *h, int force_callback)
+static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
{
switch (h->sps.bit_depth_luma) {
case 9:
View
4 libavcodec/svq1enc.c
@@ -625,7 +625,7 @@ AVCodec ff_svq1_encoder = {
.init = svq1_encode_init,
.encode2 = svq1_encode_frame,
.close = svq1_encode_end,
- .pix_fmts = (const enum PixelFormat[]) { AV_PIX_FMT_YUV410P,
- AV_PIX_FMT_NONE },
+ .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
+ AV_PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
};
View
2 libavfilter/af_volume.c
@@ -24,7 +24,7 @@
* audio volume filter
*/
-#include "libavutil/audioconvert.h"
+#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/float_dsp.h"
View
2 libavformat/idcin.c
@@ -68,7 +68,7 @@
* transmitting them to the video decoder
*/
-#include "libavutil/audioconvert.h"
+#include "libavutil/channel_layout.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
View
2 libavutil/frame.c
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "audioconvert.h"
+#include "channel_layout.h"
#include "buffer.h"
#include "common.h"
#include "dict.h"
View
12 libswscale/swscale_unscaled.c
@@ -532,23 +532,23 @@ static int rgbToPlanarRgbWrapper(SwsContext *c, const uint8_t *src[],
dst[1] + srcSliceY * dstStride[1] };
switch (c->srcFormat) {
- case PIX_FMT_RGB24:
+ case AV_PIX_FMT_RGB24:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst201,
stride201, srcSliceH, alpha_first, 3, c->srcW);
break;
- case PIX_FMT_BGR24:
+ case AV_PIX_FMT_BGR24:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst102,
stride102, srcSliceH, alpha_first, 3, c->srcW);
break;
- case PIX_FMT_ARGB:
+ case AV_PIX_FMT_ARGB:
alpha_first = 1;
- case PIX_FMT_RGBA:
+ case AV_PIX_FMT_RGBA:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst201,
stride201, srcSliceH, alpha_first, 4, c->srcW);
break;
- case PIX_FMT_ABGR:
+ case AV_PIX_FMT_ABGR:
alpha_first = 1;
- case PIX_FMT_BGRA:
+ case AV_PIX_FMT_BGRA:
packedtogbr24p((const uint8_t *) src[0], srcStride[0], dst102,
stride102, srcSliceH, alpha_first, 4, c->srcW);
break;

0 comments on commit 0cfbfaa

Please sign in to comment.
Something went wrong with that request. Please try again.