Configuring independent slices in a frame

Hi,
I am working on

Nvidia GPU processor: NVIDIA GeForce GTX 1650
Video codec sdk: 12.0.16
CUDA Version: 12.0
Nvidia driver version: 525.85.05

I encode and decode video, I configured the encoder to work with slices:

    configuration->encodeCodecConfig.hevcConfig.sliceMode = 3;          
    configuration->encodeCodecConfig.hevcConfig.sliceModeData = 4;

I zeroed the 3rd slice after encoding and I saved the buffers to a file and played it using ffplay and I see that the third slice is deleted but when using cuvidParseVideoData I see that there are artifacts on the whole frames. I use this code to decode the buffer:

        CUVIDSOURCEDATAPACKET packet;
        memset(&packet, 0, sizeof(packet));
        packet.payload = reinterpret_cast<unsigned char *>(buffer);
        packet.payload_size = data.length;
        packet.timestamp = timestamp;
        packet.flags = CUVID_PKT_TIMESTAMP | CUVID_PKT_ENDOFPICTURE;
        CUresult result = cuvidParseVideoData(_parser, &packet);

@DaneLLL maybe you know how to configure the decoder so that zeroing a single slice will not affect the other slices

Hi there @aviv6! Welcome to the NVIDIA developer forums.

I will try to get someone from our Video experts to check this out.

In the mean time, could you also share the encoding and/or buffer write part of your code?

Thanks!