@@ -15047,8 +15047,7 @@ The filter accepts the following options:
@table @option
@item qp
Force a constant quantization parameter. It accepts an integer in range
-0 to 63. If not set, the filter will use the QP from the video stream
-(if available).
+0 to 63.
@item mode
Set thresholding mode. Available modes are:
@@ -200,7 +200,7 @@ static int softthresh_c(PP7Context *p, int16_t *src, int qp)
static void filter(PP7Context *p, uint8_t *dst, uint8_t *src,
int dst_stride, int src_stride,
int width, int height,
- uint8_t *qp_store, int qp_stride, int is_luma)
+ int is_luma)
{
int x, y;
const int stride = is_luma ? p->temp_stride : ((width + 16 + 15) & (~15));
@@ -232,16 +232,11 @@ static void filter(PP7Context *p, uint8_t *dst, uint8_t *src,
dctA_c(tp + 4 * 8, src, stride);
}
for (x = 0; x < width; ) {
- const int qps = 3 + is_luma;
int qp;
int end = FFMIN(x + 8, width);
- if (p->qp)
- qp = p->qp;
- else {
- qp = qp_store[ (FFMIN(x, width - 1) >> qps) + (FFMIN(y, height - 1) >> qps) * qp_stride];
- qp = ff_norm_qscale(qp, p->qscale_type);
- }
+ qp = p->qp;
+
for (; x < end; x++) {
const int index = x + y * stride + (8 - 3) * (1 + stride) + 8; //FIXME silly offset
uint8_t *src = p_src + index;
@@ -321,12 +316,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out = in;
- int qp_stride = 0;
- uint8_t *qp_table = NULL;
-
- if (!pp7->qp)
- qp_table = av_frame_get_qp_table(in, &qp_stride, &pp7->qscale_type);
-
if (!ctx->is_disabled) {
const int cw = AV_CEIL_RSHIFT(inlink->w, pp7->hsub);
const int ch = AV_CEIL_RSHIFT(inlink->h, pp7->vsub);
@@ -347,16 +336,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out->height = in->height;
}
- if (qp_table || pp7->qp) {
-
- filter(pp7, out->data[0], in->data[0], out->linesize[0], in->linesize[0],
- inlink->w, inlink->h, qp_table, qp_stride, 1);
- filter(pp7, out->data[1], in->data[1], out->linesize[1], in->linesize[1],
- cw, ch, qp_table, qp_stride, 0);
- filter(pp7, out->data[2], in->data[2], out->linesize[2], in->linesize[2],
- cw, ch, qp_table, qp_stride, 0);
- emms_c();
- }
+ filter(pp7, out->data[0], in->data[0], out->linesize[0], in->linesize[0],
+ inlink->w, inlink->h, 1);
+ filter(pp7, out->data[1], in->data[1], out->linesize[1], in->linesize[1],
+ cw, ch, 0);
+ filter(pp7, out->data[2], in->data[2], out->linesize[2], in->linesize[2],
+ cw, ch, 0);
+ emms_c();
}
if (in != out) {