Fix warnings
This commit is contained in:
parent
832a2dc19e
commit
fafbfb21e4
3 changed files with 15 additions and 12 deletions
|
@ -255,9 +255,9 @@ void $F(T &t, const Ts&... ts) // fills all SetterVal's member pointers with it'
|
|||
else
|
||||
t.*arg.member.func(Twrap<T>{}) = (ClearValType(t.*arg.member.func(Twrap<T>{})))(arg.val);
|
||||
};
|
||||
(void)filler; // gcc false unused warning
|
||||
(filler(t,ts),...);
|
||||
}
|
||||
|
||||
// wrapper for inline constructors with FillStructure
|
||||
template <typename T, typename... Ts>
|
||||
T $M(T t, const Ts&... ts)
|
||||
|
|
|
@ -119,7 +119,7 @@ struct PackedVPSHEVC : BaseBitstreamHEVC
|
|||
{
|
||||
NalStartCodePrefix(NALU_VPS);
|
||||
NalHeader(NALU_VPS);
|
||||
uint32_t i = 0;
|
||||
//uint32_t i = 0;
|
||||
PutUI(0, 4); // vps.vps_video_parameter_set_id
|
||||
PutUI(3, 2); //vps_reserved_three_2bits
|
||||
//vps_base_layer_internal_flag:1
|
||||
|
@ -179,7 +179,7 @@ struct PackedSPSHEVC : BaseBitstreamHEVC
|
|||
{
|
||||
NalStartCodePrefix(NALU_SPS);
|
||||
NalHeader(NALU_SPS);
|
||||
uint32_t i = 0;
|
||||
//uint32_t i = 0;
|
||||
PutUI(0, 4); // sps.sps_video_parameter_set_id
|
||||
PutUI(0, 3); // sps.sps_max_sub_layers_minus1
|
||||
PutUI(TEMPORAL_ID_NESTING, 1); // sps.sps_temporal_id_nesting_flag
|
||||
|
@ -408,7 +408,7 @@ struct PackedSliceHEVC : BaseBitstreamHEVC
|
|||
{
|
||||
uint8_t nal_unit_type = NALU_TRAIL_R;
|
||||
//int gop_ref_distance = ip_period;
|
||||
int i = 0;
|
||||
//int i = 0;
|
||||
//int short_term_ref_pic_set_sps_flag = 1; // !is_idr;
|
||||
int slice_qp_delta = slice->slice_qp_delta;
|
||||
int pic_order_cnt_lsb = framenum;
|
||||
|
@ -650,12 +650,12 @@ struct VaapiEncoderHEVC: VaapiEncoder
|
|||
VAEncSliceParameterBufferHEVC slice;
|
||||
void InitParameters(bool p010)
|
||||
{
|
||||
int width_in_mbs, height_in_mbs;
|
||||
int frame_cropping_flag = 0;
|
||||
int frame_crop_bottom_offset = 0;
|
||||
//int width_in_mbs, height_in_mbs;
|
||||
//int frame_cropping_flag = 0;
|
||||
//int frame_crop_bottom_offset = 0;
|
||||
|
||||
width_in_mbs = (width + 15) / 16;
|
||||
height_in_mbs = (height + 15) / 16;
|
||||
//width_in_mbs = (width + 15) / 16;
|
||||
//height_in_mbs = (height + 15) / 16;
|
||||
|
||||
// sps
|
||||
// seems work
|
||||
|
@ -839,6 +839,8 @@ struct VaapiEncoderHEVC: VaapiEncoder
|
|||
vaRenderPicture(dpy, ctx, buffers, sizeof(buffers) / sizeof(buffers[0]) );
|
||||
|
||||
status = vaEndPicture(dpy, ctx);
|
||||
if(status != VA_STATUS_SUCCESS)
|
||||
abort();
|
||||
w.WriteOutput(output, id);
|
||||
for(int i = 0; i < sizeof(buffers) / sizeof(buffers[0]); i++)
|
||||
vaDestroyBuffer(dpy, buffers[i]);
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#ifndef VULKAN_UTL_H
|
||||
#define VULKAN_UTL_H
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -46,7 +45,9 @@
|
|||
} \
|
||||
}
|
||||
#endif
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
||||
#endif
|
||||
struct VulkanContext
|
||||
{
|
||||
VkInstance instance = NULL;
|
||||
|
@ -356,7 +357,7 @@ struct VulkanDevice
|
|||
for(int i = 0; i < formatList.drmFormatModifierCount; i++)
|
||||
{
|
||||
modifiers2[count++] = modifiers[i].drmFormatModifier;
|
||||
printf("mod %llx %d %d\n", modifiers[i].drmFormatModifier, modifiers[i].drmFormatModifierPlaneCount, (int)modifiers[i].drmFormatModifierTilingFeatures);
|
||||
printf("mod %llx %d %d\n", (unsigned long long)modifiers[i].drmFormatModifier, modifiers[i].drmFormatModifierPlaneCount, (int)modifiers[i].drmFormatModifierTilingFeatures);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
@ -490,7 +491,7 @@ struct VulkanDevice
|
|||
VkCommandPoolCreateFlags createFlags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
|
||||
|
||||
VkCommandPoolCreateInfo cmdPoolInfo = {VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO};
|
||||
cmdPoolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
|
||||
cmdPoolInfo.flags = createFlags;
|
||||
cmdPoolInfo.queueFamilyIndex = defaultFamilyIndex;
|
||||
|
||||
VkCommandPool cmdPool;
|
||||
|
|
Loading…
Reference in a new issue