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
2606 2606
2607 frame->pkt_dts = s->pkt->dts;2607 frame->pkt_dts = s->pkt->dts;
2608 2608
2609 if (!s->lossless) {2609 if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
2610 int qp = FFMAX3(s->qscale[0],2610 int qp = FFMAX3(s->qscale[0],
2611 s->qscale[1],2611 s->qscale[1],
2612 s->qscale[2]);2612 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 }
2619 2613
2620 if(avctx->debug & FF_DEBUG_QP)2614 av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
2621 av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
2622 }2615 }
2623 2616
2624 goto the_end;2617 goto the_end;
tests/ref/fate/exif-image-embedded+0−6
@@ -29,12 +29,6 @@ color_transfer=unknown · 28 unmodified lines
29chroma_location=center29chroma_location=center
30TAG:UserComment=AppleMark30TAG:UserComment=AppleMark
31 31
32[SIDE_DATA]
33side_data_type=QP table data
34[/SIDE_DATA]
35[SIDE_DATA]
36side_data_type=QP table properties
37[/SIDE_DATA]
38[/FRAME]32[/FRAME]
39[FRAME]33[FRAME]
40media_type=audio34media_type=audio
tests/ref/fate/exif-image-jpg+0−6
@@ -229,10 +229,4 @@ TAG:ExposureMode= 0 · 228 unmodified lines
229TAG:WhiteBalance= 0229TAG:WhiteBalance= 0
230TAG:DigitalZoomRatio= 4000:4000230TAG:DigitalZoomRatio= 4000:4000
231TAG:SceneCaptureType= 0231TAG:SceneCaptureType= 0
232[SIDE_DATA]
233side_data_type=QP table data
234[/SIDE_DATA]
235[SIDE_DATA]
236side_data_type=QP table properties
237[/SIDE_DATA]
238[/FRAME]232[/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