mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:21:11 +01:00
Merge commit '7e350379f8'
* commit '7e350379f8': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit759001c534by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a05a44e205
124 changed files with 1827 additions and 1933 deletions
|
|
@ -37,7 +37,7 @@ typedef struct {
|
|||
AVExpr *e[4]; ///< expressions for each plane
|
||||
char *expr_str[4]; ///< expression strings for each plane
|
||||
int framenum; ///< frame counter
|
||||
AVFilterBufferRef *picref; ///< current input buffer
|
||||
AVFrame *picref; ///< current input buffer
|
||||
int hsub, vsub; ///< chroma subsampling
|
||||
int planes; ///< number of planes
|
||||
} GEQContext;
|
||||
|
|
@ -59,11 +59,11 @@ static inline double getpix(void *priv, double x, double y, int plane)
|
|||
{
|
||||
int xi, yi;
|
||||
GEQContext *geq = priv;
|
||||
AVFilterBufferRef *picref = geq->picref;
|
||||
AVFrame *picref = geq->picref;
|
||||
const uint8_t *src = picref->data[plane];
|
||||
const int linesize = picref->linesize[plane];
|
||||
const int w = picref->video->w >> ((plane == 1 || plane == 2) ? geq->hsub : 0);
|
||||
const int h = picref->video->h >> ((plane == 1 || plane == 2) ? geq->vsub : 0);
|
||||
const int w = picref->width >> ((plane == 1 || plane == 2) ? geq->hsub : 0);
|
||||
const int h = picref->height >> ((plane == 1 || plane == 2) ? geq->vsub : 0);
|
||||
|
||||
if (!src)
|
||||
return 0;
|
||||
|
|
@ -163,24 +163,24 @@ static int geq_config_props(AVFilterLink *inlink)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int geq_filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
|
||||
static int geq_filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
{
|
||||
int plane;
|
||||
GEQContext *geq = inlink->dst->priv;
|
||||
AVFilterLink *outlink = inlink->dst->outputs[0];
|
||||
AVFilterBufferRef *out;
|
||||
AVFrame *out;
|
||||
double values[VAR_VARS_NB] = {
|
||||
[VAR_N] = geq->framenum++,
|
||||
[VAR_T] = in->pts == AV_NOPTS_VALUE ? NAN : in->pts * av_q2d(inlink->time_base),
|
||||
};
|
||||
|
||||
geq->picref = in;
|
||||
out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
|
||||
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
|
||||
if (!out) {
|
||||
avfilter_unref_bufferp(&in);
|
||||
av_frame_free(&in);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
avfilter_copy_buffer_ref_props(out, in);
|
||||
av_frame_copy_props(out, in);
|
||||
|
||||
for (plane = 0; plane < geq->planes && out->data[plane]; plane++) {
|
||||
int x, y;
|
||||
|
|
@ -204,7 +204,7 @@ static int geq_filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
|
|||
}
|
||||
}
|
||||
|
||||
avfilter_unref_bufferp(&geq->picref);
|
||||
av_frame_free(&geq->picref);
|
||||
return ff_filter_frame(outlink, out);
|
||||
}
|
||||
|
||||
|
|
@ -224,7 +224,6 @@ static const AVFilterPad geq_inputs[] = {
|
|||
.type = AVMEDIA_TYPE_VIDEO,
|
||||
.config_props = geq_config_props,
|
||||
.filter_frame = geq_filter_frame,
|
||||
.min_perms = AV_PERM_READ,
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue