On Dec 6, 2008, at 6:53 PM, Michael Conrad wrote: > On Sat, 06 Dec 2008 17:30:04 -0500, Chase Douglas wrote: >> What I get are a bunch of >> yuv420p frames that I can't easily tell whether they have any valid >> data or not (I don't know how yuv420p data is really formatted, and >> I'd rather leave it at that if possible), > > Debugging tip: the first plane of YUV is a grayscale image. If you > write > it to a file, you can open it in gimp as "raw image data" and get an > idea > of whether it contains an image. (gimp lets you play with width, > height, > and format and gives you a preview of the resulting interpretation > of the > data)
Thank you very much for that tip. I have output the first plane of both an avi and an mpg file and opened them in gimp. Both appeared to be the same. In fact, I diffed the two and found that they were exactly the same. So far so good. Then I tried writing the second plane of the decoded YUV420P. I assume this is the U plane. Both avi and mpg frames came out exactly the same again. Finally, I wrote the third plane of each format and found that they differed. After looking through both format's planes, I so far haven't seen huge variances in the bytes. Would it help to post any of this data for others to see? I will continue to analyze these V planes to see exactly what is wrong. What could be in this plane that would throw off swscale so much that it fails to output anything? BTW, I am using --enable-gpl, so I believe I'm using libswscale. >> but after running the frame through sws_scale() all I get is zeroed >> out >> RGB_5_6_5 frames. > > If you aren't using libswscale, not all destination formats are > supported. I forget where offhand, but in libav there's a table of > function pointers for converting between src format / dest format, > and it > has lots of empty cells. > > So in short, does it work if you pick a different destination pixel > format? Given what I've found so far, is this still a possibility? Should I try outputting to RGB24? I can't see how it could make a difference, but if it could, let me know. Thanks _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
