From: Michael N. <mic...@gm...> - 2009-03-20 01:59:56
|
On Thu, Mar 19, 2009 at 07:35:49PM -0600, Bob Ingraham wrote: > Good news! > > Shortly after I wrote that last email I found that the cause of many (but not all,) of my major artifacts was my coding error in decoding the adaptation field length. > > After re-reading the MPEG2 spec, I realized that I was one byte too short in calculating the byte offset of the payload when a adapation field was present in the TS packet. Hence, the frequent major artifacts were a result of one extra byte of data before the actual mpeg2 frame. > > So, I am an idiot! How exciting is that? :-) > > Anyway, the image is much more stable. However I still get a *lot* of artifacts when displaying a live shot of the ocean waves crashing onto a beach in California. (I work for a satellite company and we have some hi-def, fixed cameras at this particular beach...) > > The edges of the waves, along with white caps on the waves definitely cause grief, but the biggest problem is the OSD of the clock-time superimposed on the frames (it changes every second,) - it looks like the time gets washed torwards the shore every time a wave passes through it. Also, the digits of the numbers are supposed to be white and they keep turning rainbow colors... > > But, as sanity check, I a comparing the same satellite feed coming through libavcodec versus a commercial mpeg2 receiver, and the mpeg2 receiver has zero-problems with the OSD clock overlay. The time-digits are steady and white and the blockiness of the waves is finer grained. > > Michael, I respect your work, knowledge and contributions to ffmpeg and would happy to post a stream capture of the live beach video tomorrow for folks to test with. > > Based on the above descripton, do you have any recommendations for tweaking the CodecContext (or applying a post-processing filter to smooth-out the wave edges?) You shouldnt draw into the internal buffers of libavcodec, it uses them for predicting future frames. Also you likely want to read the docs about get/relealse_buffer() about postprocessing, theres libpostproc and some filters in mplayers libmpcodecs like vf_spp, later is significantly slower but higher quality [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct awnser. |