- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi everybody...
i'm in programming a video decoder. input are coded video-files and output should be single decoded image-files. so far it works well, butnow i would like to havethe output files in gray-scale format.
i created a FWVideoRender-Object and set colorformat to GRAY:
---> params.out_data_template.Init(video_info->clip_info.width, video_info->clip_info.height, GRAY);
when i init the VideoRender i geta UMC_ERR_NOT_IMPLEMENTED - error.
so is there any other possibility to do this?
bye...
michael
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Are youlooking at UMC:simple_playersample, right?
See fromthe readme.htm file of simple_player sample, it only supports the following foramt,
-f
So the color format gray is not implemented. But it is possible to add such implementation.The project color_space_converter provideallcolor conversion support in simple_player. So you may addthe conversion fromYUV to GRAY there, bycall IPP color conversionfunction listed in ippiman.pdf, such as ippiYCbCr420ToBGR_8u_P3C3R, then ippiRGBToGrayGray().
Here is oneUMC KB artile <http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/>. It provides several simple source code for your reference.
Regards
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since all video codecs are in YUV/YCbCr format and the Y luminance is in separate macroblocks and has its own motion vectors, wouldn't it be simple to just ignore the CbCr chrominance at the decoder level, and output only the Y plane? If grayscale output was requested, the decoder could treat the video as being encoded with a single component in the first place. This would be much faster than decoding YCbCr, converting to RGB then back to grayscale.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - martin
Since all video codecs are in YUV/YCbCr format and the Y luminance is in separate macroblocks and has its own motion vectors, wouldn't it be simple to just ignore the CbCr chrominance at the decoder level, and output only the Y plane? If grayscale output was requested, the decoder could treat the video as being encoded with a single component in the first place. This would be much faster than decoding YCbCr, converting to RGB then back to grayscale.
Good idea! Yes, to onlyoutput the Y plane should be faster, simplerand more straightforward.It may need some works to modify decoder codeto decode Y plane only. If consideringaddthe grayscale support in color_space_converterproject, it is not necessary to convert to RGB then back to grayscale.Just copy the Y component to required output shoud be ok.
BR
Ying

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page