Skip to content

Commit

Permalink
firmware: Always signal limited range with DMT. Add default pixel enc…
Browse files Browse the repository at this point in the history
…oding enum.

raspicam: Support output to stdout
hello_encode: Remove warnings, add bitrate option
  • Loading branch information
Dom Cobley committed Apr 25, 2013
1 parent 161b569 commit 814600f
Show file tree
Hide file tree
Showing 32 changed files with 39 additions and 2 deletions.
Binary file modified fixup.dat
Binary file not shown.
Binary file modified fixup_cd.dat
Binary file not shown.
Binary file modified fixup_x.dat
Binary file not shown.
Binary file modified start.elf
Binary file not shown.
Binary file modified start_cd.elf
Binary file not shown.
Binary file modified start_x.elf
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/bin/edidparser
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/bin/raspivid
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/bin/tvservice
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libEGL.so
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libEGL_static.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libGLESv2_static.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libbcm_host.so
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libkhrn_client.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libkhrn_static.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libvcfiled_check.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libvchostif.a
Binary file not shown.
Binary file modified vc/hardfp/opt/vc/lib/libvmcs_rpc_client.a
Binary file not shown.
3 changes: 2 additions & 1 deletion vc/sdk/opt/vc/include/interface/vmcs_host/vc_hdmi_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ typedef struct {
* Setting encoding type is subjected to support in EDID
*/
typedef enum {
HDMI_PIXEL_ENCODING_RGB_LIMITED = 0, /**<Default, note that CEA mode defaults to limited RGB limited but DMT modes always uses RGB full */
HDMI_PIXEL_ENCODING_DEFAULT = 0, /**<Default, note that CEA modes (except VGA) default to RGB limited but DMT modes default to RGB full */
HDMI_PIXEL_ENCODING_RGB_LIMITED,
HDMI_PIXEL_ENCODING_RGB_FULL,
HDMI_PIXEL_ENCODING_YCbCr444_LIMITED,
HDMI_PIXEL_ENCODING_YCbCr444_FULL,
Expand Down
38 changes: 37 additions & 1 deletion vc/sdk/opt/vc/src/hello_pi/hello_encode/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ generate_test_card(void *buf, OMX_U32 * filledLen, int frame)
static void
print_def(OMX_PARAM_PORTDEFINITIONTYPE def)
{
printf("Port %lu: %s %lu/%lu %lu %lu %s,%s,%s %lux%lu %lux%lu @%lu %u\n",
printf("Port %u: %s %u/%u %u %u %s,%s,%s %ux%u %ux%u @%u %u\n",
def.nPortIndex,
def.eDir == OMX_DirInput ? "in" : "out",
def.nBufferCountActual,
Expand Down Expand Up @@ -128,6 +128,7 @@ video_encode_test(char *outputfilename)
}
list[0] = video_encode;

// get current settings of video_encode component from port 200
memset(&def, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
def.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE);
def.nVersion.nVersion = OMX_VERSION;
Expand Down Expand Up @@ -178,6 +179,41 @@ video_encode_test(char *outputfilename)
exit(1);
}

OMX_VIDEO_PARAM_BITRATETYPE bitrateType;
// set current bitrate to 1Mbit
memset(&bitrateType, 0, sizeof(OMX_VIDEO_PARAM_BITRATETYPE));
bitrateType.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
bitrateType.nVersion.nVersion = OMX_VERSION;
bitrateType.eControlRate = OMX_Video_ControlRateVariable;
bitrateType.nTargetBitrate = 1000000;
bitrateType.nPortIndex = 201;
r = OMX_SetParameter(ILC_GET_HANDLE(video_encode),
OMX_IndexParamVideoBitrate, &bitrateType);
if (r != OMX_ErrorNone) {
printf
("%s:%d: OMX_SetParameter() for bitrate for video_encode port 201 failed with %x!\n",
__FUNCTION__, __LINE__, r);
exit(1);
}


// get current bitrate
memset(&bitrateType, 0, sizeof(OMX_VIDEO_PARAM_BITRATETYPE));
bitrateType.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
bitrateType.nVersion.nVersion = OMX_VERSION;
bitrateType.nPortIndex = 201;

if (OMX_GetParameter
(ILC_GET_HANDLE(video_encode), OMX_IndexParamVideoBitrate,
&bitrateType) != OMX_ErrorNone) {
printf("%s:%d: OMX_GetParameter() for video_encode for bitrate port 201 failed!\n",
__FUNCTION__, __LINE__);
exit(1);
}
printf("Current Bitrate=%u\n",bitrateType.nTargetBitrate);



printf("encode to idle...\n");
if (ilclient_change_component_state(video_encode, OMX_StateIdle) == -1) {
printf
Expand Down
Binary file modified vc/softfp/opt/vc/bin/edidparser
Binary file not shown.
Binary file modified vc/softfp/opt/vc/bin/raspivid
Binary file not shown.
Binary file modified vc/softfp/opt/vc/bin/tvservice
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libEGL.so
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libEGL_static.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libGLESv2_static.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libbcm_host.so
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libkhrn_client.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libkhrn_static.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libvcfiled_check.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libvchostif.a
Binary file not shown.
Binary file modified vc/softfp/opt/vc/lib/libvmcs_rpc_client.a
Binary file not shown.

0 comments on commit 814600f

Please sign in to comment.