Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 917591 | Differences between
and this patch

Collapse All | Expand All

(-)a/common/param.cpp (+6 lines)
Lines 378-383 void x265_param_default(x265_param* param) Link Here
378
    param->preferredTransferCharacteristics = -1;
378
    param->preferredTransferCharacteristics = -1;
379
    param->pictureStructure = -1;
379
    param->pictureStructure = -1;
380
    param->bEmitCLL = 1;
380
    param->bEmitCLL = 1;
381
    param->bEmitAmbientViewingEnvironment = 0;
381
382
382
    param->bEnableFrameDuplication = 0;
383
    param->bEnableFrameDuplication = 0;
383
    param->dupThreshold = 70;
384
    param->dupThreshold = 70;
Lines 1880-1885 int x265_check_params(x265_param* param) Link Here
1880
                     || param->bEmitIDRRecoverySEI
1881
                     || param->bEmitIDRRecoverySEI
1881
                   || !!param->interlaceMode
1882
                   || !!param->interlaceMode
1882
                     || param->preferredTransferCharacteristics > 1
1883
                     || param->preferredTransferCharacteristics > 1
1884
                     || param->bEmitAmbientViewingEnvironment
1883
                     || param->toneMapFile
1885
                     || param->toneMapFile
1884
                     || param->naluFile);
1886
                     || param->naluFile);
1885
1887
Lines 2766-2771 void x265_copy_params(x265_param* dst, x265_param* src) Link Here
2766
    dst->bEmitCLL = src->bEmitCLL;
2768
    dst->bEmitCLL = src->bEmitCLL;
2767
    dst->maxCLL = src->maxCLL;
2769
    dst->maxCLL = src->maxCLL;
2768
    dst->maxFALL = src->maxFALL;
2770
    dst->maxFALL = src->maxFALL;
2771
    dst->ambientIlluminance = src->ambientIlluminance;
2772
    dst->ambientLightX = src->ambientLightX;
2773
    dst->ambientLightY = src->ambientLightY;
2774
    dst->bEmitAmbientViewingEnvironment = src->bEmitAmbientViewingEnvironment;
2769
    dst->log2MaxPocLsb = src->log2MaxPocLsb;
2775
    dst->log2MaxPocLsb = src->log2MaxPocLsb;
2770
    dst->bEmitVUIHRDInfo = src->bEmitVUIHRDInfo;
2776
    dst->bEmitVUIHRDInfo = src->bEmitVUIHRDInfo;
2771
    dst->bEmitVUITimingInfo = src->bEmitVUITimingInfo;
2777
    dst->bEmitVUITimingInfo = src->bEmitVUITimingInfo;
(-)a/encoder/encoder.cpp (+9 lines)
Lines 3276-3281 void Encoder::getStreamHeaders(NALList& list, Entropy& sbacCoder, Bitstream& bs) Link Here
3276
        }
3276
        }
3277
    }
3277
    }
3278
3278
3279
    if (m_param->bEmitAmbientViewingEnvironment)
3280
    {
3281
        SEIAmbientViewingEnvironment ambientsei;
3282
        ambientsei.ambientIlluminance = m_param->ambientIlluminance;
3283
        ambientsei.ambientLightX = m_param->ambientLightX;
3284
        ambientsei.ambientLightY = m_param->ambientLightY;
3285
        ambientsei.writeSEImessages(bs, m_sps, NAL_UNIT_PREFIX_SEI, list, m_param->bSingleSeiNal);
3286
    }
3287
3279
    if (m_param->bEmitInfoSEI)
3288
    if (m_param->bEmitInfoSEI)
3280
    {
3289
    {
3281
        char *opts = x265_param2string(m_param, m_sps.conformanceWindow.rightOffset, m_sps.conformanceWindow.bottomOffset);
3290
        char *opts = x265_param2string(m_param, m_sps.conformanceWindow.rightOffset, m_sps.conformanceWindow.bottomOffset);
(-)a/encoder/sei.h (+19 lines)
Lines 242-247 public: Link Here
242
    }
242
    }
243
};
243
};
244
244
245
class SEIAmbientViewingEnvironment : public SEI
246
{
247
public:
248
    SEIAmbientViewingEnvironment()
249
    {
250
        m_payloadType = AMBIENT_VIEWING_ENVIRONMENT;
251
        m_payloadSize = 8;
252
    }
253
    uint32_t ambientIlluminance;
254
    uint16_t ambientLightX;
255
    uint16_t ambientLightY;
256
    void writeSEI(const SPS&)
257
    {
258
        WRITE_CODE(ambientIlluminance, 32, "ambient_illuminance");
259
        WRITE_CODE(ambientLightX,      16, "ambient_light_x");
260
        WRITE_CODE(ambientLightY,      16, "ambient_light_y");
261
    }
262
};
263
245
class SEIDecodedPictureHash : public SEI
264
class SEIDecodedPictureHash : public SEI
246
{
265
{
247
public:
266
public:
(-)a/x265.h (+9 lines)
Lines 371-376 typedef enum Link Here
371
    MASTERING_DISPLAY_INFO               = 137,
371
    MASTERING_DISPLAY_INFO               = 137,
372
    CONTENT_LIGHT_LEVEL_INFO             = 144,
372
    CONTENT_LIGHT_LEVEL_INFO             = 144,
373
    ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
373
    ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
374
    AMBIENT_VIEWING_ENVIRONMENT          = 148,
374
} SEIPayloadType;
375
} SEIPayloadType;
375
376
376
typedef struct x265_sei_payload
377
typedef struct x265_sei_payload
Lines 1903-1908 typedef struct x265_param Link Here
1903
     * value to that value. */
1904
     * value to that value. */
1904
    uint16_t maxLuma;
1905
    uint16_t maxLuma;
1905
1906
1907
    /* ISO/IEC 23008-2:2017, D.2.39 ambient viewing environment SEI message */
1908
    uint32_t ambientIlluminance;
1909
    uint16_t ambientLightX;
1910
    uint16_t ambientLightY;
1911
1906
    /* Maximum of the picture order count */
1912
    /* Maximum of the picture order count */
1907
    int log2MaxPocLsb;
1913
    int log2MaxPocLsb;
1908
1914
Lines 2114-2119 typedef struct x265_param Link Here
2114
    /*Emit content light level info SEI*/
2120
    /*Emit content light level info SEI*/
2115
    int         bEmitCLL;
2121
    int         bEmitCLL;
2116
2122
2123
    /* Emit ambient viewing environment SEI */
2124
    int         bEmitAmbientViewingEnvironment;
2125
2117
    /*
2126
    /*
2118
    * Signals picture structure SEI timing message for every frame
2127
    * Signals picture structure SEI timing message for every frame
2119
    * picture structure 7 is signalled for frame doubling
2128
    * picture structure 7 is signalled for frame doubling

Return to bug 917591