summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-26 17:13:59 +0100
committerAnton Khirnov <anton@khirnov.net>2021-02-08 11:06:10 +0100
commitfffc35b870ea3b11689dd1ff871dbcf288462569 (patch)
tree45021cee68d078df3b201cc26ff057cfcbcab3a6 /libavcodec/mjpegdec.c
parent89f78dd0fe0640c7ec3b2dfe90a91da4e1ac2618 (diff)
mjpegdec: stop setting the QP table
MJPEG does not have a single quantiser scale, so this does not fit into the intended API use. This removes the last use of the long-deprecated QP table API.
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 8876afd966..fa4c607085 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2606,19 +2606,12 @@ eoi_parser:
frame->pkt_dts = s->pkt->dts;
- if (!s->lossless) {
+ if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
int qp = FFMAX3(s->qscale[0],
s->qscale[1],
s->qscale[2]);
- int qpw = (s->width + 15) / 16;
- AVBufferRef *qp_table_buf = av_buffer_alloc(qpw);
- if (qp_table_buf) {
- memset(qp_table_buf->data, qp, qpw);
- av_frame_set_qp_table(frame, qp_table_buf, 0, FF_QSCALE_TYPE_MPEG1);
- }
- if(avctx->debug & FF_DEBUG_QP)
- av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
+ av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
}
goto the_end;