Ffmpeg filter graph2/19/2023 ![]() ![]() It then does the same thing for the chroma planes. Then, for each row, it loops through all the pixels, subtracting them from 255, and adding the offset which was determined in config_props() to account for different value ranges. This sets inrow to point to the beginning of the first row of the slice in the input, and outrow similarly for the output. Areas of the image outside this slice should not be assumed to be meaningful (though a method to allow this assumption in order to simplify boundary cases for some filters is coming in the future). The y parameter indicates the top of the current slice, and the h parameter the slice's height. Outrow = out->data + (y > neg->vsub) * out->linesize Īvfilter_draw_slice(link->dst->outputs, y, h) Outrow = out->data + y * out->linesize įor(plane = 1 plane data + (y > neg->vsub) * in-> linesize Static void draw_slice(AVFilterLink *link, int y, int h)ĪVFilterPicRef *out = link->dst->outputs->outpic ![]() It returns zero to indicate success, because there are no possible input cases which this filter cannot handle.įinally, the function which actually does the processing for the filter, draw_slice(): ![]() It then stores a set of offsets for compensating for different luma/chroma value ranges for JPEG YUV, and a different set of offsets for other YUV colorspaces. This simply calls avcodec_get_chroma_sub_sample() to get the chroma subsampling shift factors, and stores those in the context. This structure is declared in libavfilter/avfilter.h:Īvcodec_get_chroma_sub_sample(link->format, &neg->hsub, &neg->vsub) This structure gives information needed to initialize the filter, and information on the entry points into the filter code. All filters are described by an AVFilter structure.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |