Skip to content

Commit f97db2a

Browse files
committed
Syncing plugins with DEE v3.2 release.
1 parent a893e14 commit f97db2a

File tree

9 files changed

+39
-23
lines changed

9 files changed

+39
-23
lines changed

plugins/code/common/GenericPlugin/GenericPlugin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
class GenericPlugin {
4141
public:
4242
GenericPlugin();
43+
virtual ~GenericPlugin() {}
4344

4445
virtual Status setProperty(const Property* property);
4546
const char* getMessage();

plugins/code/hevc_enc/ffmpeg/examples/example_profile_5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<append_frames>0</append_frames> <!-- integer -->
2828
<target_width>0</target_width> <!-- integer list -->
2929
<target_height>0</target_height> <!-- integer list -->
30-
<max_scene_frames>240</max_scene_frames> <!-- integer: from 1 to 256 -->
30+
<max_scene_frames>240</max_scene_frames> <!-- integer: from 12 to 256 -->
3131
<preprocessing_mode>optimized</preprocessing_mode> <!-- One of: optimized, standard -->
3232
<data_rate>16000</data_rate> <!-- integer list -->
3333
<max_vbv_data_rate>16000</max_vbv_data_rate> <!-- integer list -->
@@ -53,7 +53,7 @@
5353
</scaling>
5454
<noise>
5555
<base>
56-
<strength>0</strength> <!-- integer: from 0 to 0 -->
56+
<strength>0</strength> <!-- fixed value -->
5757
</base>
5858
</noise>
5959
<hevc_enc>

plugins/code/hevc_enc/ffmpeg/examples/example_profile_8_1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</scaling>
5858
<noise>
5959
<base>
60-
<strength>0</strength> <!-- integer: from 0 to 0 -->
60+
<strength>0</strength> <!-- fixed value -->
6161
</base>
6262
</noise>
6363
<hevc_enc>

plugins/code/hevc_enc/ffmpeg/src/hevc_enc_ffmpeg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ ffmpeg_process
324324
return STATUS_ERROR;
325325
}
326326

