Go to the documentation of this file.
29 for(
int y=0; y<
frame->height; y++) {
30 for(
int x=0; x<
frame->width; x++) {
32 frame->data[0][x + y*
frame->linesize[0]] = x*x + y*mul;
34 frame->data[0][x + y*
frame->linesize[0]] = (y-x)*(y-x);
38 for(
int y=0; y<(
frame->height+1)/2; y++) {
39 for(
int x=0; x<(
frame->width+1)/2; x++) {
41 frame->data[1][x + y*
frame->linesize[1]] = x + y + mul;
42 frame->data[2][x + y*
frame->linesize[2]] = mul*x - y*x;
44 frame->data[1][x + y*
frame->linesize[1]] = (x - y)/(mul+1);
45 frame->data[2][x + y*
frame->linesize[2]] = (y + x)/(mul+1);
55 for(
int y=0; y<
f->height; y++) {
58 for(
int y=0; y<(
f->height+1)/2; y++) {
107 int main(
int argc,
char **argv) {
108 const char *teststrings[] = {
117 for (
int w=8;
w< 352;
w=
w*3-1) {
118 for (
int h=8;
h< 352;
h=
h*5-7) {
119 for (
int b=0;
b<6;
b++) {
120 for (
int m=0; m<17; m = 2*m+1) {
122 printf(
"striptest %dx%d T:%s m:%d result %"PRIX64
"\n",
w,
h, teststrings[
b], m,
ret);
pp_mode * pp_get_mode_by_name_and_quality(const char *name, int quality)
Return a pp_mode or NULL if an error occurred.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about quality
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void strips(AVFrame *frame, int mul)
static int64_t chksum(AVFrame *f)
av_cold void pp_free_context(void *vc)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
void pp_free_mode(pp_mode *mode)
void pp_postprocess(const uint8_t *src[3], const int srcStride[3], uint8_t *dst[3], const int dstStride[3], int width, int height, const int8_t *QP_store, int QPStride, pp_mode *vm, void *vc, int pict_type)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
av_cold pp_context * pp_get_context(int width, int height, int cpuCaps)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in without and describe what they for example set the foo of the bar offset is the offset of the field in your context
AVAdler av_adler32_update(AVAdler adler, const uint8_t *buf, size_t len)
Calculate the Adler32 checksum of a buffer.
static int64_t test(int width, int height, const char *testname, int mul, int flags, int pict_type, int quality)
printf("static const uint8_t my_array[100] = {\n")
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
int main(int argc, char **argv)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
const typedef uint8_t * cuint8
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...