History

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.

Anton Khirnov committed 5 years ago

Commit fffc35b1 parent 89f78dd3 files · +2 −21Browse files

Unified · Split

3 files
  1. libavcodec/mjpegdec.c +2 −9
  2. tests/ref/fate/exif-image-embedded +0 −6
  3. tests/ref/fate/exif-image-jpg +0 −6
libavcodec/mjpegdec.c+2−9
@@ -2606,19 +2606,12 @@ eoi_parser: · 2605 unmodified lines
26062606
26072607 frame->pkt_dts = s->pkt->dts;
26082608
2609− if (!s->lossless) {
2609+ if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
26102610 int qp = FFMAX3(s->qscale[0],
26112611 s->qscale[1],
26122612 s->qscale[2]);
2613− int qpw = (s->width + 15) / 16;
2614− AVBufferRef *qp_table_buf = av_buffer_alloc(qpw);
2615− if (qp_table_buf) {
2616− memset(qp_table_buf->data, qp, qpw);
2617− av_frame_set_qp_table(frame, qp_table_buf, 0, FF_QSCALE_TYPE_MPEG1);
2618− }
26192613
2620− if(avctx->debug & FF_DEBUG_QP)
2621− av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
2614+ av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
26222615 }
26232616
26242617 goto the_end;
tests/ref/fate/exif-image-embedded+0−6
@@ -29,12 +29,6 @@ color_transfer=unknown · 28 unmodified lines
2929 chroma_location=center
3030 TAG:UserComment=AppleMark
3131
32−[SIDE_DATA]
33−side_data_type=QP table data
34−[/SIDE_DATA]
35−[SIDE_DATA]
36−side_data_type=QP table properties
37−[/SIDE_DATA]
3832 [/FRAME]
3933 [FRAME]
4034 media_type=audio
tests/ref/fate/exif-image-jpg+0−6
@@ -229,10 +229,4 @@ TAG:ExposureMode= 0 · 228 unmodified lines
229229 TAG:WhiteBalance= 0
230230 TAG:DigitalZoomRatio= 4000:4000
231231 TAG:SceneCaptureType= 0
232−[SIDE_DATA]
233−side_data_type=QP table data
234−[/SIDE_DATA]
235−[SIDE_DATA]
236−side_data_type=QP table properties
237−[/SIDE_DATA]
238232 [/FRAME]

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t