libva icon indicating copy to clipboard operation
libva copied to clipboard

JPEG Encoding Corrupted with DRM_PRIME_2 and NV12 Surface

Open polhaghverdian opened this issue 6 months ago • 0 comments

The output gets corrupted if the input surface is created by importing an NV12 DMA-BUF (exported from Vulkan) with VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2. However, the source image itself is correct—I verified this by saving the raw NV12 DMA-BUF buffer to a file, which confirms its content is intact.

On the other hand, when using the same JPEG encoding parameters with a surface created directly via vaCreateSurfaces, without importing the DMA-BUF and instead using vaMapBuffer, the resulting JPEG image is correct.

    VADRMPRIMESurfaceDescriptor prime_desc = {0};
    prime_desc.fourcc = VA_FOURCC_NV12;
    prime_desc.width = nv12_frame->width;
    prime_desc.height = nv12_frame->height;
    prime_desc.num_objects = 1;
    prime_desc.objects[0].fd = nv12_frame->fds[0];
    prime_desc.objects[0].size = nv12_frame->sizes[0] + nv12_frame->sizes[1];
    prime_desc.objects[0].drm_format_modifier = nv12_frame->modifier;

    prime_desc.num_layers = 1;
    prime_desc.layers[0].drm_format = VA_FOURCC_NV12;
    prime_desc.layers[0].num_planes = 2;
    prime_desc.layers[0].object_index[0] = 0;
    prime_desc.layers[0].object_index[1] = 0;
    prime_desc.layers[0].offset[0] = nv12_frame->offsets[0];
    prime_desc.layers[0].offset[1] = nv12_frame->offsets[1];
    prime_desc.layers[0].pitch[0] = nv12_frame->strides[0];
    prime_desc.layers[0].pitch[1] = nv12_frame->strides[1];

    VASurfaceAttrib attribs[2];
    attribs[0].type = VASurfaceAttribMemoryType;
    attribs[0].flags = VA_SURFACE_ATTRIB_SETTABLE;
    attribs[0].value.type = VAGenericValueTypeInteger;
    attribs[0].value.value.i = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2;

    attribs[1].type = VASurfaceAttribExternalBufferDescriptor;
    attribs[1].flags = VA_SURFACE_ATTRIB_SETTABLE;
    attribs[1].value.type = VAGenericValueTypePointer;
    attribs[1].value.value.p = &prime_desc;

    status = vaCreateSurfaces(encoder->va_display,
        VA_RT_FORMAT_YUV420,
        nv12_frame->width, nv12_frame->height,
        &dmabuf_surface_id, 1,
        attribs, 2);

Environment:

  • OS: Ubuntu 24.04
  • Intel-media-driver: 24.4.4 (Also observed in 24.1.0)
  • Hardware: Intel GPU SKYLAKE
  • libva Version: version: 1.23 (libva 2.22.0)
[5323.132931][ctx       none]==========va_TraceInitialize
[5323.132967][ctx       none]==========	VA-API vendor string: Intel iHD driver for Intel(R) Gen Graphics - 24.4.4 (d3c30f6dd)
[5323.132975][ctx       none]=========vaInitialize ret = VA_STATUS_SUCCESS, success (no error) 
[5323.132999][ctx       none]==========va_TraceCreateConfig
[5323.133000][ctx       none]	profile = 12, VAProfileJPEGBaseline
[5323.133002][ctx       none]	entrypoint = 7, VAEntrypointEncPicture
[5323.133002][ctx       none]	num_attribs = 0
[5323.133031][ctx       none]=========vaCreateConfig ret = VA_STATUS_SUCCESS, success (no error) 
[5323.133040][ctx       none]==========va_TraceQuerySurfaceAttributes
[5323.133041][ctx       none]	config = 0x0000042d
[5323.133045][ctx       none]=========vaQuerySurfaceAttributes ret = VA_STATUS_SUCCESS, success (no error) 
[5323.133049][ctx       none]==========va_TraceQuerySurfaceAttributes
[5323.133049][ctx       none]	config = 0x0000042d
[5323.133050][ctx       none]	attrib_list[0] =
[5323.133051][ctx       none]		type = 1
[5323.133051][ctx       none]		flags = 3
[5323.133052][ctx       none]		value.type = 1
[5323.133052][ctx       none]		value.value.i = 0x3231564e
[5323.133053][ctx       none]	attrib_list[1] =
[5323.133054][ctx       none]		type = 1
[5323.133054][ctx       none]		flags = 3
[5323.133055][ctx       none]		value.type = 1
[5323.133055][ctx       none]		value.value.i = 0x32595559
[5323.133056][ctx       none]	attrib_list[2] =
[5323.133057][ctx       none]		type = 1
[5323.133057][ctx       none]		flags = 3
[5323.133058][ctx       none]		value.type = 1
[5323.133059][ctx       none]		value.value.i = 0x59565955
[5323.133059][ctx       none]	attrib_list[3] =
[5323.133060][ctx       none]		type = 1
[5323.133060][ctx       none]		flags = 3
[5323.133061][ctx       none]		value.type = 1
[5323.133062][ctx       none]		value.value.i = 0x30303859
[5323.133062][ctx       none]	attrib_list[4] =
[5323.133063][ctx       none]		type = 1
[5323.133063][ctx       none]		flags = 3
[5323.133064][ctx       none]		value.type = 1
[5323.133065][ctx       none]		value.value.i = 0x52474241
[5323.133065][ctx       none]	attrib_list[5] =
[5323.133066][ctx       none]		type = 3
[5323.133066][ctx       none]		flags = 1
[5323.133067][ctx       none]		value.type = 1
[5323.133068][ctx       none]		value.value.i = 0x00004000
[5323.133068][ctx       none]	attrib_list[6] =
[5323.133069][ctx       none]		type = 5
[5323.133069][ctx       none]		flags = 1
[5323.133070][ctx       none]		value.type = 1
[5323.133071][ctx       none]		value.value.i = 0x00004000
[5323.133071][ctx       none]	attrib_list[7] =
[5323.133072][ctx       none]		type = 2
[5323.133072][ctx       none]		flags = 1
[5323.133073][ctx       none]		value.type = 1
[5323.133074][ctx       none]		value.value.i = 0x00000010
[5323.133074][ctx       none]	attrib_list[8] =
[5323.133075][ctx       none]		type = 4
[5323.133076][ctx       none]		flags = 1
[5323.133076][ctx       none]		value.type = 1
[5323.133077][ctx       none]		value.value.i = 0x00000010
[5323.133077][ctx       none]	attrib_list[9] =
[5323.133078][ctx       none]		type = 6
[5323.133079][ctx       none]		flags = 3
[5323.133079][ctx       none]		value.type = 1
[5323.133080][ctx       none]		value.value.i = 0x78000005
[5323.133083][ctx       none]=========vaQuerySurfaceAttributes ret = VA_STATUS_SUCCESS, success (no error) 
[5323.133111][ctx       none]==========va_TraceDestroyConfig
[5323.133112][ctx       none]	config = 0x0000042d
[5323.133116][ctx       none]=========vaDestroyConfig ret = VA_STATUS_SUCCESS, success (no error) 
[5323.133118][ctx       none]==========va_TraceCreateConfig
[5323.133119][ctx       none]	profile = 12, VAProfileJPEGBaseline
[5323.133120][ctx       none]	entrypoint = 7, VAEntrypointEncPicture
[5323.133121][ctx       none]	num_attribs = 1
[5323.133122][ctx       none]		attrib_list[0].type = 0x00000000, VAConfigAttribRTFormat
[5323.133123][ctx       none]		attrib_list[0].value = 0x00000001
[5323.133127][ctx       none]=========vaCreateConfig ret = VA_STATUS_SUCCESS, success (no error) 
[5323.133157][ctx       none]==========va_TraceCreateSurfaces
[5323.133158][ctx       none]	width = 3840
[5323.133158][ctx       none]	height = 2160
[5323.133159][ctx       none]	format = 1
[5323.133160][ctx       none]	num_surfaces = 1
[5323.133160][ctx       none]		surfaces[0] = 0x00000000
[5323.133161][ctx       none]	attrib_list[0] =
[5323.133162][ctx       none]		type = 1
[5323.133162][ctx       none]		flags = 2
[5323.133163][ctx       none]		value.type = 1
[5323.133164][ctx       none]		value.value.i = 0x3231564e
[5323.133172][ctx       none]=========vaCreateSurfaces ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134106][ctx 0x20000000]==========va_TraceCreateContext
[5323.134108][ctx 0x20000000]	context = 0x20000000 va_trace_flag 0x1
[5323.134109][ctx 0x20000000]	profile = 12,VAProfileJPEGBaseline entrypoint = 7,VAEntrypointEncPicture
[5323.134110][ctx 0x20000000]	config = 0x0000042d
[5323.134111][ctx 0x20000000]	width = 3840
[5323.134111][ctx 0x20000000]	height = 2160
[5323.134112][ctx 0x20000000]	flag = 0x00000001
[5323.134113][ctx 0x20000000]	num_render_targets = 1
[5323.134114][ctx 0x20000000]		render_targets[0] = 0x00000000
[5323.134117][ctx       none]=========vaCreateContext ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134165][ctx 0x20000000]==========va_TraceCreateBuffer
[5323.134168][ctx 0x20000000]	buf_type=VAEncCodedBufferType
[5323.134169][ctx 0x20000000]	buf_id=0x0
[5323.134169][ctx 0x20000000]	size=33177600
[5323.134170][ctx 0x20000000]	num_elements=1
[5323.134179][ctx       none]=========vaCreateBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134191][ctx       none]=========vaDeriveImage ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134196][ctx       none]=========vaCreateBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134200][ctx       none]=========vaCreateBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134204][ctx       none]=========vaCreateBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.134208][ctx       none]=========vaCreateBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777809][ctx       none]==========va_TraceCreateSurfaces
[5323.777813][ctx       none]	width = 3840
[5323.777813][ctx       none]	height = 2160
[5323.777814][ctx       none]	format = 1
[5323.777815][ctx       none]	num_surfaces = 1
[5323.777815][ctx       none]		surfaces[0] = 0x00000001
[5323.777816][ctx       none]	attrib_list[0] =
[5323.777817][ctx       none]		type = 6
[5323.777817][ctx       none]		flags = 2
[5323.777818][ctx       none]		value.type = 1
[5323.777819][ctx       none]		value.value.i = 0x40000000
[5323.777819][ctx       none]	attrib_list[1] =
[5323.777820][ctx       none]		type = 7
[5323.777820][ctx       none]		flags = 2
[5323.777821][ctx       none]		value.type = 3
[5323.777822][ctx       none]		value.value.p = 0x7ffe7ccf9450
[5323.777822][ctx       none]		--VADRMPRIMESurfaceDescriptor
[5323.777823][ctx       none]		  pixel_format=0x3231564e
[5323.777824][ctx       none]		  width=3840
[5323.777824][ctx       none]		  height=2160
[5323.777825][ctx       none]		  num_objects=0x00000001
[5323.777825][ctx       none]			objects[0].fd=18
[5323.777826][ctx       none]			objects[0].size=12441600
[5323.777827][ctx       none]			objects[0].drm_format_modifier=0
[5323.777828][ctx       none]		  num_layers=1
[5323.777828][ctx       none]			layers[0].drm_format=0x3231564e
[5323.777829][ctx       none]			layers[0].num_planes=0x2
[5323.777830][ctx       none]				layers[0].object_index[0]=0x0
[5323.777831][ctx       none]				layers[0].offset[0]=0x0
[5323.777831][ctx       none]				layers[0].pitch[0]=0x3840
[5323.777832][ctx       none]				layers[0].object_index[1]=0x0
[5323.777833][ctx       none]				layers[0].offset[1]=0x8294400
[5323.777834][ctx       none]				layers[0].pitch[1]=0x3840
[5323.777835][ctx       none]				layers[0].object_index[2]=0x0
[5323.777835][ctx       none]				layers[0].offset[2]=0x0
[5323.777836][ctx       none]				layers[0].pitch[2]=0x0
[5323.777837][ctx       none]				layers[0].object_index[3]=0x0
[5323.777838][ctx       none]				layers[0].offset[3]=0x0
[5323.777838][ctx       none]				layers[0].pitch[3]=0x0
[5323.777855][ctx       none]=========vaCreateSurfaces ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777859][ctx 0x20000000]==========va_TraceBeginPicture
[5323.777859][ctx 0x20000000]	context = 0x20000000
[5323.777860][ctx 0x20000000]	render_targets = 0x00000001
[5323.777861][ctx 0x20000000]	frame_count  = #0
[5323.777869][ctx       none]=========vaBeginPicture ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777871][ctx 0x20000000]==========va_TraceRenderPicture
[5323.777872][ctx 0x20000000]	context = 0x20000000
[5323.777873][ctx 0x20000000]	num_buffers = 4
[5323.777893][ctx       none]=========vaBufferInfo ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777894][ctx 0x20000000]	---------------------------
[5323.777895][ctx 0x20000000]	buffers[0] = 0x00000004
[5323.777896][ctx 0x20000000]	  type = VAEncPictureParameterBufferType
[5323.777897][ctx 0x20000000]	  size = 48
[5323.777898][ctx 0x20000000]	  num_elements = 1
[5323.777902][ctx       none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777903][ctx 0x20000000]	element[0] =
[5323.777906][ctx 0x20000000]	--VAEncPictureParameterBufferJPEG
[5323.777907][ctx 0x20000000]	reconstructed_picture = 0x00000000
[5323.777908][ctx 0x20000000]	coded_buf = 00000000
[5323.777909][ctx 0x20000000]	picture_width = 3840
[5323.777910][ctx 0x20000000]	picture_height = 2160
[5323.777911][ctx 0x20000000]	pic_flags.bits.profile = 0
[5323.777912][ctx 0x20000000]	pic_flags.bits.progressive = 0
[5323.777913][ctx 0x20000000]	pic_flags.bits.huffman = 1
[5323.777913][ctx 0x20000000]	pic_flags.bits.interleaved = 0
[5323.777914][ctx 0x20000000]	pic_flags.bits.differential = 0
[5323.777915][ctx 0x20000000]	sample_bit_depth = 8
[5323.777916][ctx 0x20000000]	num_scan = 1
[5323.777917][ctx 0x20000000]	num_components = 3
[5323.777918][ctx 0x20000000]	component_id[0] = 1
[5323.777919][ctx 0x20000000]	component_id[1] = 2
[5323.777920][ctx 0x20000000]	component_id[2] = 3
[5323.777921][ctx 0x20000000]	quantiser_table_selector[] = 0 1 1 0
[5323.777928][ctx       none]=========vaUnmapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777930][ctx       none]=========vaBufferInfo ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777931][ctx 0x20000000]	---------------------------
[5323.777932][ctx 0x20000000]	buffers[1] = 0x00000002
[5323.777933][ctx 0x20000000]	  type = VAQMatrixBufferType
[5323.777934][ctx 0x20000000]	  size = 152
[5323.777935][ctx 0x20000000]	  num_elements = 1
[5323.777938][ctx       none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.777939][ctx 0x20000000]	element[0] =
[5323.777941][ctx 0x20000000]	--VAQMatrixBufferJPEG
[5323.777942][ctx 0x20000000]	load_lum_quantiser_matrix = 1[5323.777943][ctx 0x20000000]
	[5323.777944][ctx 0x20000000]	0x0e[5323.777945][ctx 0x20000000]	0x09[5323.777946][ctx 0x20000000]	0x09[5323.777947][ctx 0x20000000]	0x0e[5323.777947][ctx 0x20000000]	0x15[5323.777948][ctx 0x20000000]	0x24[5323.777949][ctx 0x20000000]	0x2d[5323.777950][ctx 0x20000000]	0x36[5323.777951][ctx 0x20000000]
	[5323.777952][ctx 0x20000000]	0x0a[5323.777953][ctx 0x20000000]	0x0a[5323.777955][ctx 0x20000000]	0x0c[5323.777957][ctx 0x20000000]	0x11[5323.777957][ctx 0x20000000]	0x17[5323.777958][ctx 0x20000000]	0x34[5323.777959][ctx 0x20000000]	0x36[5323.777959][ctx 0x20000000]	0x31[5323.777960][ctx 0x20000000]
	[5323.777961][ctx 0x20000000]	0x0c[5323.777962][ctx 0x20000000]	0x0b[5323.777963][ctx 0x20000000]	0x0e[5323.777963][ctx 0x20000000]	0x15[5323.777964][ctx 0x20000000]	0x24[5323.777965][ctx 0x20000000]	0x33[5323.777966][ctx 0x20000000]	0x3e[5323.777967][ctx 0x20000000]	0x32[5323.777967][ctx 0x20000000]
	[5323.777967][ctx 0x20000000]	0x0c[5323.777968][ctx 0x20000000]	0x0f[5323.777968][ctx 0x20000000]	0x13[5323.777969][ctx 0x20000000]	0x1a[5323.777969][ctx 0x20000000]	0x2d[5323.777970][ctx 0x20000000]	0x4e[5323.777970][ctx 0x20000000]	0x48[5323.777971][ctx 0x20000000]	0x37[5323.777972][ctx 0x20000000]
	[5323.777972][ctx 0x20000000]	0x10[5323.777973][ctx 0x20000000]	0x13[5323.777974][ctx 0x20000000]	0x21[5323.777975][ctx 0x20000000]	0x32[5323.777976][ctx 0x20000000]	0x3d[5323.777977][ctx 0x20000000]	0x62[5323.777978][ctx 0x20000000]	0x5c[5323.777978][ctx 0x20000000]	0x45[5323.777979][ctx 0x20000000]
	[5323.777980][ctx 0x20000000]	0x15[5323.777981][ctx 0x20000000]	0x1f[5323.777981][ctx 0x20000000]	0x31[5323.777982][ctx 0x20000000]	0x39[5323.777982][ctx 0x20000000]	0x48[5323.777983][ctx 0x20000000]	0x5d[5323.777983][ctx 0x20000000]	0x65[5323.777983][ctx 0x20000000]	0x52[5323.777984][ctx 0x20000000]
	[5323.777984][ctx 0x20000000]	0x2c[5323.777985][ctx 0x20000000]	0x39[5323.777985][ctx 0x20000000]	0x46[5323.777986][ctx 0x20000000]	0x4e[5323.777986][ctx 0x20000000]	0x5c[5323.777987][ctx 0x20000000]	0x6c[5323.777987][ctx 0x20000000]	0x6c[5323.777988][ctx 0x20000000]	0x5a[5323.777988][ctx 0x20000000]
	[5323.777988][ctx 0x20000000]	0x40[5323.777989][ctx 0x20000000]	0x52[5323.777989][ctx 0x20000000]	0x55[5323.777990][ctx 0x20000000]	0x58[5323.777990][ctx 0x20000000]	0x64[5323.777991][ctx 0x20000000]	0x5a[5323.777991][ctx 0x20000000]	0x5c[5323.777992][ctx 0x20000000]	0x59[5323.777993][ctx 0x20000000]
[5323.777993][ctx 0x20000000]	load_chroma_quantiser_matrix = 00000001
[5323.777994][ctx 0x20000000]
	[5323.777994][ctx 0x20000000]	0x0f[5323.777995][ctx 0x20000000]	0x10[5323.777995][ctx 0x20000000]	0x15[5323.777996][ctx 0x20000000]	0x2a[5323.777996][ctx 0x20000000]	0x59[5323.777997][ctx 0x20000000]	0x59[5323.777997][ctx 0x20000000]	0x59[5323.777998][ctx 0x20000000]	0x59[5323.777998][ctx 0x20000000]
	[5323.777999][ctx 0x20000000]	0x10[5323.777999][ctx 0x20000000]	0x12[5323.778000][ctx 0x20000000]	0x17[5323.778000][ctx 0x20000000]	0x3b[5323.778001][ctx 0x20000000]	0x59[5323.778001][ctx 0x20000000]	0x59[5323.778002][ctx 0x20000000]	0x59[5323.778003][ctx 0x20000000]	0x59[5323.778004][ctx 0x20000000]
	[5323.778005][ctx 0x20000000]	0x15[5323.778005][ctx 0x20000000]	0x17[5323.778006][ctx 0x20000000]	0x32[5323.778006][ctx 0x20000000]	0x59[5323.778007][ctx 0x20000000]	0x59[5323.778007][ctx 0x20000000]	0x59[5323.778008][ctx 0x20000000]	0x59[5323.778020][ctx 0x20000000]	0x59[5323.778020][ctx 0x20000000]
	[5323.778021][ctx 0x20000000]	0x2a[5323.778021][ctx 0x20000000]	0x3b[5323.778022][ctx 0x20000000]	0x59[5323.778022][ctx 0x20000000]	0x59[5323.778023][ctx 0x20000000]	0x59[5323.778023][ctx 0x20000000]	0x59[5323.778024][ctx 0x20000000]	0x59[5323.778024][ctx 0x20000000]	0x59[5323.778025][ctx 0x20000000]
	[5323.778025][ctx 0x20000000]	0x59[5323.778026][ctx 0x20000000]	0x59[5323.778026][ctx 0x20000000]	0x59[5323.778027][ctx 0x20000000]	0x59[5323.778028][ctx 0x20000000]	0x59[5323.778028][ctx 0x20000000]	0x59[5323.778029][ctx 0x20000000]	0x59[5323.778029][ctx 0x20000000]	0x59[5323.778030][ctx 0x20000000]
	[5323.778030][ctx 0x20000000]	0x59[5323.778031][ctx 0x20000000]	0x59[5323.778032][ctx 0x20000000]	0x59[5323.778033][ctx 0x20000000]	0x59[5323.778033][ctx 0x20000000]	0x59[5323.778034][ctx 0x20000000]	0x59[5323.778034][ctx 0x20000000]	0x59[5323.778035][ctx 0x20000000]	0x59[5323.778036][ctx 0x20000000]
	[5323.778036][ctx 0x20000000]	0x59[5323.778037][ctx 0x20000000]	0x59[5323.778037][ctx 0x20000000]	0x59[5323.778038][ctx 0x20000000]	0x59[5323.778038][ctx 0x20000000]	0x59[5323.778039][ctx 0x20000000]	0x59[5323.778039][ctx 0x20000000]	0x59[5323.778040][ctx 0x20000000]	0x59[5323.778040][ctx 0x20000000]
	[5323.778040][ctx 0x20000000]	0x59[5323.778041][ctx 0x20000000]	0x59[5323.778041][ctx 0x20000000]	0x59[5323.778042][ctx 0x20000000]	0x59[5323.778042][ctx 0x20000000]	0x59[5323.778043][ctx 0x20000000]	0x59[5323.778043][ctx 0x20000000]	0x59[5323.778044][ctx 0x20000000]	0x59[5323.778044][ctx 0x20000000]
[5323.778059][ctx       none]=========vaUnmapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778061][ctx       none]=========vaBufferInfo ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778062][ctx 0x20000000]	---------------------------
[5323.778062][ctx 0x20000000]	buffers[2] = 0x00000003
[5323.778063][ctx 0x20000000]	  type = VAHuffmanTableBufferType
[5323.778064][ctx 0x20000000]	  size = 436
[5323.778064][ctx 0x20000000]	  num_elements = 1
[5323.778067][ctx       none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778068][ctx 0x20000000]	element[0] =
[5323.778070][ctx 0x20000000]*VAHuffmanTableBufferJPEG
[5323.778071][ctx 0x20000000]	load_huffman_table[0] =1
[5323.778072][ctx 0x20000000]	huffman_table[0] =
[5323.778075][ctx 0x20000000]		num_dc_codes =0 1 5 1 1 1 1 1 1 0 0 0 0 0 0 0 
[5323.778077][ctx 0x20000000]		dc_values =0 1 2 3 4 5 6 7 8 9 10 11 
[5323.778079][ctx 0x20000000]		num_ac_codes =0 2 1 3 3 2 4 3 5 5 4 4 0 0 1 125 
[5323.778102][ctx 0x20000000]		ac_values =1 2 3 0 4 17 5 18 33 49 65 6 19 81 97 7 34 113 20 50 129 145 161 8 35 66 177 193 21 82 209 240 36 51 98 114 130 9 10 22 23 24 25 26 37 38 39 40 41 42 52 53 54 55 56 57 58 67 68 69 70 71 72 73 74 83 84 85 86 87 88 89 90 99 100 101 102 103 104 105 106 115 116 117 118 119 120 121 122 131 132 133 134 135 136 137 138 146 147 148 149 150 151 152 153 154 162 163 164 165 166 167 168 169 170 178 179 180 181 182 183 184 185 186 194 195 196 197 198 199 200 201 202 210 211 212 213 214 215 216 217 218 225 226 227 228 229 230 231 232 233 234 241 242 243 244 245 246 247 248 249 250 
[5323.778103][ctx 0x20000000]		pad =0 0 
[5323.778104][ctx 0x20000000]	load_huffman_table[1] =1
[5323.778104][ctx 0x20000000]	huffman_table[1] =
[5323.778107][ctx 0x20000000]		num_dc_codes =0 3 1 1 1 1 1 1 1 1 1 0 0 0 0 0 
[5323.778110][ctx 0x20000000]		dc_values =0 1 2 3 4 5 6 7 8 9 10 11 
[5323.778112][ctx 0x20000000]		num_ac_codes =0 2 1 2 4 4 3 4 7 5 4 4 0 1 2 119 
[5323.778135][ctx 0x20000000]		ac_values =0 1 2 3 17 4 5 33 49 6 18 65 81 7 97 113 19 34 50 129 8 20 66 145 161 177 193 9 35 51 82 240 21 98 114 209 10 22 36 52 225 37 241 23 24 25 26 38 39 40 41 42 53 54 55 56 57 58 67 68 69 70 71 72 73 74 83 84 85 86 87 88 89 90 99 100 101 102 103 104 105 106 115 116 117 118 119 120 121 122 130 131 132 133 134 135 136 137 138 146 147 148 149 150 151 152 153 154 162 163 164 165 166 167 168 169 170 178 179 180 181 182 183 184 185 186 194 195 196 197 198 199 200 201 202 210 211 212 213 214 215 216 217 218 226 227 228 229 230 231 232 233 234 242 243 244 245 246 247 248 249 250 
[5323.778136][ctx 0x20000000]		pad =0 0 
[5323.778138][ctx       none]=========vaUnmapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778141][ctx       none]=========vaBufferInfo ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778142][ctx 0x20000000]	---------------------------
[5323.778143][ctx 0x20000000]	buffers[3] = 0x00000005
[5323.778144][ctx 0x20000000]	  type = VAEncSliceParameterBufferType
[5323.778145][ctx 0x20000000]	  size = 32
[5323.778145][ctx 0x20000000]	  num_elements = 1
[5323.778148][ctx       none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778149][ctx 0x20000000]	element[0] =
[5323.778151][ctx 0x20000000]	--VAEncSliceParameterBufferJPEG
[5323.778152][ctx 0x20000000]	restart_interval = 0x0000
[5323.778153][ctx 0x20000000]	num_components = 0x00000003
[5323.778154][ctx 0x20000000]	components[0] =
[5323.778154][ctx 0x20000000]		component_selector = 1
[5323.778155][ctx 0x20000000]		dc_table_selector = 0
[5323.778156][ctx 0x20000000]		ac_table_selector = 0
[5323.778157][ctx 0x20000000]	components[1] =
[5323.778158][ctx 0x20000000]		component_selector = 2
[5323.778158][ctx 0x20000000]		dc_table_selector = 1
[5323.778159][ctx 0x20000000]		ac_table_selector = 1
[5323.778160][ctx 0x20000000]	components[2] =
[5323.778161][ctx 0x20000000]		component_selector = 3
[5323.778161][ctx 0x20000000]		dc_table_selector = 1
[5323.778162][ctx 0x20000000]		ac_table_selector = 1
[5323.778163][ctx 0x20000000]	components[3] =
[5323.778164][ctx 0x20000000]		component_selector = 0
[5323.778175][ctx 0x20000000]		dc_table_selector = 0
[5323.778176][ctx 0x20000000]		ac_table_selector = 0
[5323.778182][ctx       none]=========vaUnmapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778198][ctx       none]=========vaRenderPicture ret = VA_STATUS_SUCCESS, success (no error) 
[5323.778233][ctx 0x20000000]==========va_TraceEndPicture
[5323.778234][ctx 0x20000000]	context = 0x20000000
[5323.778235][ctx 0x20000000]	render_targets = 0x00000001
[5323.783152][ctx       none]=========vaEndPicture ret = VA_STATUS_SUCCESS, success (no error) 
[5323.787963][ctx       none]==========va_TraceSyncSurface
[5323.787969][ctx       none]	render_target = 0x00000001
[5323.787993][ctx       none]=========vaSyncSurface ret = VA_STATUS_SUCCESS, success (no error) 
[5323.788051][ctx       none]=========vaMapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.788561][ctx       none]=========vaUnmapBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5323.788564][ctx       none]==========va_TraceDestroySurfaces
[5323.788565][ctx       none]		surfaces[0] = 0x00000001
[5323.788583][ctx       none]=========vaDestroySurfaces ret = VA_STATUS_SUCCESS, success (no error) 
[5332.696581][ctx       none]=========vaDestroyBuffer ret = VA_STATUS_SUCCESS, success (no error) 
[5332.697336][ctx       none]=========vaDestroyContext ret = VA_STATUS_SUCCESS, success (no error) 
[5332.697372][ctx       none]==========va_TraceDestroySurfaces
[5332.697374][ctx       none]		surfaces[0] = 0x00000000
[5332.697446][ctx       none]=========vaDestroySurfaces ret = VA_STATUS_SUCCESS, success (no error) 
[5332.697486][ctx       none]==========va_TraceDestroyConfig
[5332.697488][ctx       none]	config = 0x0000042d
[5332.697515][ctx       none]=========vaDestroyConfig ret = VA_STATUS_SUCCESS, success (no error) 
[5332.701098][ctx       none]==========va_TraceTerminate
[5332.701141][ctx       none]=========vaTerminate ret = VA_STATUS_SUCCESS, success (no error)

Encoded without dmabuf import (CORRECT) Image

Encoded with dmabuf import (Corrupt) Image

polhaghverdian avatar Apr 29 '25 18:04 polhaghverdian