Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
H264 Encoder Scaling Limit
#1
If I try to encode a 3840x2160 image to a 640x360 image I get this message:

error  : cedarc <h264CheckCapability:2235>: error: scaler range is 0.25-8.0, but the request scaler[0.166667,0.170370]

Is there a way to increase the range?

I am setting up the encoder like this:
  VENC_CHN_ATTR_S ve_attr_;
  memset(&ve_attr_, 0, sizeof(VENC_CHN_ATTR_S));
  ve_attr_.VeAttr.Type = PT_H264;
  ve_attr_.VeAttr.MaxKeyInterval = 30;
  ve_attr_.VeAttr.SrcPicWidth = 3840;
  ve_attr_.VeAttr.SrcPicHeight = 2160;
  ve_attr_.VeAttr.Field = VIDEO_FIELD_FRAME;
  ve_attr_.VeAttr.PixelFormat = MM_PIXEL_FORMAT_YVU_SEMIPLANAR_420;
  ve_attr_.VeAttr.Rotate = ROTATE_NONE;
  ve_attr_.VeAttr.AttrH264e.bByFrame = TRUE;
  ve_attr_.VeAttr.AttrH264e.Profile = 2;
  ve_attr_.VeAttr.AttrH264e.MaxPicWidth =3840;
  ve_attr_.VeAttr.AttrH264e.MaxPicHeight = 2160;
  ve_attr_.VeAttr.AttrH264e.PicWidth = 640;
  ve_attr_.VeAttr.AttrH264e.PicHeight = 360;

ve_attr_.RcAttr.mRcMode = VENC_RC_MODE_H264CBR;
ve_attr_.RcAttr.mAttrH264Cbr.mGop = 30;
ve_attr_.RcAttr.mAttrH264Cbr.mSrcFrmRate = 30;
ve_attr_.RcAttr.mAttrH264Cbr.fr32DstFrmRate = 30;
ve_attr_.RcAttr.mAttrH264Cbr.mBitRate = 8 * 1024 * 1024;
Reply
#2
Tt is nothing to do about this.
maybe you should use the other video to do this.
if video1-->4K,you can use video3 ->640x360, it is OK! video1 video3 is the same image from the same csi channel
Reply
#3
Hi Michael

I am not sure what you mean by this comment:
>>>> Tt is nothing to do about this.
Does that mean there is no way to extend the scaling range?

As for using the two devices...
Yes, this works fine for us. We currently have one 1080p (/dev/video1) stream that we save as MPEG-TS files and another 4K stream (/dev/video3) we use for real-time communication with a peer (like a phone or web browser). What we are trying to achieve is 'pan & zoom' in our real-time communication channel (the 4k channel). We want the peer user to be able to pan and zoom inside the 4k image in real time. We have achieved this but we are limited by the scaling. Currently, the scaling only allows us to scale the image down to a quarter of its original size. Is there a way to extend the scaling range? If we could scale the image by 1/6 instead of just 1/4 we would be happy. Any suggestions are greatly appreciated.
Reply
#4
From the camera the signal passes through ISP which can reduce resolution, and further through VIPP, which actually 16 phase scalar of 7/5 taps. I.e. - we have 2 consistently included scalers which on the polyphase filter can reduce the picture twice. 1/4 turns out. Typical scalers, except the polyphase filter, usually are able to throw out lines, sometimes 2 that significantly expands possibilities of scaling. Unfortunately, the VIPP node (scaler) in the datasheet is not described and is not clear whether he can throw out lines. Try to read the text of a driver of sunxi-scaler and to twist its settings through IOCTL. Maybe it will turn out, and can is not present.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)