[FFmpeg-user] How to apply effects to a frame decoded using ffmpeg?

David Varghese davidvrgh at gmail.com
Wed Jul 23 15:05:24 CEST 2014


Hi,

I wanted to apply changes in contrast,brightness,saturation values of a
video while rendering on android.

I think I have two options for applying the effects ,

1) Apply the changes on raw YUV frames .

2) Apply the changes to RGB frames which are created from raw YUV frames .

Which of the above is the best approach?

I started with option 2 and found a utility function at libwscale/util.c
which has the below signature.

int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
                         int srcRange, const int table[4], int dstRange,
                         int brightness, int contrast, int saturation);

but the parameter specification of the above function was difficult to
understand. Can anybody do a little elaboration on the parameters use in
this function?especially inv_table and table .

-- 
Thanks and Regards ,
David Varghese


More information about the ffmpeg-user mailing list