On Wed, Jul 15, 2015 at 08:06:49PM -0300, Pedro Arthur wrote: [...] > diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h > index 2299aa5..82713fd 100644 > --- a/libswscale/swscale_internal.h > +++ b/libswscale/swscale_internal.h > @@ -269,6 +269,9 @@ typedef void (*yuv2anyX_fn)(struct SwsContext *c, const > int16_t *lumFilter, > const int16_t **alpSrc, uint8_t **dest, > int dstW, int y); > > +struct SwsSlice; > +struct SwsFilterDescriptor; > + > /* This struct should be aligned on at least a 32-byte boundary. */ > typedef struct SwsContext { > /** > @@ -319,6 +322,12 @@ typedef struct SwsContext { > uint16_t *gamma; > uint16_t *inv_gamma; > > + int numDesc; > + int descIndex[2]; > + int numSlice; > + struct SwsSlice *slice; > + struct SwsFilterDescriptor *desc; > + > uint32_t pal_yuv[256]; > uint32_t pal_rgb[256]; > > @@ -908,4 +917,55 @@ static inline void fillPlane16(uint8_t *plane, int > stride, int width, int height > } > } > > +#define MAX_SLICE_PLANES 4 > + > +typedef struct SwsPlane > +{ > + int available_lines; > + int sliceY; > + int sliceH; > + uint8_t **line; > +} SwsPlane; > + > +typedef struct SwsSlice > +{ > + int width; > + int h_chr_sub_sample; > + int v_chr_sub_sample; > + int is_ring; > + int should_free_lines; > + enum AVPixelFormat fmt; > + SwsPlane plane[MAX_SLICE_PLANES]; > +} SwsSlice; > +
> +typedef struct SwsFilterDescriptor > +{ > + SwsSlice * src; > + SwsSlice * dst; > + > + int alpha; > + void * instance; > + > + int (*process)(SwsContext*, struct SwsFilterDescriptor*, int, int); ^^^^^^^ missing indentifier names, "int" alone says nothing about what they represent > +} SwsFilterDescriptor; > + > +typedef struct ConvertInstance > +{ > + uint32_t * pal; > +} ConvertInstance; the instance context is generally called a WhateverContext in FFmpeg, using the same naming style might reduce confusion that is ConvertContext though "Convert" is maybe too generic, if you have an idea for a more specific term then Convert then please use that instead otherwise the name isnt important ATM > + > +typedef struct ScaleInstance > +{ > + uint16_t * filter; > + int * filter_pos; > + int filter_size; > + int xInc; > +} ScaleInstance; all the structs need documentation describing what they represent also "Scale" too is a little generic unless its intended to be used for (nearly) every scaling case > + > +int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int > srcW, int lumY, int lumH, int chrY, int chrH); > +int ff_init_slice_from_lp(SwsSlice *s, uint8_t ***linesPool, int dstW, int > lumY, int lumH, int chrY, int chrH); > +int ff_init_filters(SwsContext *c); > +int ff_free_filters(SwsContext *c); > +int ff_rotate_slice(SwsSlice *s, int lum, int chr); similar also all the functions need documentation (something basic like 2-3 lines describing what they do is fine) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel