Unable to decrease decoding video size, found bug probably,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Benny, did you tried change (decrease video resolution)?
Try 640x480 and it will be decoded to 720x480 (but not in 640x480 as must
be!).
This is bug I think, and I found how to fix it (read my previous message).

I use:
http://svn.pjsip.org/repos/pjproject/trunk
Revision 4145.



2012/5/25 Dmitry (MicroSIP) <info at microsip.org.ua>

> http://svn.pjsip.org/repos/pjproject/trunk
>
> H.264 uses 720x480 @ 15 fps as default format of coding/decoding video.
> I want 640x480.
>
>         const pj_str_t codec_id = {"H264", 4};
>         pjmedia_vid_codec_param param;
>         pjsua_vid_codec_get_param(&codec_id, &param);
>         param.enc_fmt.det.vid.size.w = 640;
>         param.enc_fmt.det.vid.size.h = 480;
>         param.enc_fmt.det.vid.fps.num = 30;
>         param.enc_fmt.det.vid.fps.denum = 1;
>         param.dec_fmt.det.vid.size.w = 640;
>         param.dec_fmt.det.vid.size.h = 480;
>         param.dec_fmt.det.vid.fps.num = 30;
>         param.dec_fmt.det.vid.fps.denum = 1;
>         param.dec_fmtp.cnt = 2;
>         param.dec_fmtp.param[0].name = pj_str("profile-level-id");
>         param.dec_fmtp.param[0].val = pj_str("42e01e");
>         param.dec_fmtp.param[1].name = pj_str("packetization-mode");
>         param.dec_fmtp.param[1].val = pj_str("1");
>         pjsua_vid_codec_set_param(&codec_id, &param);
>
>
> Now what we get.
>
> Encoding format:  640x480
> Decoding format: 720x480
>
> Probmel found in file vic_codec_util.c
>
> This lines
>
>    if (vfd->size.w * vfd->size.h < level_info.def_w * level_info.def_h) {
>         vfd->size.w = level_info.def_w;
>         vfd->size.h = level_info.def_h;
>     }
>
> fallbacks to default level-id codec parameter, instead uses specified in
> pjsua vid_codec_set_param.
>
> What I think this lines must means: if video pixel count greater that max
> level-id pixel count, we must use level-id default sizes.
>
> I changed  < to > and now it work for me.
>
> What you think? May be I am wrong?
>
>
>
>
> ---------------------------------------
>  Benny:
>
> It will be great if you send your mail to the mailing list next time,
> because I myself don't know all the pjsip codes and I had to forward your
> mail to people here who otherwise would be able to read and respond to your
> mail directly.
>
> Secondly, please mention the pjsip version that you're using. Lately we're
> moving on daily basis and your bug may have been fixed.
>
> What's the problem ? In current code, we allocate buffer to anticipate
> bigger picture size. If the picture size is decreasing then we'll just use
> that buffer, hence we think the code is correct.
>
> Best regards,
>  Benny
>
> On Thu, May 24, 2012 at 6:48 PM, Dmitry Valegov <valegov at gmail.com> wrote:
> Hello Benny,
>
> 1. I had problems with decreasing video size, and after few days found
> this.
>
> Current:
>
>     if (vfd->size.w * vfd->size.h < level_info.def_w * level_info.def_h) {
>         vfd->size.w = level_info.def_w;
>         vfd->size.h = level_info.def_h;
>     }
>
>
> Must be:
>
>     if (vfd->size.w * vfd->size.h *>* level_info.def_w *
> level_info.def_h) {
>         vfd->size.w = level_info.def_w;
>         vfd->size.h = level_info.def_h;
>     }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120528/a96000cf/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux