[Mesa-dev] [PATCH v3 4/8] radeon/uvd:add uvd hevc enc hw ib implementation
James Zhu
jamesz at amd.com
Tue Feb 13 15:58:24 UTC 2018
On 2018-02-10 11:20 AM, Mark Thompson wrote:
> On 09/02/18 20:35, James Zhu wrote:
>> Implement required IBs for UVD HEVC encode.
>>
>> Signed-off-by: James Zhu <James.Zhu at amd.com>
>> ---
>> src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c | 1115 +++++++++++++++++++++++
>> 1 file changed, 1115 insertions(+)
>> create mode 100644 src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c
>>
>> diff --git a/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c b/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c
>> new file mode 100644
>> index 0000000..2b8156e
>> --- /dev/null
>> +++ b/src/gallium/drivers/radeon/radeon_uvd_enc_1_1.c
>> @@ -0,0 +1,1115 @@
>> ...
>> +
>> +static void
>> +radeon_uvd_enc_emulation_prevention(struct radeon_uvd_encoder *enc,
>> + unsigned char byte)
>> +{
>> + if (enc->emulation_prevention) {
>> + if ((enc->num_zeros >= 2)
>> + && ((byte == 0x00) || (byte == 0x01) || (byte == 0x03))) {
> Shouldn't { 0, 0, 2 } also trigger emulation prevention? Or am I not understanding what this function does?
>
Hi, Mark,
You are right. should add 00 00 02 case.
pls check the update in PATCH v5 4/8
Thanks! James
>> + radeon_uvd_enc_output_one_byte(enc, 0x03);
>> + enc->bits_output += 8;
>> + enc->num_zeros = 0;
>> + }
>> + enc->num_zeros = (byte == 0 ? (enc->num_zeros + 1) : 0);
>> + }
>> +}
>> +
>> ...
> Thanks,
>
> - Mark
More information about the mesa-dev
mailing list