327-
for (int i = 0; i < 3; i++)
327+
for (int j = 0; j < 3; j++)
328328
{
329329
bool plane_written_flag = false;
330330
size_t plane_data_written = 0;
@@ -333,7 +333,7 @@ ffmpeg_process
333333
if (state->data->ffmpeg_ret_code != 0) break;
334334

335335
size_t bytes_written = 0;
336-
status = state->data->piping_mgr.writeToPipe(state->data->in_pipe_id, (void*)((char*)current_pic.plane[i] + plane_data_written), plane_size[i] - plane_data_written, bytes_written);
336+
status = state->data->piping_mgr.writeToPipe(state->data->in_pipe_id, (void*)((char*)current_pic.plane[j] + plane_data_written), plane_size[j] - plane_data_written, bytes_written);
337337
plane_data_written += bytes_written;
338338
if (status != PIPE_MGR_OK)
339339
{
@@ -342,7 +342,7 @@ ffmpeg_process
342342
return STATUS_ERROR;
343343
}
344344

345-
if (plane_data_written == plane_size[i])
345+
if (plane_data_written == plane_size[j])
346346
plane_written_flag = true;
347347

348348
if (bytes_written == 0)

plugins/code/hevc_enc/x265/examples/example_profile_5.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<append_frames>0</append_frames> <!-- integer -->
2828
<target_width>0</target_width> <!-- integer list -->
2929
<target_height>0</target_height> <!-- integer list -->
30-
<max_scene_frames>240</max_scene_frames> <!-- integer: from 1 to 256 -->
30+
<max_scene_frames>240</max_scene_frames> <!-- integer: from 12 to 256 -->
3131
<preprocessing_mode>optimized</preprocessing_mode> <!-- One of: optimized, standard -->
3232
<data_rate>16000</data_rate> <!-- integer list -->
3333
<max_vbv_data_rate>16000</max_vbv_data_rate> <!-- integer list -->
@@ -53,7 +53,7 @@
5353
</scaling>
5454
<noise>
5555
<base>
56-
<strength>0</strength> <!-- integer: from 0 to 0 -->
56+
<strength>0</strength> <!-- fixed value -->
5757
</base>
5858
</noise>
5959
<hevc_enc>

plugins/code/hevc_enc/x265/examples/example_profile_8_1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</scaling>
5858
<noise>
5959
<base>
60-
<strength>0</strength> <!-- integer: from 0 to 0 -->
60+
<strength>0</strength> <!-- fixed value -->
6161
</base>
6262
</noise>
6363
<hevc_enc>

plugins/code/hevc_enc/x265/src/hevc_enc_x265.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ x265_close
347347
if (state->lib_initialized)
348348
{
349349
state->api->encoder_close(state->encoder);
350+
state->api->cleanup();
350351
state->lib_initialized = false;
351352
}
352353

@@ -377,19 +378,19 @@ x265_process
377378
hevc_enc_x265_t* state = (hevc_enc_x265_t*)handle;
378379

379380
x265_nal *p_nal;
380-
uint32_t nal;
381+
uint32_t nal_count = 0;
381382

382383
if (state->data->pending_header && !state->param->bRepeatHeaders)
383384
{
384385
state->data->pending_header = false;
385-
if (state->api->encoder_headers(state->encoder, &p_nal, &nal) < 0)
386+
if (state->api->encoder_headers(state->encoder, &p_nal, &nal_count) < 0)
386387
{
387388
state->data->msg = "Failure generating stream headers.";
388389
return STATUS_ERROR;
389390
}
390-
if (nal)
391+
if (nal_count)
391392
{
392-
for (int j = 0; j < (int)nal; j++)
393+
for (uint32_t j = 0; j < nal_count; j++)
393394
{
394395
nalu_t nalu;
395396
nalu.type = cast_nal_type(p_nal[j].type);
@@ -447,13 +448,13 @@ x265_process
447448
if (true == state->data->uhd_bd)
448449
input_picture.sliceType = X265_TYPE_B;
449450

450-
int num_encoded = state->api->encoder_encode(state->encoder, &p_nal, &nal, &input_picture, NULL);
451+
int num_encoded = state->api->encoder_encode(state->encoder, &p_nal, &nal_count, &input_picture, NULL);
451452
if (num_encoded < 0)
452453
{
453454
state->data->msg = "encoder_encode() failed.";
454455
return STATUS_ERROR;
455456
}
456-
for (uint32_t j = 0; j < nal; j++)
457+
for (uint32_t j = 0; j < nal_count; j++)
457458
{
458459
nalu_t nalu;
459460
nalu.type = cast_nal_type(p_nal[j].type);
@@ -502,8 +503,8 @@ x265_flush
502503
}
503504

504505
x265_nal *p_nal;
505-
uint32_t nal;
506-
int num_encoded = state->api->encoder_encode(state->encoder, &p_nal, &nal, NULL, NULL);
506+
uint32_t nal_count = 0;
507+
int num_encoded = state->api->encoder_encode(state->encoder, &p_nal, &nal_count, NULL, NULL);
507508

508509
if (num_encoded < 0)
509510
{
@@ -518,7 +519,7 @@ x265_flush
518519
return STATUS_OK;
519520
}
520521

521-
for (uint32_t j = 0; j < nal; j++)
522+
for (uint32_t j = 0; j < nal_count; j++)
522523
{
523524
nalu_t nalu;
524525
nalu.type = cast_nal_type(p_nal[j].type);

plugins/code/hevc_enc/x265/src/hevc_enc_x265_utils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -820,18 +820,18 @@ parse_init_params
820820
else if ("param" == name)
821821
{
822822
auto items = split_string(value, ':');
823-
for (auto i : items)
823+
for (auto item : items)
824824
{
825825
std::string param_name, param_value;
826-
std::size_t found = i.find("=");
826+
std::size_t found = item.find("=");
827827
if (found == std::string::npos)
828828
{
829-
param_name = i;
829+
param_name = item;
830830
}
831831
else
832832
{
833-
param_name = i.substr(0, found);
834-
param_value = i.substr(found+1);
833+
param_name = item.substr(0, found);
834+
param_value = item.substr(found+1);
835835
std::replace(param_value.begin(), param_value.end(), ';', ':');
836836
}
837837
state->data->internal_params.push_back({param_name, param_value});

plugins/code/j2k_dec/kakadu/src/j2k_dec_kakadu.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
#include <cstdio>
3939
#include <string>
4040

41+
#ifdef _WIN32
42+
#pragma warning(push, 0)
43+
#else
44+
#pragma GCC diagnostic push
45+
#pragma GCC diagnostic ignored "-Wunused-parameter"
46+
#endif
47+
4148
// Kakadu core includes
4249
#include "kdu_elementary.h"
4350
#include "kdu_messaging.h"
@@ -46,6 +53,13 @@
4653
#include "kdu_sample_processing.h"
4754
// Kakadu support includes
4855
#include "kdu_stripe_decompressor.h"
56+
57+
#ifdef _WIN32
58+
#pragma warning(pop)
59+
#else
60+
#pragma GCC diagnostic pop
61+
#endif
62+
4963
#include "j2k_dec_kakadu.h"
5064

5165
using namespace kdu_supp;

0 commit comments

Comments
 (0)