What would happen if our skin could adapt to outside conditions flexibly, autonomously, and according to the location?
This Interior Design&Lifestyle Trend 2017 talks about research, innovation and new technologies.
As I wrote in our newsletter and getting a bit more personal about what I think about likable trends, when visiting the Off-Salone back in April, I found several examples of how intriguing the SKIN theme is to many designers.
At Material Futures (Central Saint Martin's, London) they encourage their students to a multi-disciplinary approach to design taking materiality as the starting point of the design process. The most advanced (and probably controversial) projects are always showcased at their group exhibition in Milan. This year what stroke me most was a project by Tina Gorjanc where cells from human hair were transformed thanks to biotechnology into speculative commercial leather products. All existing legislation dealing with biotechnology today is united under the Human Tissue Act, which only addresses the handling of bodily materials for medical purposes. The question is for how long?
I read somewhere that in 2070 most of the designs are not done in design studios anymore but are most likely to be developed in laboratories. And I truly believe that will even happen sooner. The fact we talk about SKIN may attract curiosity or be the total opposite.
Going back to our trend, let's concentrate on Interior Design for now and see a few designers and artists who are immersed in the topic. It is a very interesting approach of how we want to feel in our skin, how our skin has to adapt to our environment and how to translate these questions into textiles, art and furniture.
Andrea runs a design company specialising in textile, material and surface design with various applications. The textile collections are an exploration of different materials that include faux fur, rubbers, leather and veneers on a variety of base fabrics. The fabrics are versatile, made to fit pattern garments for fashion design to being wrapped around the body as accessories. Similar range of fabrics is available for soft furnishings & upholstery which makes it a perfect fit for our Interior Design approach.
Natsai Audrey's project Voluntary Mutations explores the aesthetic possibilities of a subculture derived from an environment where D.I.Y stem cell biology becomes a not too far possibility. The hybrid approach of practice between science, technology, philosophy and craft is grounded in aesthetic sensibilities and inherent codes of textile design. If you start investigating textile design, that is a very common factor today.
The properties of the material are programmed according to the local requirements of the object thanks to future additive manufacturing technology. The human skin represents the inspiration for this chair project. From a biological point of view, it is non-homogenous, it is organic and it adapts according to the form of the body and functionality. The outcome is a chair unique in its shape, high level of comfort and a rather attention-drawing design.
Crocheted membrane is a self-initiated project by Sonja Bäumel translating scientific data into crochet pieces representing a design language in-between science and fashion design.
Megan Mitchell depicts in her Beautiful Human Decay project different types of decay and human insecurities in the most creative and interestingly beautiful ways. The result is an aesthetically beautiful series of photographs that feature a collection of intricate work of beads, fabric and buttons to create the impression of human limbs and nature in decay on people's arms, kneecaps or calves.
British designer Gigi Barker created the handmade 'skin stool' and 'skin chair' to recreate the sensation of sitting on a naked body. 'A body of skin' by studio 9191 is a furniture collection that explores the intricate subtleties and varieties of the skin surface and the volumes of the flesh.The structure is accompanied by leather applied through classic upholstery techniques such pattern cutting, buttoning, and moulding that provide a potential familiarity and thus more subtle visual impact.
Lucy is a British contemporary artist who specializes in sculptures and installation pieces. What I really find interesting about her installation Skins 2 is the fact that they are no longer in a form that we recognize as human but we still see it to be 'human', which most probable has to do with the color of the material, too. I thought it was genius and could lead to much dialogue.
Simon's approach can best be described as a type of Design Archaeology; a combination of historical research and hands-on material experimentation. He was asked to reinterpret Jean-Marie Massaud's Archibald chair in a commission by Poltrona Frau and Wallpaper* magazine for its inaugural Handmade issue. Stripping back the generous layers of upholstery to reveal the unseen skeleton hidden within, Hasan made a new structural skin from boiled leather.
She considers herself as a visual storyteller, textile designer and material explorer and her work invites to touch and feel. She often creates unknown and surrealistic atmospheres and make them become tangible. The result of her work is usually a material or product applied for interior or fashion. I discovered her at the Off-Salone and was truly fascinated by her work.
Skin, a piece Sarah has been working on, on and off, for nine years (!!) is a life size woman's skin made from approximately 400,000 tiny glass beads and nylon thread; it hangs from the ceiling like a garment on molded acrylic shoulders. It was incredibly labor intensive to make as each bead could only be added one at a time. You should check the final page on her site.
Biomimcs 2016/17 – An Innovative Interior Design Trend To Watch!


Attendance Tracker – Save on time and money. Reduce waste and go green!
Sign-in sheets are history! Put attendance records directly in EthosCE and save yourself a huge headache.
Integrate with existing key cards, bar codes or other systems.
Manually add or remove attendance.
Use unique codes per event to prevent cheating.
Import records from external meeting vendors such as Cvent or WebEx.
Take your LMS on-site. Your attendees evaluate sessions and earn credit in real time.
Track your on-site education with EthosCE meeting management tools.
Register users for meetings in your LMS.
Collect evaluations, record attendance and award certificates.
Integration with meeting management vendors.
Award credit for each session or for the entire meeting in one easy process.
Share your lecture or meeting with the world.
Our webcasting team will come onsite or use the phone to record your presentations and lectures.
Experienced, professional onsite team will put you at ease.
Web player displays audio or video with slides.
Easily turns a lecture into an e-learning activity.


text:
/**
 * \file va_vpp.h
 * \brief The video processing API
 *
 * This file contains the \ref api_vpp "Video processing API".
 */

#ifndef VA_VPP_H
#define VA_VPP_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * \defgroup api_vpp Video processing API
 *
 * @{
 *
 * The video processing API uses the same paradigm as for decoding:
 * - Query for supported filters;
 * - Set up a video processing pipeline;
 * - Send video processing parameters through VA buffers.
 *
 * \section api_vpp_caps Query for supported filters
 *
 * Checking whether video processing is supported can be performed
 * with vaQueryConfigEntrypoints() and the profile argument set to
 * #VAProfileNone. If video processing is supported, then the list of
 * returned entry-points will include #VAEntrypointVideoProc.
 *
 * \code
 * VAEntrypoint *entrypoints;
 * int i, num_entrypoints, supportsVideoProcessing = 0;
 *
 * num_entrypoints = vaMaxNumEntrypoints();
 * entrypoints = malloc(num_entrypoints * sizeof(entrypoints[0]);
 * vaQueryConfigEntrypoints(va_dpy, VAProfileNone,
 *     entrypoints, &num_entrypoints);
 *
 * for (i = 0; !supportsVideoProcessing && i < num_entrypoints; i++) {
 *     if (entrypoints[i] == VAEntrypointVideoProc)
 *         supportsVideoProcessing = 1;
 * }
 * \endcode
 *
 * Then, the vaQueryVideoProcFilters() function is used to query the
 * list of video processing filters.
 *
 * \code
 * VAProcFilterType filters[VAProcFilterCount];
 * unsigned int num_filters = VAProcFilterCount;
 *
 * // num_filters shall be initialized to the length of the array
 * vaQueryVideoProcFilters(va_dpy, vpp_ctx, &filters, &num_filters);
 * \endcode
 *
 * Finally, individual filter capabilities can be checked with
 * vaQueryVideoProcFilterCaps().
 *
 * \code
 * VAProcFilterCap denoise_caps;
 * unsigned int num_denoise_caps = 1;
 * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
 *     VAProcFilterNoiseReduction,
 *     &denoise_caps, &num_denoise_caps
 * );
 *
 * VAProcFilterCapDeinterlacing deinterlacing_caps[VAProcDeinterlacingCount];
 * unsigned int num_deinterlacing_caps = VAProcDeinterlacingCount;
 * vaQueryVideoProcFilterCaps(va_dpy, vpp_ctx,
 *     VAProcFilterDeinterlacing,
 *     &deinterlacing_caps, &num_deinterlacing_caps
 * );
 * \endcode
 *
 * \section api_vpp_setup Set up a video processing pipeline
 *
 * A video processing pipeline buffer is created for each source
 * surface we want to process. However, buffers holding filter
 * parameters can be created once and for all. Rationale is to avoid
 * multiple creation/destruction chains of filter buffers and also
 * because filter parameters generally won't change frame after
 * frame. e.g. this makes it possible to implement a checkerboard of
 * videos where the same filters are applied to each video source.
 *
 * The general control flow is demonstrated by the following pseudo-code:
 * \code
 * // Create filters
 * VABufferID denoise_filter, deint_filter;
 * VABufferID filter_bufs[VAProcFilterCount];
 * unsigned int num_filter_bufs;
 *
 * for (i = 0; i < num_filters; i++) {
 *     switch (filters[i]) {
 *     case VAProcFilterNoiseReduction: {       // Noise reduction filter
 *         VAProcFilterParameterBuffer denoise;
 *         denoise.type  = VAProcFilterNoiseReduction;
 *         denoise.value = 0.5;
 *         vaCreateBuffer(va_dpy, vpp_ctx,
 *             VAProcFilterParameterBufferType, sizeof(denoise), 1,
 *             &denoise, &denoise_filter
 *         );
 *         filter_bufs[num_filter_bufs++] = denoise_filter;
 *         break;
 *     }
 *
 *     case VAProcFilterDeinterlacing:          // Motion-adaptive deinterlacing
 *         for (j = 0; j < num_deinterlacing_caps; j++) {
 *             VAProcFilterCapDeinterlacing * const cap = &deinterlacing_caps[j];
 *             if (cap->type != VAProcDeinterlacingMotionAdaptive)
 *                 continue;
 *
 *             VAProcFilterParameterBufferDeinterlacing deint;
 *             deint.type                   = VAProcFilterDeinterlacing;
 *             deint.algorithm              = VAProcDeinterlacingMotionAdaptive;
 *             vaCreateBuffer(va_dpy, vpp_ctx,
 *                 VAProcFilterParameterBufferType, sizeof(deint), 1,
 *                 &deint, &deint_filter
 *             );
 *             filter_bufs[num_filter_bufs++] = deint_filter;
 *         }
 *     }
 * }
 * \endcode
 *
 * Once the video processing pipeline is set up, the caller shall check the
 * implied capabilities and requirements with vaQueryVideoProcPipelineCaps().
 * This function can be used to validate the number of reference frames are
 * needed by the specified deinterlacing algorithm, the supported color
 * primaries, etc.
 * \code
 * // Create filters
 * VAProcPipelineCaps pipeline_caps;
 * VASurfaceID *forward_references;
 * unsigned int num_forward_references;
 * VASurfaceID *backward_references;
 * unsigned int num_backward_references;
 * VAProcColorStandardType in_color_standards[VAProcColorStandardCount];
 * VAProcColorStandardType out_color_standards[VAProcColorStandardCount];
 *
 * pipeline_caps.input_color_standards      = NULL;
 * pipeline_caps.num_input_color_standards  = ARRAY_ELEMS(in_color_standards);
 * pipeline_caps.output_color_standards     = NULL;
 * pipeline_caps.num_output_color_standards = ARRAY_ELEMS(out_color_standards);
 * vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx,
 *     filter_bufs, num_filter_bufs,
 *     &pipeline_caps
 * );
 *
 * num_forward_references  = pipeline_caps.num_forward_references;
 * forward_references      =
 *     malloc(num__forward_references * sizeof(VASurfaceID));
 * num_backward_references = pipeline_caps.num_backward_references;
 * backward_references     =
 *     malloc(num_backward_references * sizeof(VASurfaceID));
 * \endcode
 *
 * \section api_vpp_submit Send video processing parameters through VA buffers
 *
 * Video processing pipeline parameters are submitted for each source
 * surface to process. Video filter parameters can also change, per-surface.
 * e.g. the list of reference frames used for deinterlacing.
 *
 * \code
 * foreach (iteration) {
 *     vaBeginPicture(va_dpy, vpp_ctx, vpp_surface);
 *     foreach (surface) {
 *         VARectangle output_region;
 *         VABufferID pipeline_buf;
 *         VAProcPipelineParameterBuffer *pipeline_param;
 *
 *         vaCreateBuffer(va_dpy, vpp_ctx,
 *             VAProcPipelineParameterBuffer, sizeof(*pipeline_param), 1,
 *             NULL, &pipeline_buf
 *         );
 *
 *         // Setup output region for this surface
 *         // e.g. upper left corner for the first surface
 *         output_region.x     = BORDER;
 *         output_region.y     = BORDER;
 *         output_region.width =
 *             (vpp_surface_width - (Nx_surfaces + 1) * BORDER) / Nx_surfaces;
 *         output_region.height =
 *             (vpp_surface_height - (Ny_surfaces + 1) * BORDER) / Ny_surfaces;
 *
 *         vaMapBuffer(va_dpy, pipeline_buf, &pipeline_param);
 *         pipeline_param->surface              = surface;
 *         pipeline_param->surface_region       = NULL;
 *         pipeline_param->output_region        = &output_region;
 *         pipeline_param->output_background_color = 0;
 *         if (first surface to render)
 *             pipeline_param->output_background_color = 0xff000000; // black
 *         pipeline_param->filter_flags         = VA_FILTER_SCALING_HQ;
 *         pipeline_param->filters              = filter_bufs;
 *         pipeline_param->num_filters          = num_filter_bufs;
 *         vaUnmapBuffer(va_dpy, pipeline_buf);
 *
 *         // Update reference frames for deinterlacing, if necessary
 *         pipeline_param->forward_references      = forward_references;
 *         pipeline_param->num_forward_references  = num_forward_references_used;
 *         pipeline_param->backward_references     = backward_references;
 *         pipeline_param->num_backward_references = num_bacward_references_used;
 *
 *         // Apply filters
 *         vaRenderPicture(va_dpy, vpp_ctx, &pipeline_buf, 1);
 *     }
 *     vaEndPicture(va_dpy, vpp_ctx);
 * }
 * \endcode
 */

/** \brief Video filter types. */
typedef enum _VAProcFilterType {
    VAProcFilterNone = 0,
    /** \brief Noise reduction filter. */
    VAProcFilterNoiseReduction,
    /** \brief Deinterlacing filter. */
    VAProcFilterDeinterlacing,
    /** \brief Sharpening filter. */
    VAProcFilterSharpening,
    /** \brief Color balance parameters. */
    VAProcFilterColorBalance,
    /** \brief Skin Tone Enhancement. */
    VAProcFilterSkinToneEnhancement,
    /** \brief Deblocking filter. */
    VAProcFilterDeblocking,
    /** \brief Frame rate conversion. */
    VAProcFilterFrameRateConversion,
    /** \brief Total Color Correction. */
    VAProcFilterTotalColorCorrection,
    /** \brief Non-Linear Anamorphic Scaling. */
    VAProcFilterNonLinearAnamorphicScaling,
    /** \brief Image Stabilization. */
    VAProcFilterImageStabilization,
    /** \brief Number of video filters. */
    VAProcFilterCount
} VAProcFilterType;

/** \brief Deinterlacing types. */
typedef enum _VAProcDeinterlacingType {
    VAProcDeinterlacingNone = 0,
    /** \brief Bob deinterlacing algorithm. */
    VAProcDeinterlacingBob,
    /** \brief Weave deinterlacing algorithm. */
    VAProcDeinterlacingWeave,
    /** \brief Motion adaptive deinterlacing algorithm. */
    VAProcDeinterlacingMotionAdaptive,
    /** \brief Motion compensated deinterlacing algorithm. */
    VAProcDeinterlacingMotionCompensated,
    /** \brief Number of deinterlacing algorithms. */
    VAProcDeinterlacingCount
} VAProcDeinterlacingType;

/** \brief Color balance types. */
typedef enum _VAProcColorBalanceType {
    VAProcColorBalanceNone = 0,
    /** \brief Hue. */
    VAProcColorBalanceHue,
    /** \brief Saturation. */
    VAProcColorBalanceSaturation,
    /** \brief Brightness. */
    VAProcColorBalanceBrightness,
    /** \brief Contrast. */
    VAProcColorBalanceContrast,
    /** \brief Automatically adjusted saturation. */
    VAProcColorBalanceAutoSaturation,
    /** \brief Automatically adjusted brightness. */
    VAProcColorBalanceAutoBrightness,
    /** \brief Automatically adjusted contrast. */
    VAProcColorBalanceAutoContrast,
    /** \brief Number of color balance attributes. */
    VAProcColorBalanceCount
} VAProcColorBalanceType;

/** \brief Color standard types. */
typedef enum _VAProcColorStandardType {
    VAProcColorStandardNone = 0,
    /** \brief ITU-R BT.601. */
    VAProcColorStandardBT601,
    /** \brief ITU-R BT.709. */
    VAProcColorStandardBT709,
    /** \brief ITU-R BT.470-2 System M. */
    VAProcColorStandardBT470M,
    /** \brief ITU-R BT.470-2 System B, G. */
    VAProcColorStandardBT470BG,
    /** \brief SMPTE-170M. */
    VAProcColorStandardSMPTE170M,
    /** \brief SMPTE-240M. */
    VAProcColorStandardSMPTE240M,
    /** \brief Generic film. */
    VAProcColorStandardGenericFilm,
    /** \brief sRGB. */
    VAProcColorStandardSRGB,
    /** \brief stRGB. */
    VAProcColorStandardSTRGB,
    /** \brief xvYCC601. */
    VAProcColorStandardXVYCC601,
    /** \brief xvYCC709. */
    VAProcColorStandardXVYCC709,
    /** \brief ITU-R BT.2020. */
    VAProcColorStandardBT2020,
    /** \brief Number of color standards. */
    VAProcColorStandardCount
} VAProcColorStandardType;

/** \brief Total color correction types. */
typedef enum _VAProcTotalColorCorrectionType {
    VAProcTotalColorCorrectionNone = 0,
    /** \brief Red Saturation. */
    VAProcTotalColorCorrectionRed,
    /** \brief Green Saturation. */
    VAProcTotalColorCorrectionGreen,
    /** \brief Blue Saturation. */
    VAProcTotalColorCorrectionBlue,
    /** \brief Cyan Saturation. */
    VAProcTotalColorCorrectionCyan,
    /** \brief Magenta Saturation. */
    VAProcTotalColorCorrectionMagenta,
    /** \brief Yellow Saturation. */
    VAProcTotalColorCorrectionYellow,
    /** \brief Number of color correction attributes. */
    VAProcTotalColorCorrectionCount
} VAProcTotalColorCorrectionType;

/** \brief ImageStabilization Types. */
typedef enum _VAProcImageStabilizationType {
    VAProcImageStabilizationTypeNone = 0,
    /** \brief Mode Crop - crops the frame by the app provided percentage. */
    VAProcImageStabilizationTypeCrop,
    /** \brief Mode Crop Min Zoom - crops and then upscales the frame to half the black boundary. */
    VAProcImageStabilizationTypeMinZoom,
    /** \brief Mode Crop Full Zoom - crops and upscales the frame to original size. */
    VAProcImageStabilizationTypeFullZoom,
    /** \brief Number of Image Stabilization Type. */
    VAProcImageStabilizationTypeCount
} VAProcImageStabilizationType;

/** @name Video blending flags */
/**@{*/
/** \brief Global alpha blending. */
#define VA_BLEND_GLOBAL_ALPHA           0x0002
/** \brief Premultiplied alpha blending (RGBA surfaces only). */
#define VA_BLEND_PREMULTIPLIED_ALPHA    0x0008
/** \brief Luma color key (YUV surfaces only). */
#define VA_BLEND_LUMA_KEY               0x0010
/**@}*/

/** \brief Video blending state definition. */
typedef struct _VABlendState {
    /** \brief Video blending flags. */
    unsigned int        flags;
    /**
     * \brief Global alpha value.
     *
     * Valid if \flags has VA_BLEND_GLOBAL_ALPHA.
     * Valid range is 0.0 to 1.0 inclusive.
     */
    float               global_alpha;
    /**
     * \brief Minimum luma value.
     *
     * Valid if \flags has VA_BLEND_LUMA_KEY.
     * Valid range is 0.0 to 1.0 inclusive.
     * \ref min_luma shall be set to a sensible value lower than \ref max_luma.
     */
    float               min_luma;
    /**
     * \brief Maximum luma value.
     *
     * Valid if \flags has VA_BLEND_LUMA_KEY.
     * Valid range is 0.0 to 1.0 inclusive.
     * \ref max_luma shall be set to a sensible value larger than \ref min_luma.
     */
    float               max_luma;
} VABlendState;

/** @name Video pipeline flags */
/**@{*/
/** \brief Specifies whether to apply subpictures when processing a surface. */
#define VA_PROC_PIPELINE_SUBPICTURES    0x00000001
/**
 * \brief Specifies whether to apply power or performance
 * optimizations to a pipeline.
 *
 * When processing several surfaces, it may be necessary to prioritize
 * more certain pipelines than others. This flag is only a hint to the
 * video processor so that it can omit certain filters to save power
 * for example. Typically, this flag could be used with video surfaces
 * decoded from a secondary bitstream.
 */
#define VA_PROC_PIPELINE_FAST           0x00000002
/**@}*/

/** @name Video filter flags */
/**@{*/
/** \brief Specifies whether the filter shall be present in the pipeline. */
#define VA_PROC_FILTER_MANDATORY        0x00000001
/**@}*/

/** @name Pipeline end flags */
/**@{*/
/** \brief Specifies the pipeline is the last. */
#define VA_PIPELINE_FLAG_END		0x00000004
/**@}*/

/** @name Chroma Siting flag */
/**@{*/
#define VA_CHROMA_SITING_UNKNOWN              0x00000000
/** \brief Chroma samples are co-sited vertically on the top with the luma samples. */
#define VA_CHROMA_SITING_VERTICAL_TOP         0x00000001
/** \brief Chroma samples are not co-sited vertically with the luma samples. */
#define VA_CHROMA_SITING_VERTICAL_CENTER      0x00000002
/** \brief Chroma samples are co-sited vertically on the bottom with the luma samples. */
#define VA_CHROMA_SITING_VERTICAL_BOTTOM      0x00000003
/** \brief Chroma samples are co-sited horizontally on the left with the luma samples. */
#define VA_CHROMA_SITING_HORIZONTAL_LEFT      0x00000004
/** \brief Chroma samples are not co-sited horizontally with the luma samples. */
#define VA_CHROMA_SITING_HORIZONTAL_CENTER    0x00000008
/**@}*/

/** \brief Video processing pipeline capabilities. */
typedef struct _VAProcPipelineCaps {
    /** \brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags. */
    unsigned int        pipeline_flags;
    /** \brief Extra filter flags. See VAProcPipelineParameterBuffer::filter_flags. */
    unsigned int        filter_flags;
    /** \brief Number of forward reference frames that are needed. */
    unsigned int        num_forward_references;
    /** \brief Number of backward reference frames that are needed. */
    unsigned int        num_backward_references;
    /** \brief List of color standards supported on input. */
    VAProcColorStandardType *input_color_standards;
    /** \brief Number of elements in \ref input_color_standards array. */
    unsigned int        num_input_color_standards;
    /** \brief List of color standards supported on output. */
    VAProcColorStandardType *output_color_standards;
    /** \brief Number of elements in \ref output_color_standards array. */
    unsigned int        num_output_color_standards;
    /**
     * \brief Rotation flags.
     *
     * For each rotation angle supported by the underlying hardware,
     * the corresponding bit is set in \ref rotation_flags. See
     * "Rotation angles" for a description of rotation angles.
     *
     * A value of 0 means the underlying hardware does not support any
     * rotation. Otherwise, a check for a specific rotation angle can be
     * performed as follows:
     *
     * \code
     * VAProcPipelineCaps pipeline_caps;
     * ...
     * vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx,
     *     filter_bufs, num_filter_bufs,
     *     &pipeline_caps
     * );
     * ...
     * if (pipeline_caps.rotation_flags & (1 << VA_ROTATION_xxx)) {
     *     // Clockwise rotation by xxx degrees is supported
     *     ...
     * }
     * \endcode
     */
    unsigned int        rotation_flags;
    /** \brief Blend flags. See "Video blending flags". */
    unsigned int        blend_flags;
    /**
     * \brief Mirroring flags.
     *
     * For each mirroring direction supported by the underlying hardware,
     * the corresponding bit is set in \ref mirror_flags. See
     * "Mirroring directions" for a description of mirroring directions.
     *
     */
    unsigned int        mirror_flags;
    /** \brief Number of additional output surfaces supported by the pipeline  */
    unsigned int        num_additional_outputs;
} VAProcPipelineCaps;

/** \brief Specification of values supported by the filter. */
typedef struct _VAProcFilterValueRange {
    /** \brief Minimum value supported, inclusive. */
    float               min_value;
    /** \brief Maximum value supported, inclusive. */
    float               max_value;
    /** \brief Default value. */
    float               default_value;
    /** \brief Step value that alters the filter behaviour in a sensible way. */
    float               step;
} VAProcFilterValueRange;

/**
 * \brief Video processing pipeline configuration.
 *
 * This buffer defines a video processing pipeline. As for any buffer
 * passed to \c vaRenderPicture(), this is a one-time usage model.
 * However, the actual filters to be applied are provided in the
 * \c filters field, so they can be re-used in other processing
 * pipelines.
 *
 * The target surface is specified by the \c render_target argument of
 * \c vaBeginPicture(). The general usage model is described as follows:
 * - \c vaBeginPicture(): specify the target surface that receives the
 *   processed output;
 * - \c vaRenderPicture(): specify a surface to be processed and composed
 *   into the \c render_target. Use as many \c vaRenderPicture() calls as
 *   necessary surfaces to compose ;
 * - \c vaEndPicture(): tell the driver to start processing the surfaces
 *   with the requested filters.
 *
 * If a filter (e.g. noise reduction) needs to be applied with different
 * values for multiple surfaces, the application needs to create as many
 * filter parameter buffers as necessary. i.e. the filter parameters shall
 * not change between two calls to \c vaRenderPicture().
 *
 * For composition usage models, the first surface to process will generally
 * use an opaque background color, i.e. \c output_background_color set with
 * the most significant byte set to \c 0xff. For instance, \c 0xff000000 for
 * a black background. Then, subsequent surfaces would use a transparent
 * background color.
 */
typedef struct _VAProcPipelineParameterBuffer {
    /**
     * \brief Source surface ID.
     *
     * ID of the source surface to process. If subpictures are associated
     * with the video surfaces then they shall be rendered to the target
     * surface, if the #VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set.
     */
    VASurfaceID         surface;
    /**
     * \brief Region within the source surface to be processed.
     *
     * Pointer to a #VARectangle defining the region within the source
     * surface to be processed. If NULL, \c surface_region implies the
     * whole surface.
     */
    const VARectangle  *surface_region;
    /**
     * \brief Requested input color primaries.
     *
     * Color primaries are implicitly converted throughout the processing
     * pipeline. The video processor chooses the best moment to apply
     * this conversion. The set of supported color primaries primaries
     * for input shall be queried with vaQueryVideoProcPipelineCaps().
     */
    VAProcColorStandardType surface_color_standard;
    /**
     * \brief Region within the output surface.
     *
     * Pointer to a #VARectangle defining the region within the output
     * surface that receives the processed pixels. If NULL, \c output_region
     * implies the whole surface.
     *
     * Note that any pixels residing outside the specified region will
     * be filled in with the \ref output_background_color.
     */
    const VARectangle  *output_region;
    /**
     * \brief Background color.
     *
     * Background color used to fill in pixels that reside outside of the
     * specified \ref output_region. The color is specified in ARGB format:
     * [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.
     *
     * Unless the alpha value is zero or the \ref output_region represents
     * the whole target surface size, implementations shall not render the
     * source surface to the target surface directly. Rather, in order to
     * maintain the exact semantics of \ref output_background_color, the
     * driver shall use a temporary surface and fill it in with the
     * appropriate background color. Next, the driver will blend this
     * temporary surface into the target surface.
     */
    unsigned int        output_background_color;
    /**
     * \brief Requested output color primaries.
     */
    VAProcColorStandardType output_color_standard;
    /**
     * \brief Pipeline filters. See video pipeline flags.
     *
     * Flags to control the pipeline, like whether to apply subpictures
     * or not, notify the driver that it can opt for power optimizations,
     * should this be needed.
     */
    unsigned int        pipeline_flags;
    /**
     * \brief Extra filter flags. See vaPutSurface() flags.
     *
     * Filter flags are used as a fast path, wherever possible, to use
     * vaPutSurface() flags instead of explicit filter parameter buffers.
     *
     * Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps()
     * to check for implementation details:
     * - Bob-deinterlacing: \c VA_FRAME_PICTURE, \c VA_TOP_FIELD,
     *   \c VA_BOTTOM_FIELD. Note that any deinterlacing filter
     *   (#VAProcFilterDeinterlacing) will override those flags.
     * - Color space conversion: \c VA_SRC_BT601, \c VA_SRC_BT709,
     *   \c VA_SRC_SMPTE_240.
     * - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
     *   \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
     * - Enable auto noise reduction: \c VA_FILTER_NOISEREDUCTION_AUTO.
     */
    unsigned int        filter_flags;
    /**
     * \brief Array of filters to apply to the surface.
     *
     * The list of filters shall be ordered in the same way the driver expects
     * them. i.e. as was returned from vaQueryVideoProcFilters().
     * Otherwise, a #VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned
     * from vaRenderPicture() with this buffer.
     *
     * #VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list
     * contains an unsupported filter.
     *
     * Note: no filter buffer is destroyed after a call to vaRenderPicture(),
     * only this pipeline buffer will be destroyed as per the core API
     * specification. This allows for flexibility in re-using the filter for
     * other surfaces to be processed.
     */
    VABufferID         *filters;
    /** \brief Actual number of filters. */
    unsigned int        num_filters;
    /** \brief Array of forward reference frames. */
    VASurfaceID        *forward_references;
    /** \brief Number of forward reference frames that were supplied. */
    unsigned int        num_forward_references;
    /** \brief Array of backward reference frames. */
    VASurfaceID        *backward_references;
    /** \brief Number of backward reference frames that were supplied. */
    unsigned int        num_backward_references;
    /**
     * \brief Rotation state. See rotation angles.
     *
     * The rotation angle is clockwise. There is no specific rotation
     * center for this operation. Rather, The source \ref surface is
     * first rotated by the specified angle and then scaled to fit the
     * \ref output_region.
     *
     * This means that the top-left hand corner (0,0) of the output
     * (rotated) surface is expressed as follows:
     * - \ref VA_ROTATION_NONE: (0,0) is the top left corner of the
     *   source surface -- no rotation is performed ;
     * - \ref VA_ROTATION_90: (0,0) is the bottom-left corner of the
     *   source surface ;
     * - \ref VA_ROTATION_180: (0,0) is the bottom-right corner of the
     *   source surface -- the surface is flipped around the X axis ;
     * - \ref VA_ROTATION_270: (0,0) is the top-right corner of the
     *   source surface.
     *
     * Check VAProcPipelineCaps::rotation_flags first prior to
     * defining a specific rotation angle. Otherwise, the hardware can
     * perfectly ignore this variable if it does not support any
     * rotation.
     */
    unsigned int        rotation_state;
    /**
     * \brief blending state. See "Video blending state definition".
     *
     * If \ref blend_state is NULL, then default operation mode depends
     * on the source \ref surface format:
     * - RGB: per-pixel alpha blending ;
     * - YUV: no blending, i.e override the underlying pixels.
     *
     * Otherwise, \ref blend_state is a pointer to a #VABlendState
     * structure that shall be live until vaEndPicture().
     *
     * Implementation note: the driver is responsible for checking the
     * blend state flags against the actual source \ref surface format.
     * e.g. premultiplied alpha blending is only applicable to RGB
     * surfaces, and luma keying is only applicable to YUV surfaces.
     * If a mismatch occurs, then #VA_STATUS_ERROR_INVALID_BLEND_STATE
     * is returned.
     */
    const VABlendState *blend_state;
    /**
     * \bried mirroring state. See "Mirroring directions".
     *
     * Mirroring of an image can be performed either along the
     * horizontal or vertical axis. It is assumed that the rotation
     * operation is always performed before the mirroring operation.
     */
    unsigned int      mirror_state;
    /** \brief Array of additional output surfaces. */
    VASurfaceID        *additional_outputs;
    /** \brief Number of additional output surfaces. */
    unsigned int        num_additional_outputs;
    /**
     * \brief Flag to indicate the input surface flag such as chroma-siting,
     * range flag and so on.
     *
     * The lower 4 bits are still used as chroma-siting flag
     * The range_flag bit is used to indicate that the range flag of color-space conversion.
     * -\ref VA_SOURCE_RANGE_FULL(Full range): Y/Cb/Cr is in [0, 255].It is
     *   mainly used for JPEG/JFIF formats. The combination with the BT601 flag
     *   means that JPEG/JFIF color-space conversion matrix is used.
     * -\ref VA_SOURCE_RANGE_FULL(Reduced range): Y is in [16, 235] and Cb/Cr
     *   is in [16, 240]. It is mainly used for the YUV<->RGB color-space
     *   conversion in SDTV/HDTV/UHDTV.
     */
    unsigned int        input_surface_flag;
} VAProcPipelineParameterBuffer;

/**
 * \brief Filter parameter buffer base.
 *
 * This is a helper structure used by driver implementations only.
 * Users are not supposed to allocate filter parameter buffers of this
 * type.
 */
typedef struct _VAProcFilterParameterBufferBase {
    /** \brief Filter type. */
    VAProcFilterType    type;
} VAProcFilterParameterBufferBase;

/**
 * \brief Default filter parametrization.
 *
 * Unless there is a filter-specific parameter buffer,
 * #VAProcFilterParameterBuffer is the default type to use.
 */
typedef struct _VAProcFilterParameterBuffer {
    /** \brief Filter type. */
    VAProcFilterType    type;
    /** \brief Value. */
    float               value;
} VAProcFilterParameterBuffer;

/** @name De-interlacing flags */
/**@{*/
/**
 * \brief Bottom field first in the input frame.
 * if this is not set then assumes top field first.
 */
#define VA_DEINTERLACING_BOTTOM_FIELD_FIRST	0x0001
/**
 * \brief Bottom field used in deinterlacing.
 * if this is not set then assumes top field is used.
 */
#define VA_DEINTERLACING_BOTTOM_FIELD		0x0002
/**
 * \brief A single field is stored in the input frame.
 * if this is not set then assumes the frame contains two interleaved fields.
 */
#define VA_DEINTERLACING_ONE_FIELD		0x0004
/**
 * \brief Film Mode Detection is enabled. If enabled, driver performs inverse
 * of various pulldowns, such as 3:2 pulldown.
 * if this is not set then assumes FMD is disabled.
 */
#define VA_DEINTERLACING_FMD_ENABLE		0x0008
/**@}*/

/** \brief Deinterlacing filter parametrization. */
typedef struct _VAProcFilterParameterBufferDeinterlacing {
    /** \brief Filter type. Shall be set to #VAProcFilterDeinterlacing. */
    VAProcFilterType            type;
    /** \brief Deinterlacing algorithm. */
    VAProcDeinterlacingType     algorithm;
    /** \brief Deinterlacing flags. */
    unsigned int     		flags;
} VAProcFilterParameterBufferDeinterlacing;

/**
 * \brief Color balance filter parametrization.
 *
 * This buffer defines color balance attributes. A VA buffer can hold
 * several color balance attributes by creating a VA buffer of desired
 * number of elements. This can be achieved by the following pseudo-code:
 *
 * \code
 * enum { kHue, kSaturation, kBrightness, kContrast };
 *
 * // Initial color balance parameters
 * static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =
 * {
 *     [kHue] =
 *         { VAProcFilterColorBalance, VAProcColorBalanceHue, 0.5 },
 *     [kSaturation] =
 *         { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 },
 *     [kBrightness] =
 *         { VAProcFilterColorBalance, VAProcColorBalanceBrightness, 0.5 },
 *     [kSaturation] =
 *         { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 }
 * };
 *
 * // Create buffer
 * VABufferID colorBalanceBuffer;
 * vaCreateBuffer(va_dpy, vpp_ctx,
 *     VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,
 *     colorBalanceParams,
 *     &colorBalanceBuffer
 * );
 *
 * VAProcFilterParameterBufferColorBalance *pColorBalanceParam;
 * vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);
 * {
 *     // Change brightness only
 *     pColorBalanceBuffer[kBrightness].value = 0.75;
 * }
 * vaUnmapBuffer(va_dpy, colorBalanceBuffer);
 * \endcode
 */
typedef struct _VAProcFilterParameterBufferColorBalance {
    /** \brief Filter type. Shall be set to #VAProcFilterColorBalance. */
    VAProcFilterType            type;
    /** \brief Color balance attribute. */
    VAProcColorBalanceType      attrib;
    /**
     * \brief Color balance value.
     *
     * Special case for automatically adjusted attributes. e.g.
     * #VAProcColorBalanceAutoSaturation,
     * #VAProcColorBalanceAutoBrightness,
     * #VAProcColorBalanceAutoContrast.
     * - If \ref value is \c 1.0 +/- \c FLT_EPSILON, the attribute is
     *   automatically adjusted and overrides any other attribute of
     *   the same type that would have been set explicitly;
     * - If \ref value is \c 0.0 +/- \c FLT_EPSILON, the attribute is
     *   disabled and other attribute of the same type is used instead.
     */
    float                       value;
} VAProcFilterParameterBufferColorBalance;

/** @name FRC Custom Rate types. */
/**@{*/
/** \brief 24p to 60p. */
#define VA_FRAME_RATE_CONVERSION_24p_60p    0x0001
/** \brief 30p to 60p. */
#define VA_FRAME_RATE_CONVERSION_30p_60p    0x0002
/**@}*/

/** \brief Frame rate conversion filter parametrization. */
typedef struct _VAProcFilterParamterBufferFrameRateConversion {
    /** \brief filter type. Shall be set to #VAProcFilterFrameRateConversion. */
    VAProcFilterType                    type;
    /** \brief FPS of input sequence. */
    unsigned int                        input_fps;
    /** \brief FPS of output sequence. */
    unsigned int                        output_fps;
    /** \brief Number of output frames in addition to the first output frame.
        \brief If num_output_frames returned from pipeline query is 0,
        \brief vaRenderPicture() will only produce one output frame with each call*/
    unsigned int                        num_output_frames;
    /**
     * \brief Array to store output frames in addition to the first one.
     * \brief The first output frame is stored in the render target from vaBeginPicture(). */
    VASurfaceID*                        output_frames;
    /** \brief if frame repeat or not. 1: repeat 0: do not repeat */
    unsigned int                        repeat_frame;
    /** \brief Counter within one complete FRC Cycle.
        \brief The counter would run from 0 to 4 for 24to60p in each cycle.
        \brief The counter would run from 0 to 1 for 30to60p in each cycle. */
    unsigned int                        cyclic_counter;
} VAProcFilterParameterBufferFrameRateConversion;

/** \brief Total color correction filter parametrization. */
typedef struct _VAProcFilterParameterBufferTotalColorCorrection {
    /** \brief Filter type. Shall be set to #VAProcFilterTotalColorCorrection. */
    VAProcFilterType                  type;
    /** \brief Color to correct. */
    VAProcTotalColorCorrectionType    attrib;
    /** \brief Color correction value. */
    float                             value;
} VAProcFilterParameterBufferTotalColorCorrection;

/** @name ImageStabilization Perf Types. */
/**@{*/
/** \brief Fast Mode. */
#define VA_IMAGE_STABILIZATION_PERF_TYPE_FAST       0x0001
 /** \brief Quality Mode. */
#define VA_IMAGE_STABILIZATION_PERF_TYPE_QUALITY    0x0002
/**@}*/

/** \brief Image Stabilization filter parametrization. */
typedef struct _VAProcFilterParameterBufferImageStabilization {
    /** \brief Filter type. Shall be set to #VAProcFilterImageStabilization. */
    VAProcFilterType                  type;
    /** \brief Image Stabilization Mode. */
    VAProcImageStabilizationType      mode;
    /** \brief Image Stabilization Crop percentage. */
    float                             crop;
    /** \brief Image Stabilization Perf type. */
    unsigned int                      perf_type;
} VAProcFilterParameterBufferImageStabilization;

/** \brief Non-Linear Anamorphic Scaling filter parametrization. */
typedef struct _VAProcFilterParameterBufferNonLinearAnamorphicScaling {
    /** \brief filter type. Shall be set to #VAProcFilterNonLinearAnamorphicScaling. */
    VAProcFilterType    type;
    /** \brief Vertical crop. */
    float               vertical_crop;
    /** \brief HLinear region. */
    float               horizontal_linear_region;
    /** \brief Non-linear crop. */
    float               nonlinear_crop;
} VAProcFilterParameterBufferNonLinearAnamorphicScaling;

/**
 * \brief Default filter cap specification (single range value).
 *
 * Unless there is a filter-specific cap structure, #VAProcFilterCap is the
 * default type to use for output caps from vaQueryVideoProcFilterCaps().
 */
typedef struct _VAProcFilterCap {
    /** \brief Range of supported values for the filter. */
    VAProcFilterValueRange      range;
} VAProcFilterCap;

/** \brief Capabilities specification for the deinterlacing filter. */
typedef struct _VAProcFilterCapDeinterlacing {
    /** \brief Deinterlacing algorithm. */
    VAProcDeinterlacingType     type;
} VAProcFilterCapDeinterlacing;

/** \brief Capabilities specification for the color balance filter. */
typedef struct _VAProcFilterCapColorBalance {
    /** \brief Color balance operation. */
    VAProcColorBalanceType      type;
    /** \brief Range of supported values for the specified operation. */
    VAProcFilterValueRange      range;
} VAProcFilterCapColorBalance;

/** \brief Capabilities specification for the Total Color Correction filter. */
typedef struct _VAProcFilterCapTotalColorCorrection {
    /** \brief Color to correct. */
    VAProcTotalColorCorrectionType    type;
    /** \brief Range of supported values for the specified color. */
    VAProcFilterValueRange            range;
} VAProcFilterCapTotalColorCorrection;

/** \brief Capabilities specification for the Image Stabilization filter. */
typedef struct _VAProcFilterCapImageStabilization {
    /** \brief IS modes supported. */
    VAProcImageStabilizationType       type[VAProcImageStabilizationTypeCount];
    /** \brief Range of supported values for crop ratio. */
    VAProcFilterValueRange             crop_range;
    /** \brief Maximum number of forward reference frames supported. */
    unsigned int                       max_forward_reference;
    /** \brief Maximum number of IS perf modes supported. */
    unsigned int                       perf_type;
} VAProcFilterCapImageStabilization;

/** \brief Capabilities specification for the Non-Linear Anamorphic Scaling filter. */
typedef struct _VAProcFilterCapNonLinearAnamorphicScaling {
    /** \brief Range of supported values for the vertical crop. */
    VAProcFilterValueRange      vertical_crop_range;
    /** \brief Range of supported values for the horizontal linear region. */
    VAProcFilterValueRange      horizontal_linear_region_range;
    /** \brief Range of supported values for the non-linear crop. */
    VAProcFilterValueRange      nonlinear_crop_range;
} VAProcFilterCapNonLinearAnamorphicScaling;

/** \brief Capabilities specification for the Frame Rate Conversion filter. */
typedef struct _VAProcFilterCapFrameRateConversion {
    /** \brief Should be set to 1 if only supported rates are requested.
        \brief Set to 0 to get the rest of the caps for the particular custom rate */
    unsigned int                        bget_custom_rates;
    /** \brief FRC custom rates supported by the pipeline in the first query
        \brief App request caps for a custom rate in the second query */
    unsigned int                        frc_custom_rates;
    /** \brief FPS of input sequence. */
    unsigned int                        input_fps;
    /** \brief FPS of output sequence. */
    unsigned int                        output_fps;
    /** \brief Number of input frames. */
    unsigned int                        input_frames;
    /** \brief Number of output frames. */
    unsigned int                        output_frames;
   /** \brief Set to 1 if interlaced input is supoorted. */
    unsigned int                        input_interlaced;
} VAProcFilterCapFrameRateConversion;

/**
 * \brief Queries video processing filters.
 *
 * This function returns the list of video processing filters supported
 * by the driver. The \c filters array is allocated by the user and
 * \c num_filters shall be initialized to the number of allocated
 * elements in that array. Upon successful return, the actual number
 * of filters will be overwritten into \c num_filters. Otherwise,
 * \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \c num_filters
 * is adjusted to the number of elements that would be returned if enough
 * space was available.
 *
 * The list of video processing filters supported by the driver shall
 * be ordered in the way they can be iteratively applied. This is needed
 * for both correctness, i.e. some filters would not mean anything if
 * applied at the beginning of the pipeline; but also for performance
 * since some filters can be applied in a single pass (e.g. noise
 * reduction + deinterlacing).
 *
 * @param[in] dpy               the VA display
 * @param[in] context           the video processing context
 * @param[out] filters          the output array of #VAProcFilterType elements
 * @param[in,out] num_filters the number of elements allocated on input,
 *      the number of elements actually filled in on output
 */
VAStatus
vaQueryVideoProcFilters(
    VADisplay           dpy,
    VAContextID         context,
    VAProcFilterType   *filters,
    unsigned int       *num_filters
);

/**
 * \brief Queries video filter capabilities.
 *
 * This function returns the list of capabilities supported by the driver
 * for a specific video filter. The \c filter_caps array is allocated by
 * the user and \c num_filter_caps shall be initialized to the number
 * of allocated elements in that array. Upon successful return, the
 * actual number of filters will be overwritten into \c num_filter_caps.
 * Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and
 * \c num_filter_caps is adjusted to the number of elements that would be
 * returned if enough space was available.
 *
 * @param[in] dpy               the VA display
 * @param[in] context           the video processing context
 * @param[in] type              the video filter type
 * @param[out] filter_caps      the output array of #VAProcFilterCap elements
 * @param[in,out] num_filter_caps the number of elements allocated on input,
 *      the number of elements actually filled in output
 */
VAStatus
vaQueryVideoProcFilterCaps(
    VADisplay           dpy,
    VAContextID         context,
    VAProcFilterType    type,
    void               *filter_caps,
    unsigned int       *num_filter_caps
);

/**
 * \brief Queries video processing pipeline capabilities.
 *
 * This function returns the video processing pipeline capabilities. The
 * \c filters array defines the video processing pipeline and is an array
 * of buffers holding filter parameters.
 *
 * Note: the #VAProcPipelineCaps structure contains user-provided arrays.
 * If non-NULL, the corresponding \c num_* fields shall be filled in on
 * input with the number of elements allocated. Upon successful return,
 * the actual number of elements will be overwritten into the \c num_*
 * fields. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned
 * and \c num_* fields are adjusted to the number of elements that would
 * be returned if enough space was available.
 *
 * @param[in] dpy               the VA display
 * @param[in] context           the video processing context
 * @param[in] filters           the array of VA buffers defining the video
 *      processing pipeline
 * @param[in] num_filters       the number of elements in filters
 * @param[in,out] pipeline_caps the video processing pipeline capabilities
 */
VAStatus
vaQueryVideoProcPipelineCaps(
    VADisplay           dpy,
    VAContextID         context,
    VABufferID         *filters,
    unsigned int        num_filters,
    VAProcPipelineCaps *pipeline_caps
);

/**@}*/

#ifdef __cplusplus
}
#endif

