Commit 0cfbfaaa authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7b89cd20'

* commit '7b89cd20':
  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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a75f01d7 7b89cd20
......@@ -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'))
......
......@@ -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)
......
......@@ -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:
......
......@@ -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"),
};
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment