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?
Are youlooking at UMC:simple_playersample, right?
See fromthe readme.htm file of simple_player sample, it only supports the following foramt,
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.
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.