diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-21 00:54:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-21 00:54:42 +0200 |
commit | e5bae39f46e55843c025d280ed5441e358e59f2e (patch) | |
tree | e2de68b736efbb95d8e83a99fdfccf7a948b62f4 /libavcodec/dnxhdenc.c | |
parent | b1fad7ac200d0779a44fc267085d7d46ce2391b9 (diff) | |
parent | 5d3addb937946eca5391e40b5e6308e74ac6f77b (diff) | |
download | ffmpeg-e5bae39f46e55843c025d280ed5441e358e59f2e.tar.gz |
Merge commit '5d3addb937946eca5391e40b5e6308e74ac6f77b'
* commit '5d3addb937946eca5391e40b5e6308e74ac6f77b':
Add a quality factor packet side data
Conflicts:
doc/APIchanges
ffmpeg.c
libavcodec/avcodec.h
libavcodec/mpegvideo_enc.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index bbb0065f8a..5eba9f65ed 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -1050,7 +1050,7 @@ static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt, DNXHDEncContext *ctx = avctx->priv_data; int first_field = 1; int offset, i, ret; - uint8_t *buf; + uint8_t *buf, *sd; if ((ret = ff_alloc_packet2(avctx, pkt, ctx->cid_table->frame_size)) < 0) return ret; @@ -1103,6 +1103,11 @@ encode_coding_unit: avctx->coded_frame->quality = ctx->qscale * FF_QP2LAMBDA; + sd = av_packet_new_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR, sizeof(int)); + if (!sd) + return AVERROR(ENOMEM); + *(int *)sd = ctx->qscale * FF_QP2LAMBDA; + pkt->flags |= AV_PKT_FLAG_KEY; *got_packet = 1; return 0; |