#endif /* VA_VPP_H */

redpajama_set_name: RedPajamaGithub


text:
Q: How can I restructure my highLow method to not throw an AIOOBE exception? I keep getting thrown an AIOOBE (ArrayIndexOutOfBoundsException) and have tried to no avail to work my way around it. If anyone has any input on how I might restructure my method or loops within it to allow for the variable "country" to hold on to it's assigned values and be returned at the end of the method, I would be extremely grateful. Thanks in advance!
public class CarbonAnalysis{
public static void main(String args[]) throws IOException{
    Scanner scan = new Scanner(System.in);
    String fileName;
    File file;
    Scanner in;

    do{
        //try{
            System.out.println("Please enter a valid name of a file to be sorted");
            fileName = scan.next();
            file=new File(fileName);
        //}catch(IOException e){
            //System.out.println("Please enter a valid filename");
            //fileName = scan.next();
            //file=new File(fileName);
        //}
        // I originally had a try/catch clause here because initially it actually caught an exception, but now at completion it's causing an error if left in.
        // That error being: "exception IOException is never thrown in body of corresponding try statement." so I've //'ed it out.
    }while(file.exists()!=true);

    in = new Scanner(new File(fileName));

    in.nextLine();
    int rows = in.nextInt();

    GetSortPack(rows, in);

    System.out.println("Output file CarbonDioxideAnalysis.txt has been created.");
}
public static void GetSortPack(int rows, Scanner in){
    String[] country = new String[rows];
    double[] totalCO2 = new double[rows];
    double[] roadCO2 = new double[rows];
    double[] CO2PerPerson = new double[rows];
    double[] carsPerPerson = new double[rows];

    while(in.hasNext()){
        for(int j=0;j<rows;j++){
            for(int i=1;i<=5;i++){
                if(i==1){
                    country[j] = in.next();
                }
                if(i==2){
                    totalCO2[j] = in.nextDouble();
                }
                if(i==3){
                    roadCO2[j] = in.nextDouble();
                }
                if(i==4){
                    CO2PerPerson[j] = in.nextDouble();
                }
                if(i==5){
                    carsPerPerson[j] = in.nextDouble();
                }
            }
        }
    }
    double[] sortedTotalCO2=SelectionSort(totalCO2);
    double[] sortedRoadCO2=SelectionSort(roadCO2);
    double[] sortedCO2PerPerson=SelectionSort(CO2PerPerson);
    double[] sortedCarsPerPerson=SelectionSort(carsPerPerson);

    try {
        BufferedWriter out = new BufferedWriter(new FileWriter("CarbonDioxideAnalysis.txt"));
        for (int i = 1; i <= 4; i++) {
            if(i==1){
                out.write("The country with the lowest total emissions: " + highLow(country, totalCO2, sortedTotalCO2, 2));
                out.newLine();
                out.write("The country with the highest total emissions: " + highLow(country, totalCO2, sortedTotalCO2, 1));
                out.newLine();
                out.write("Canada is ranked " + highLow(country, totalCO2, sortedTotalCO2, 3) + " out of " + rows + " countries for total lowest emissions.");
                out.newLine();
                out.newLine();
            }
            if(i==2){
                out.write("The country with the lowest total road emissions: " + highLow(country, roadCO2, sortedRoadCO2, 2));
                out.newLine();
                out.write("The country with the highest total road emissions: " + highLow(country, roadCO2, sortedRoadCO2, 1));
                out.newLine();
                out.write("Canada is ranked " + highLow(country, roadCO2, sortedRoadCO2, 3) + " out of " + rows + " countries for total lowest road emissions.");
                out.newLine();
                out.newLine();
            }
            if(i==3){
                out.write("The country with the lowest per-person road emissions: " + highLow(country, CO2PerPerson, sortedCO2PerPerson, 2));
                out.newLine();
                out.write("The country with the highest per-person road emissions: " + highLow(country, CO2PerPerson, sortedCO2PerPerson, 1));
                out.newLine();
                out.write("Canada is ranked " + highLow(country, CO2PerPerson, sortedCO2PerPerson, 3) + " out of " + rows + " countries for lowest per-person road emissions.");
                out.newLine();
                out.newLine();
            }
            if(i==4){
                out.write("The country with the lowest total emissions: " + highLow(country, carsPerPerson, sortedCarsPerPerson, 2));
                out.newLine();
                out.write("The country with the highest total emissions: " + highLow(country, carsPerPerson, sortedCarsPerPerson, 1));
                out.newLine();
                out.write("Canada is ranked " + highLow(country, carsPerPerson, sortedCarsPerPerson, 3) + " out of " + rows + " countries for lowest number of cars per-thousand persons.");
                out.newLine();
                out.newLine();
            }
        }
        out.close();
    }catch (IOException e) {}
}
public static String highLow(String[] countries, double[] original, double[] sorted, int maxOrMin){
    int temp = 1;
    int canada = 0;
    int a = (original.length-1);
    String country = null;
        if(maxOrMin==1){
            temp=java.util.Arrays.asList(original).indexOf(sorted[0]);
            country = (countries[temp]);
        }else if(maxOrMin==2){
            temp=java.util.Arrays.asList(original).indexOf(sorted[a]);
            country = (countries[temp]);
        }else{
            canada=java.util.Arrays.asList(countries).indexOf("Canada");
            temp=java.util.Arrays.asList(original).indexOf(sorted[canada]);
            country = String.valueOf(temp);
        }
    return String.valueOf(country);
}
public static double[] SelectionSort(double[] b) {
    double[] a = new double[b.length];
    System.arraycopy(b, 0, a, 0, b.length);
    int min=-1;
    for (int i = 0; i < a.length; i++) {
        min = i;
        for (int j = i + 1; j < a.length; j++) {
            if (a[min] > a[j]) {
                min = j;
            }
        }
        if (min != i) {
            double temp = a[min];
            a[min] = a[i];
            a[i] = temp;
        }
    }
return a;
}

}

