#include "libavutil/pixdesc.h"
#include "internal.h"
#include "vf_pp7.h"
-#include "libavcodec/avcodec.h"
enum mode {
MODE_HARD,
N / (SN2 * SN0), N / (SN2 * SN2), N / (SN2 * SN0), N / (SN2 * SN2),
};
-static inline int norm_qscale(int qscale, int type)
-{
- switch (type) {
- case FF_QSCALE_TYPE_MPEG1: return qscale;
- case FF_QSCALE_TYPE_MPEG2: return qscale >> 1;
- case FF_QSCALE_TYPE_H264: return qscale >> 2;
- case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2;
- }
- return qscale;
-}
-
static void init_thres2(PP7Context *p)
{
int qp, i;
qp = p->qp;
else {
qp = qp_store[ (FFMIN(x, width - 1) >> qps) + (FFMIN(y, height - 1) >> qps) * qp_stride];
- qp = norm_qscale(qp, p->qscale_type);
+ qp = ff_norm_qscale(qp, p->qscale_type);
}
for (; x < end; x++) {
const int index = x + y * stride + (8 - 3) * (1 + stride) + 8; //FIXME silly offset
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P,
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P,
+ AV_PIX_FMT_GBRP,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
};
ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
pp7->vsub = desc->log2_chroma_h;
pp7->temp_stride = FFALIGN(inlink->w + 16, 16);
- pp7->src = av_malloc(pp7->temp_stride * (h + 8) * sizeof(uint8_t));
+ pp7->src = av_malloc_array(pp7->temp_stride, (h + 8) * sizeof(uint8_t));
if (!pp7->src)
return AVERROR(ENOMEM);
return AVERROR(ENOMEM);
}
av_frame_copy_props(out, in);
+ out->width = in->width;
+ out->height = in->height;
}
if (qp_table || pp7->qp) {