Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471144 > unrolled thread

MFC: different h264 profile and level output the same size encoded result

Started byRandy Li <randy.li@rock-chips.com>
First post2016-08-27 12:00 +0200
Last post2016-08-29 08:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  MFC: different h264 profile and level output the same size encoded  result Randy Li <randy.li@rock-chips.com> - 2016-08-27 12:00 +0200
    Re: MFC: different h264 profile and level output the same size encoded  result Andrzej Hajda <a.hajda@samsung.com> - 2016-08-29 07:50 +0200
      Re: MFC: different h264 profile and level output the same size  encoded result Randy Li <randy.li@rock-chips.com> - 2016-08-29 08:00 +0200

#1471144 — MFC: different h264 profile and level output the same size encoded result

FromRandy Li <randy.li@rock-chips.com>
Date2016-08-27 12:00 +0200
SubjectMFC: different h264 profile and level output the same size encoded result
Message-ID<saIz8-2Vv-13@gated-at.bofh.it>
Hi:

   I have been reported that the setting the profile, level and bitrate 
through the v4l2 extra controls would not make the encoded result 
different. I tried it recently, it is true. Although the h264 parser 
would tell me the result have been applied as different h264 profile and 
level, but size is the same.

You may try this in Gstreamer.

gst-launch-1.0 -v \
videotestsrc num-buffers=500 ! video/x-raw, width=1920,height=1080 ! \
videoconvert ! \
v4l2video4h264enc 
extra-controls="controls,h264_profile=1,video_bitrate=100;" ! \
h264parse ! matroskamux ! filesink location=/tmp/1.mkv

Is there any way to reduce the size of MFC encoded data?

[toc] | [next] | [standalone]


#1471556

FromAndrzej Hajda <a.hajda@samsung.com>
Date2016-08-29 07:50 +0200
Message-ID<sbnCi-3jm-9@gated-at.bofh.it>
In reply to#1471144
Hi,

On 08/27/2016 11:55 AM, Randy Li wrote:
> Hi:
>
>    I have been reported that the setting the profile, level and bitrate 
> through the v4l2 extra controls would not make the encoded result 
> different. I tried it recently, it is true. Although the h264 parser 
> would tell me the result have been applied as different h264 profile and 
> level, but size is the same.
>
> You may try this in Gstreamer.
>
> gst-launch-1.0 -v \
> videotestsrc num-buffers=500 ! video/x-raw, width=1920,height=1080 ! \
> videoconvert ! \
> v4l2video4h264enc 
> extra-controls="controls,h264_profile=1,video_bitrate=100;" ! \
> h264parse ! matroskamux ! filesink location=/tmp/1.mkv
>
> Is there any way to reduce the size of MFC encoded data?
>

There is control called rc_enable (rate control enable), it must be set
to one if you want to control bitrate.
This control confuses many users, I guess it cannot be removed as it
is already part of UAPI, but enabling it internally by the driver
if user sets bitrate, profille, etc, would make it more saner.

Regards
Andrzej

[toc] | [prev] | [next] | [standalone]


#1471557 — Re: MFC: different h264 profile and level output the same size encoded result

FromRandy Li <randy.li@rock-chips.com>
Date2016-08-29 08:00 +0200
SubjectRe: MFC: different h264 profile and level output the same size encoded result
Message-ID<sbnLX-3mp-1@gated-at.bofh.it>
In reply to#1471556

On 08/29/2016 01:49 PM, Andrzej Hajda wrote:
> Hi,
>
> On 08/27/2016 11:55 AM, Randy Li wrote:
>> Hi:
>>
>>    I have been reported that the setting the profile, level and bitrate
>> through the v4l2 extra controls would not make the encoded result
>> different. I tried it recently, it is true. Although the h264 parser
>> would tell me the result have been applied as different h264 profile and
>> level, but size is the same.
>>
>> You may try this in Gstreamer.
>>
>> gst-launch-1.0 -v \
>> videotestsrc num-buffers=500 ! video/x-raw, width=1920,height=1080 ! \
>> videoconvert ! \
>> v4l2video4h264enc
>> extra-controls="controls,h264_profile=1,video_bitrate=100;" ! \
>> h264parse ! matroskamux ! filesink location=/tmp/1.mkv
>>
>> Is there any way to reduce the size of MFC encoded data?
>>
>
> There is control called rc_enable (rate control enable), it must be set
> to one if you want to control bitrate.
> This control confuses many users, I guess it cannot be removed as it
> is already part of UAPI, but enabling it internally by the driver
> if user sets bitrate, profille, etc, would make it more saner.
I see, thank you so much.
A guy told me that the "frame_level_rate_control_enable=1" in _ 
extra-controls="encode,h264_level=10,h264_profile=4,frame_level_rate_control_enable=1,video_bitrate=2097152"
would also make it works.
But I really know there is a switch need to turn on.

>
> Regards
> Andrzej
>
>

-- 
Randy Li
The third produce department

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web