Hi,Is there any specific API or steps to decode the ALPHA channel from VP8 encoded Webm file. I've done the alpha encoding using webm_tools/alpha_encoder.
Thanks,Abhishek--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webm-discuss/d7cc0fe8-87d0-4e95-a2ae-715cf38423c3n%40webmproject.org.
After decoding the YUV data, I'm trying to decode the Alpha channel data using this technique(Try and decode buffer->side_data() minus the first 8 bytes as a full frame.)vpx_codec_decode(&mDecoder, buf, (unsigned int) bytes_in_buffer, NULL, 0)mVPXImage = vpx_codec_get_frame(&mDecoder, &iter)Upto here I'm getting the correct YUV image buffer data inside mVPXImage, but alpha is absent.To deode alpha, I tried below strategy :vpx_codec_ctx_t mDecoderAlpha;vpx_codec_err_t error = vpx_codec_dec_init(&mDecoderAlpha, &vpx_codec_vp8_dx_algo, NULL, 0);vpx_codec_err_t status = vpx_codec_decode(&mDecoderAlpha, buffer + 8, buf_size - 8, nullptr /* user_priv */, 0 /* deadline */);
But i'm getting status as VPX_CODEC_UNSUP_BITSTREAM.Same thing I tried for vpx_codec_vp9_dx_algo, but same error code is generated.Any help would be appreciated.Thanks,AbhishekOn Thursday, October 1, 2020 at 10:49:53 PM UTC+5:30 abhishek pandey wrote:Hi,Is there any specific API or steps to decode the ALPHA channel from VP8 encoded Webm file. I've done the alpha encoding using webm_tools/alpha_encoder.Thanks,Abhishek
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webm-discuss/074844bc-1a74-4938-bc8c-95415a165ac0n%40webmproject.org.
I've guess the issue is in reading the frame additional data(side data mentioned above).
I'm using below code (mkvparser reference) to read the frame data.const mkvparser::Block *mContainerBlock = NULL;mkvparser::MkvReader *mContainerParser = NULL;/*****code for init*****/const mkvparser::Block::Frame &frame = mContainerBlock->GetFrame(mContainerBlockFrameIndex);++mContainerBlockFrameIndex;
if (frame.len > static_cast<long>(*buffer_size)) {
delete[] *buffer;
*buffer = new uint8_t[frame.len];
if (*buffer == NULL) {
return -1;
}
}
*buffer_size = frame.len;
mContainerTimestamp = mContainerBlock->GetTime(mContainerCluster);
return frame.Read(mContainerParser, *buffer) ? -1 : 0;
Above code works for reading the frame data but I can see no option to read the additional block data(the alpha data), neither I found any reference for the same.I guess I'm asking silly questions but I got no clue how to read the additional data from mkv format.
Any help would be appreciated.