xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #1046: nvenc6-debug-forcedefault.patch

File nvenc6-debug-forcedefault.patch, 1.9 KB (added by Antoine Martin, 6 years ago)

debug init structure and force default preset

  • xpra/codecs/nvenc6/encoder.pyx

     
    13431343            preset_speed = PRESET_SPEED.get(x, 50)
    13441344            preset_quality = PRESET_QUALITY.get(x, 50)
    13451345            log("preset %s: speed=%s, quality=%s", name, preset_speed, preset_quality)
     1346            if name!="default":
     1347                continue
    13461348            #log("%s speed=%s, quality=%s, lossless=%s", x, preset_speed, preset_quality, x in LOSSLESS_PRESETS)
    13471349            if x in LOSSLESS_PRESETS and self.pixel_format!="YUV444P":
    13481350                continue
     
    15201522        params = <NV_ENC_INITIALIZE_PARAMS*> malloc(sizeof(NV_ENC_INITIALIZE_PARAMS))
    15211523        assert params!=NULL
    15221524        assert memset(params, 0, sizeof(NV_ENC_INITIALIZE_PARAMS))!=NULL
     1525        cdef int i
     1526        cdef char *b
    15231527        try:
    15241528            self.init_params(codec, params)
    15251529            if DEBUG_API:
    15261530                log("nvEncInitializeEncoder using encode=%s", codecstr(codec))
     1531            b = <char *> params
     1532            log.info("NV_ENC_INITIALIZE_PARAMS:")
     1533            for i in range(1+sizeof(NV_ENC_INITIALIZE_PARAMS)//32):
     1534                start = i*32
     1535                end = min(sizeof(NV_ENC_INITIALIZE_PARAMS), (i+1)*32)
     1536                log.info(binascii.hexlify(b[start:end]))
    15271537            with nogil:
    15281538                r = self.functionList.nvEncInitializeEncoder(self.context, params)
    15291539            raiseNVENC(r, "initializing encoder")
     
    24572467    init_nvencode_library()
    24582468
    24592469    log("**************************************************************************")
    2460     #test_encodings = ("h264", "h265")
    2461     test_encodings = ("h264", )
     2470    test_encodings = ("h264", "h265")
     2471    #test_encodings = ("h264", )
    24622472    log("will probe: %s", csv(test_encodings))
    24632473    global ENCODINGS
    24642474    validated_encodings = []