redpajama_set_name: RedPajamaStackExchange


Malappuram: A Case has been taken against 36-year-old woman who sexually abused a 9-Year-Old boy. It is reported that the boy was being abused continuously for about one and a half years. The incident came out to light when the boy admitted all the incidents to the doctor in a private clinic.
As per the information given by the doctor, a case was registered against the woman using POCSO law. Childline says the boy was misused for months and that this even affected his mental health. Police made it clear that women had used the boy sexually.


Meet some of the members of our team here at Sunrise of Newtown Square, PA.
"I have a background in communications and a business minor. I've been working in this field for more than 10 years!
"I have worked with Sunrise since 2003. I started as a pantry cook at The Quadrangle. I was promoted within three months to grill cook, then lead cook, kitchen supervisor, dining room supervisor, then finally to dining services coordinator.
The best part of my job is the day-to-day interaction with our customers; the residents, their families and my team members.
At Sunrise, we are offered the opportunity to grow through training, so you can be more develop yourself to be a better leader.
"I have been with Sunrise since 2007. The best part of working for Sunrise is seeing the residents bloom once they move into the community. Residents that were maybe home alone or struggling with their day to day needs get support, make new friends, and start to engage in activities again.


This journal has now been triggered from the CLOCKSS Archive. In keeping with its unique mandate, CLOCKSS is proud to offer continuing and public access to volumes 1-8 of the Cell & Tissue Transplantation & Therapy.
The Cell & Tissue Transplantation & Therapy content is copyright SAGE Publications and licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.


Up-to-date pack of factsheets on a range of development issues. Great for research, homework or a brief overview of some major themes in global development. KS3, KS4, Post-16.
A summary of why access to sustainable energy is so vital for development, with statistics and examples.
A factsheet covering some of the statistics and stories behind extreme poverty.
The Sustainable Development Goals (SDGs) aim to end poverty and protect the planet; we all need to know about them.
Our global economy is built on trade, but this often disadvantages LEDCs.
Aid is money donated by governments and charities to other countries in times of need. Responsible aid aims to help people out of poverty through education and training.
Emergencies can result from human actions or natural disasters, but in either case the speed and nature of the international response is crucial.
As the global community develops we are continually faced with new and complex world health issues, and people living in extreme poverty often miss out on adequate health care.
Some statistics, some facts and some thoughts to ponder on the impacts of climate change in the developing world.


text:
A Duellmanohyla schmidtorum a kétéltűek (Amphibia) osztályának békák (Anura) rendjébe és a levelibéka-félék (Hylidae) családjába tartozó faj.

Előfordulása

A faj Guatemalában  és Mexikóban él. Természetes élőhelye a mérsékelt övi erdők, szubtrópusi és trópusi nedves síkvidéki erdők, folyók, szubtrópusi és trópusi nedves hegyvidéki erdők, folyók. A fajra élőhelyének elvesztése jelent fenyegetést.

Források

Guatemala kétéltűi
Mexikó kétéltűi
Duellmanohyla
Kétéltűfajok

redpajama_set_name: RedPajamaWikipedia


We all know that a strong leash or a secure fence is the safest choice for our furry sidekicks. Unfortunately, even the most well-behaved dogs can get away from us from time to time. What's even worse, though, is when the adventuresome nature of our canine companions leads them to be hit by a car. Watching the event happen and comforting your pet through the aftermath is a terribly stressful experience, and while we hope that you and your pet never have to endure this, we hope to prepare you "just in case".


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/smooth.iml" filepath="$PROJECT_DIR$/.idea/smooth.iml" />
    </modules>
  </component>
</project>