From the imagepng() man page linked to the question,
filters
Allows reducing the PNG file size. It is a bitmask field which may
be set to any combination of the PNG_FILTER_XXX constants.
PNG_NO_FILTER > or PNG_ALL_FILTERS may also be used to respectively
disable or activate all filters.
So, to let libpng try the none, sub, and up filters, you'd use
PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP
PNG_ALL_FILTERS is just shorthand for
PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH
As for which filter to use, it depends upon the image. Images with 256 or fewer colors generally compress better with PNG_NO_FILTER, while images with many colors (such as photos) generally compress better with PNG_FILTER_SUB or PNG_ALL_FILTERS. Applications like "optipng" or my "pngcrush" try to optimize the filter selection. If you're going to use one of those third-party applications for final optimization, you should just use PNG_NO_FILTERS for your working copies, for speed.