From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91281] Tonga VCE 2160p encode fails with BO to small for addr Date: Sun, 07 Aug 2016 23:32:46 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0983155522==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 6033F6E21C for ; Sun, 7 Aug 2016 23:32:46 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0983155522== Content-Type: multipart/alternative; boundary="14706127660.e4aBafbD.26634"; charset="UTF-8" --14706127660.e4aBafbD.26634 Date: Sun, 7 Aug 2016 23:32:46 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D91281 --- Comment #6 from Andy Furniss --- Maybe if enc->base.level is unreliable I shouldn't trust enc->base.max_references either, but it seems that the h/w gets set up usin= g it - radeon_vce_40_2_2.c RVCE_CS(MAX2(enc->base.max_references, 1) - 1); // encBPicPattern RVCE_CS(MIN2(enc->base.max_references, 2)); // encNumberOfReferenceFrames RVCE_CS(enc->base.max_references + 1); // encMaxNumRefFrames radeon_vce_52.c: enc->enc_pic.pc.enc_b_pic_pattern =3D MAX2(enc->base.max_references, 1) - 1; enc->enc_pic.pc.enc_number_of_reference_frames =3D MIN2(enc->base.max_refer= ences, 2); enc->enc_pic.pc.enc_max_num_ref_frames =3D enc->base.max_references + 1; So unless I miss something the whole function body of get_cpb_num could be replaced with just return MIN2(enc->base.max_references + 1, 16); It works testing wise with level 5.2 and doesn't need the level given by the encoder/omx state tracker to be correct. It also saves allocating buffers t= hat aren't really used. --=20 You are receiving this mail because: You are the assignee for the bug.= --14706127660.e4aBafbD.26634 Date: Sun, 7 Aug 2016 23:32:46 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Comment= # 6 on bug 91281<= /a> from Andy Furniss
Maybe if enc->base.level is unreliable I shouldn't trust
enc->base.max_references either, but it seems that the h/w gets set up u=
sing it
-

radeon_vce_40_2_2.c
RVCE_CS(MAX2(enc->base.max_references, 1) - 1); // encBPicPattern
RVCE_CS(MIN2(enc->base.max_references, 2)); // encNumberOfReferenceFrames
RVCE_CS(enc->base.max_references + 1); // encMaxNumRefFrames

radeon_vce_52.c:
enc->enc_pic.pc.enc_b_pic_pattern =3D MAX2(enc->base.max_references, =
1) - 1;
enc->enc_pic.pc.enc_number_of_reference_frames =3D MIN2(enc->base.max=
_references,
2);
enc->enc_pic.pc.enc_max_num_ref_frames =3D enc->base.max_references +=
 1;

So unless I miss something the whole function body of get_cpb_num could be
replaced with just

return MIN2(enc->base.max_references + 1, 16);

It works testing wise with level 5.2 and doesn't need the level given by the
encoder/omx state tracker to be correct. It also saves allocating buffers t=
hat
aren't really used.


You are receiving this mail because:
  • You are the assignee for the bug.
= --14706127660.e4aBafbD.26634-- --===============0983155522== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0983155522==--